← API Store
Social
YouTube
YouTube
YouTube search
GET /youtube/v1/searchPass next_cursor back as cursor for the next results. next_cursor is null on the last page. query, lang, country and order_by are accepted as other names of q, hl, gl and sort.
Every response includes credits_used: the credits this call cost.
Each call costs 1 credits; failed calls are free. Run it in the console playground to see a live result.
Parameters
| Name | Type | Description |
|---|---|---|
qrequired | string | Example: lofi |
sort | relevance | rating | date | views | relevance (default), rating, date or views. |
type | video | channel | playlist | movie | video, channel, playlist or movie. Channels come back under `channels`, playlists under `playlists`. |
duration | short | medium | long | short (under 4 min), medium (4-20 min) or long (over 20 min). |
upload_date | hour | today | week | month | year | hour, today, week, month or year. |
features | string | Comma-separated: hd, subtitles, creative_commons, 3d, live, purchased, 4k, 360, location, hdr, vr180. Example: hd,subtitles |
hl | string | Interface language of the results (ISO 639-1), default en. Example: es |
gl | string | Country of the results (ISO 3166-1 alpha-2), default US. Example: MX |
cursor | string | Cursor from `next_cursor` on the previous response; `next_cursor` is null on the last page. |
Every endpoint also takes: raw、fields、fresh、output、records
{
"cached": false,
"channels": [],
"credits_used": 1,
"estimated_results": 10623270,
"next_cursor": "Ep0DEgRsb2ZpGpQDU0JTQ0FRdHlSbHBJVDBoc0xVdzRRWUlCQ3pCelprUjBhRFJzVFV4amdnRUxjMFk0TUVrdFZGRnBWekNDQVF0MllXUklXRTVDZVRScVVZSUJDME5NWlZwNVNVbEVP…",
"playlists": [],
"query": "lofi",
"refinements": [],
"shorts": [
{
"accessibility_label": "Anxiety(lyrics)✨ #lofi #music #song #lyrics, 1.4 million views - play Short",
"id": "ADUTUY2Gff0",
"thumbnail": "https://i.ytimg.com/vi/ADUTUY2Gff0/oardefault.jpg?sqp=-oaymwEdCJUDENAFSFWQAgHyq4qpAwwIARUAAIhCcAHAAQY=&rs=AOn4CLCvqpfuHQD1LAIOXqQuLr_9ogT_vQ",
"thumbnails": [
{
"height": 720,
"url": "https://i.ytimg.com/vi/ADUTUY2Gff0/oardefault.jpg?sqp=-oaymwEdCJUDENAFSFWQAgHyq4qpAwwIARUAAIhCcAHAAQY=&rs=AOn4CLCvqpfuHQD1LAIOXqQuLr_9ogT_vQ",
"width": 405
},
{
"height": 608,
"url": "https://i.ytimg.com/vi/ADUTUY2Gff0/oardefault.jpg?sqp=-oaymwEgCJUDEOAESFWQAgHyq4qpAw8IARUAAIhCcAHAAQbIAQE=&rs=AOn4CLB2oerCuYxv6vmeDPKwO9WcZ3…",
"width": 405
}
],
"title": "Anxiety(lyrics)✨ #lofi #music #song #lyrics",
"url": "https://www.youtube.com/shorts/ADUTUY2Gff0",
"view_count": 1400000,
"views": "1.4M views"
},
{
"accessibility_label": "Lofi Girl realizes she’s being recorded 🎥, 5.4 million views - play Short",
"id": "thR75861Btw",
"thumbnail": "https://i.ytimg.com/vi/thR75861Btw/oar2.jpg",
"thumbnails": [
{
"height": 720,
"url": "https://i.ytimg.com/vi/thR75861Btw/oar2.jpg",
"width": 406
},
{
"height": 609,
"url": "https://i.ytimg.com/vi/thR75861Btw/oar2.jpg?sqp=-oaymwEgCJYDEOEESFWQAgHyq4qpAw8IARUAAIhCcAHAAQbIAQE=&rs=AOn4CLCu6KYjZIqEllbT9jjC3DB9L5CY2w",
"width": 406
}
],
"title": "Lofi Girl realizes she’s being recorded 🎥",
"url": "https://www.youtube.com/shorts/thR75861Btw",
"view_count": 5400000,
"views": "5.4M views"
},
"… 23 more"
],
"videos": [
{
"accessibility_label": "lofi hip hop radio 📚 beats to relax/study to",
"badges": [
"LIVE",
"23 products"
],
"channel": "Lofi Girl",
"channel_avatar": "https://yt3.ggpht.com/IcZW-YBFLCGKQ7BvC8yevab9YAG1SmkEwCd80kcYrhwb0dH39Trfp3DMsI5ZJCsp9wTE60OH428=s88-c-k-c0x00ffffff-no-rj",
"channel_id": "UCSJ4gkVC6NrvII8umztf0Ow",
"channel_url": "https://www.youtube.com/channel/UCSJ4gkVC6NrvII8umztf0Ow",
"channel_verified": true,
"description_snippet": "Spooky season is officially upon us 2026 Halloween playlist available now: https://lnk.to/halloween-lofi02 | Listen on Spotify, ...",
"duration_seconds": null,
"id": "rFZHOHl-L8A",
"is_live": true,
"is_playable": null,
"is_short": false,
"is_upcoming": false,
"length": "",
"moving_thumbnail": null,
"owner_badges": [
"Official Artist Channel"
],
"published": "",
"scheduled_start": null,
"short_view_count": "18K watching",
"thumbnail": "https://i.ytimg.com/vi/rFZHOHl-L8A/hq720.jpg?v=6ad62bed&sqp=-oaymwEcCNAFEJQDSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLCdekX1ygqqUJynjbliA5ay…",
"thumbnails": [
{
"height": 202,
"url": "https://i.ytimg.com/vi/rFZHOHl-L8A/hq720.jpg?v=6ad62bed&sqp=-oaymwEcCOgCEMoBSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLDN3Yy-Dw3B9x_HYcTaGXq7…",
"width": 360
},
{
"height": 404,
"url": "https://i.ytimg.com/vi/rFZHOHl-L8A/hq720.jpg?v=6ad62bed&sqp=-oaymwEcCNAFEJQDSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLCdekX1ygqqUJynjbliA5ay…",
"width": 720
}
],
"title": "lofi hip hop radio 📚 beats to relax/study to",
"url": "https://youtu.be/rFZHOHl-L8A",
"view_count": 18068,
"views": "18,068 watching"
},
{
"accessibility_label": "24/7 halloween ambience 🎃 spooky lofi to get chills to",
"badges": [
"LIVE",
"New"
],
"channel": "Lofi Girl",
"channel_avatar": "https://yt3.ggpht.com/IcZW-YBFLCGKQ7BvC8yevab9YAG1SmkEwCd80kcYrhwb0dH39Trfp3DMsI5ZJCsp9wTE60OH428=s88-c-k-c0x00ffffff-no-rj",
"channel_id": "UCSJ4gkVC6NrvII8umztf0Ow",
"channel_url": "https://www.youtube.com/channel/UCSJ4gkVC6NrvII8umztf0Ow",
"channel_verified": true,
"description_snippet": "Pumpkins carved and jack-o'-lanterns aglow, the spookiest night of the year is here! Tune into Lofi Girl's 24/7 radio for an ...",
"duration_seconds": null,
"id": "0sfDth4lMLc",
"is_live": true,
"is_playable": null,
"is_short": false,
"is_upcoming": false,
"length": "",
"moving_thumbnail": null,
"owner_badges": [
"Official Artist Channel"
],
"published": "",
"scheduled_start": null,
"short_view_count": "5.7K watching",
"thumbnail": "https://i.ytimg.com/vi/0sfDth4lMLc/hq720.jpg?v=6ad771e2&sqp=-oaymwEcCNAFEJQDSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLC7072963-uWxiAZtxFeygC…",
"thumbnails": [
{
"height": 202,
"url": "https://i.ytimg.com/vi/0sfDth4lMLc/hq720.jpg?v=6ad771e2&sqp=-oaymwEcCOgCEMoBSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLDF9qD2RR0ZiWbWiOAu-Fp5…",
"width": 360
},
{
"height": 404,
"url": "https://i.ytimg.com/vi/0sfDth4lMLc/hq720.jpg?v=6ad771e2&sqp=-oaymwEcCNAFEJQDSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLC7072963-uWxiAZtxFeygC…",
"width": 720
}
],
"title": "24/7 halloween ambience 🎃 spooky lofi to get chills to",
"url": "https://youtu.be/0sfDth4lMLc",
"view_count": 5763,
"views": "5,763 watching"
},
"… 18 more"
]
} Response fields (57)
Field paths and types observed in the sample response; the live response is authoritative.
$ | object |
$.cached | boolean |
$.channels | array |
$.credits_used | integer |
$.estimated_results | integer |
$.next_cursor | string |
$.playlists | array |
$.query | string |
$.refinements | array |
$.shorts | array |
$.shorts[] | object | string |
$.shorts[].accessibility_label | string |
$.shorts[].id | string |
$.shorts[].thumbnail | string |
$.shorts[].thumbnails | array |
$.shorts[].thumbnails[] | object |
$.shorts[].thumbnails[].height | integer |
$.shorts[].thumbnails[].url | string |
$.shorts[].thumbnails[].width | integer |
$.shorts[].title | string |
$.shorts[].url | string |
$.shorts[].view_count | integer |
$.shorts[].views | string |
$.videos | array |
$.videos[] | object | string |
$.videos[].accessibility_label | string |
$.videos[].badges | array |
$.videos[].badges[] | string |
$.videos[].channel | string |
$.videos[].channel_avatar | string |
$.videos[].channel_id | string |
$.videos[].channel_url | string |
$.videos[].channel_verified | boolean |
$.videos[].description_snippet | string |
$.videos[].duration_seconds | null |
$.videos[].id | string |
$.videos[].is_live | boolean |
$.videos[].is_playable | null |
$.videos[].is_short | boolean |
$.videos[].is_upcoming | boolean |
$.videos[].length | string |
$.videos[].moving_thumbnail | null |
$.videos[].owner_badges | array |
$.videos[].owner_badges[] | string |
$.videos[].published | string |
$.videos[].scheduled_start | null |
$.videos[].short_view_count | string |
$.videos[].thumbnail | string |
$.videos[].thumbnails | array |
$.videos[].thumbnails[] | object |
$.videos[].thumbnails[].height | integer |
$.videos[].thumbnails[].url | string |
$.videos[].thumbnails[].width | integer |
$.videos[].title | string |
$.videos[].url | string |
$.videos[].view_count | integer |
$.videos[].views | string |