Search APIs
Loading…
← API Store
Social

YouTube

YouTube

YouTube search

GET /youtube/v1/search
Test this endpoint

Pass 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

NameTypeDescription
qrequiredstring Example: lofi
sortrelevance | rating | date | viewsrelevance (default), rating, date or views.
typevideo | channel | playlist | movievideo, channel, playlist or movie. Channels come back under `channels`, playlists under `playlists`.
durationshort | medium | longshort (under 4 min), medium (4-20 min) or long (over 20 min).
upload_datehour | today | week | month | yearhour, today, week, month or year.
featuresstringComma-separated: hd, subtitles, creative_commons, 3d, live, purchased, 4k, 360, location, hdr, vr180. Example: hd,subtitles
hlstringInterface language of the results (ISO 639-1), default en. Example: es
glstringCountry of the results (ISO 3166-1 alpha-2), default US. Example: MX
cursorstringCursor 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
$.cachedboolean
$.channelsarray
$.credits_usedinteger
$.estimated_resultsinteger
$.next_cursorstring
$.playlistsarray
$.querystring
$.refinementsarray
$.shortsarray
$.shorts[]object | string
$.shorts[].accessibility_labelstring
$.shorts[].idstring
$.shorts[].thumbnailstring
$.shorts[].thumbnailsarray
$.shorts[].thumbnails[]object
$.shorts[].thumbnails[].heightinteger
$.shorts[].thumbnails[].urlstring
$.shorts[].thumbnails[].widthinteger
$.shorts[].titlestring
$.shorts[].urlstring
$.shorts[].view_countinteger
$.shorts[].viewsstring
$.videosarray
$.videos[]object | string
$.videos[].accessibility_labelstring
$.videos[].badgesarray
$.videos[].badges[]string
$.videos[].channelstring
$.videos[].channel_avatarstring
$.videos[].channel_idstring
$.videos[].channel_urlstring
$.videos[].channel_verifiedboolean
$.videos[].description_snippetstring
$.videos[].duration_secondsnull
$.videos[].idstring
$.videos[].is_liveboolean
$.videos[].is_playablenull
$.videos[].is_shortboolean
$.videos[].is_upcomingboolean
$.videos[].lengthstring
$.videos[].moving_thumbnailnull
$.videos[].owner_badgesarray
$.videos[].owner_badges[]string
$.videos[].publishedstring
$.videos[].scheduled_startnull
$.videos[].short_view_countstring
$.videos[].thumbnailstring
$.videos[].thumbnailsarray
$.videos[].thumbnails[]object
$.videos[].thumbnails[].heightinteger
$.videos[].thumbnails[].urlstring
$.videos[].thumbnails[].widthinteger
$.videos[].titlestring
$.videos[].urlstring
$.videos[].view_countinteger
$.videos[].viewsstring