Possible HTTP requests and responses - MichaelBelgium/Youtube-API Wiki

GET - convert.php

Convert a video

Parameter Required Type Description
youtubelink Yes string The full youtubelink of the video you want to download.
format No string The format to download. Allowed formats: mp3, mp4. Default: mp3
delete No string The youtubeid of which you want it to be deleted from storage on the server

Allowed url formats

youtube.com/v/{vidid}
youtube.com/vi/{vidid}
youtube.com/?v={vidid}
youtube.com/?vi={vidid}
youtube.com/watch?v={vidid}
youtube.com/watch?vi={vidid}
youtu.be/{vidid}

Possible JSON response(s)

On error

Parameter Type Description
error boolean true
message string A simple message or the error message

No error

Parameter Type Description
error boolean false
youtube_id string The youtube identifier
title string The title of the video that got converted
alt_title string A secondary title of the video
duration integer The duration of the video that got converted (in seconds)
file string The streamlink or downloadable mp3 file
uploaded_at object A Date object

Delete a downloaded video

Parameter Required Type Description
delete Yes string The youtubeid that has to be deleted from storage on the server
format No string The format of the video that has to be deleted. Allowed formats: mp3, mp4. Default: all

GET - search.php

Parameter Required Type Description
q Yes string The query term to search for video's
max_results No integer The max results of search results u want to get

Possible response

Parameter Type Description
error boolean Whether or not an error occured
message string An error message
results array An array with MAX_RESULTS entries. Each entry has: the video id, the channel name of the video, the video title and the full url to the video