YouTube

Search YouTube

Returns normalized YouTube search results using YouTube's InnerTube search API. Pass continuation_token from a previous response to retrieve the next page. Use q as the primary query parameter; search_query is accepted as an alias. hl and gl localize ranking and result context; they default to en and US. Named filters cover the public web search filters. Account-only chips such as Watched and Unwatched are not exposed.

get/youtube/search

Request

  • Base URL: https://api.crawlora.net/api/v1
  • URL: https://api.crawlora.net/api/v1/youtube/search
  • Auth: API key in header x-api-key

Query parameters

qstring

Search query

search_querystring

Alias for q

continuation_tokenstring

Pagination token returned by a previous request

type'video' | 'shorts' | 'channel' | 'playlist' | 'movie'

Filter by type

sort_by'relevance' | 'upload_date' | 'view_count' | 'popularity' | 'rating'

Sort results

upload_date'last_hour' | 'today' | 'this_week' | 'this_month' | 'this_year'

Filter by upload date

duration'under_3_minutes' | 'three_to_20_minutes' | 'over_20_minutes' | 'under_3' | 'three_to_20' | 'over_20' | 'short' | 'medium' | 'long'

Filter by duration; short, medium, and long preserve their previous upstream encodings

featuresstring

Comma-separated feature filters. Allowed values: live, 4k, hd, subtitles, cc, creative_commons, 360, vr180, 3d, hdr, location, purchased

hlstring

YouTube interface language

glstring

Two-letter YouTube region code

paramsstring

Raw protobuf-encoded search filter (base64)

Headers

x-api-keystring required

API key required

Response

OK

codeinteger
msgstring

Example response

{
  "code": 200,
  "data": {
    "continuation_token": "NEXT_TOKEN",
    "estimated_results": 9895225,
    "items": [
      {
        "badges": [
          "HD",
          "CC"
        ],
        "channel_id": "UCXZCJLdBC09xxGZ6gcdrc6A",
        "channel_thumbnail": "https://yt3.ggpht.com/example=s68-c-k-c0x00ffffff-no-rj",
        "channel_title": "OpenAI",
        "description_snippet": "A concise walkthrough of GPT features.",
        "duration": "12:34",
        "duration_seconds": 754,
        "handle": "@OpenAI",
        "playlist_id": "PL1234567890abcdef",
        "position": 1,
        "published_text": "2 days ago",
        "short_view_count": "123K views",
        "subscriber_count": "1.93M subscribers",
        "thumbnail": "https://i.ytimg.com/vi/abc123/hq720.jpg",
        "title": "ChatGPT Explained",
        "type": "video",
        "url": "https://www.youtube.com/watch?v=abc123",
        "video_count": "9 lessons",
        "video_id": "abc123xyz89",
        "view_count": "123,456 views"
      }
    ],
    "query": "gpt"
  },
  "msg": "OK"
}

Changes

No recorded changes to this operation across all 2 revisions of this API.