DocsIntegrationsPlaygroundPricing
Get API Key
SUPACRAWL
StatusSupportDashboard
SUPACRAWL
Docs/API Reference/YT Search
API Reference

YouTube Search

Search YouTube and receive a list of video results with titles, channels, view counts, and video IDs ready for further processing.

GET/v1/youtube/search1 credit / 50 results

Parameters

NameTypeRequiredDefaultDescription
querystringrequiredSearch query string
typestringoptionalallvideo | channel | playlist | all
sortBystringoptionalrelevancerelevance | date | viewCount | rating
limitnumberoptional20Maximum results to return — up to 5,000 via automatic pagination
durationstringoptionalshort | medium | long (videos only)
definitionstringoptionalanyhigh (HD/4K) | standard | any (videos only)
captionstringoptionalanyclosedCaption | none | any — filter by subtitle availability (videos only)
publishedAfterstringoptionalRFC 3339 timestamp — only results published after this date
publishedBeforestringoptionalRFC 3339 timestamp — only results published before this date

Code Examples

from supacrawlx import Client

client = Client("YOUR_API_KEY")
results = client.youtube.search("Next.js tutorial", limit=5)
for video in results:
    print(video.title, video.view_count)

Response

JSON
{
  "query": "Next.js tutorial",
  "results": [
    {
      "type": "video",
      "id": "Sklc_fQBmcs",
      "title": "Next.js 14 Full Course",
      "description": "Learn Next.js from scratch...",
      "thumbnail": "https://i.ytimg.com/vi/Sklc_fQBmcs/hqdefault.jpg",
      "channelId": "UC29ju8bIPH5as8OGnQzwJyA",
      "channelName": "Traversy Media",
      "publishedAt": "2024-01-15T00:00:00Z"
    }
  ],
  "resultCount": 1,
  "nextPageToken": "CAUQAA"
}