Search YouTube and receive a list of video results with titles, channels, view counts, and video IDs ready for further processing.
GET/v1/youtube/search•1 credit / 50 results
Parameters
Name
Type
Required
Default
Description
query
string
required
—
Search query string
type
string
optional
all
video | channel | playlist | all
sortBy
string
optional
relevance
relevance | date | viewCount | rating
limit
number
optional
20
Maximum results to return — up to 5,000 via automatic pagination
duration
string
optional
—
short | medium | long (videos only)
definition
string
optional
any
high (HD/4K) | standard | any (videos only)
caption
string
optional
any
closedCaption | none | any — filter by subtitle availability (videos only)
publishedAfter
string
optional
—
RFC 3339 timestamp — only results published after this date
publishedBefore
string
optional
—
RFC 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)