Search YouTube for videos, channels, and playlists
curl --request GET \
--url https://api.urltodata.ai/v1/youtube/search \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.urltodata.ai/v1/youtube/search"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.urltodata.ai/v1/youtube/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"query": "<string>",
"results": [
{
"type": "video",
"id": "<string>",
"title": "<string>",
"description": "<string>",
"thumbnail": "<string>",
"duration": 123,
"viewCount": 123,
"uploadDate": "<string>",
"channel": {
"id": "<string>",
"name": "<string>"
},
"handle": "<string>",
"videoCount": 123
}
],
"totalResults": 123
}API Reference
Search YouTube for videos, channels, and playlists
GET
/
v1
/
youtube
/
search
Search YouTube for videos, channels, and playlists
curl --request GET \
--url https://api.urltodata.ai/v1/youtube/search \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.urltodata.ai/v1/youtube/search"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.urltodata.ai/v1/youtube/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"query": "<string>",
"results": [
{
"type": "video",
"id": "<string>",
"title": "<string>",
"description": "<string>",
"thumbnail": "<string>",
"duration": 123,
"viewCount": 123,
"uploadDate": "<string>",
"channel": {
"id": "<string>",
"name": "<string>"
},
"handle": "<string>",
"videoCount": 123
}
],
"totalResults": 123
}Authorizations
API key as Bearer token (e.g. Bearer mp_abc123_secret)
Query Parameters
Search query
Filter by type
Available options:
all, video, channel, playlist Filter by upload date
Available options:
all, hour, today, week, month, year Filter by duration
Available options:
all, short, medium, long Sort results
Available options:
relevance, rating, date, views Max results