Skip to content

Instantly share code, notes, and snippets.

@dwisiswant0
Created May 24, 2018 16:08
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dwisiswant0/b4113fad55552a74190633413a1db79b to your computer and use it in GitHub Desktop.
Save dwisiswant0/b4113fad55552a74190633413a1db79b to your computer and use it in GitHub Desktop.
YouTube Download (yt-dl) API

yt-dl API

To extract videos URL from YouTube.

  • Use GET http method.
Resource URL
Parameters
  • url (required). YouTube URL. The URL from YouTube video.

Example

Request

$ curl -X GET "https://api.dw1.co/youtube/download?url=https://www.youtube.com/watch?v=WDd4e4kYA2k"

Response (JSON)

If success:

{
  "id": "WDd4e4kYA2k",
  "title": "CVX & NSG - Sempurna (Decemberkid & Kay Oscar Remix)",
  "by": "INDONATION",
  "status": true,
  "videos": [
    {
      "hd720": {
        "url": "...",
        "mime": "..."
      }
    },
    {
      "medium": {
        "url": "...",
        "mime": "..."
      }
    },
    ...
  ]
}

Else:

{
  "status": false,
  "error": "..."
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment