Search YouTube
Search YouTube videos, channels, playlists, Shorts, shelves and live streams, with continuation. Filter by upload date, sort, type, duration and region. Set includeExtras=true for expanded video records.
/v1/youtube/searchx-api-keyHeaders
Get your API keyYour ScrapeAtlas customer key. Create one on /account/ and set SCRAPEATLAS_API_KEY.
Search text (1–500 characters). YouTube's intitle: operator narrows title matches.
min 1 chars · max 500 chars
runningtoday, this_week, this_month or this_year.
one of: today, this_week, this_month, this_year
relevance (default) or popular (view count).
one of: relevance, popular
videos, shorts, channels or playlists. Default: mixed results.
one of: videos, shorts, channels, playlists
videosunder_3_min, between_3_and_20_min or over_20_min (videos only; implies type=videos).
one of: under_3_min, between_3_and_20_min, over_20_min
Two-letter region code selecting YouTube's regional results (default US).
YouTube's own continuation token for the next page, or null at the end. Pass it back unchanged as continuationToken; tokens are caller-carried and never stored.
Set to true to read per-video details for every listed video (two small public API calls per video, issued together: the player metadata and the watch-next data; up to 48 videos, 12 at a time) and add description, commentCountText, commentCountInt, likeCountInt, likeCountText, publishDate (ISO 8601 with the channel's offset), genre, durationMs and durationFormatted to each video, and replace viewCountText/viewCountInt with the exact count. Defaults to false. Videos whose details could not be read keep null extras and the response is partial with extras_incomplete.
one of: true, false
full (default) reads the player and the watch-next data per video; player reads only the player (one call per video, about half the upstream bytes) and leaves the watch-next fields commentCountText and commentCountInt null (description is then the player's raw text), with the coverage warning watch_next_omitted. Requires includeExtras=true.
one of: full, player
Operation identifier for correlation.
Upstream HTTP attempts, decoded bytes and duration.
Always included.
≥ 0
Always included.
≥ 0
Always included.
≥ 0
True when usable data was returned; inspect status and coverage.
success, partial (coverage.warnings names the omission), failed or challenged.
one of: success, partial
Long-form videos in page order: type (video), id, url, title, thumbnail (largest source), channel {id, title, handle, thumbnail} (null on live items), viewCountText, viewCountInt, publishedTimeText, publishedTime (ISO timestamp computed from the relative text, null when YouTube shows no relative time), lengthText, lengthSeconds, badges (labels such as New, 4K, CC).
up to 100 items
Always included.
one of: video, live
Always included.
Always included.
absolute HTTPS URL
Always included.
Always included.
Always included.
Always included.
Always included.
Always included.
Always included.
Always included.
Always included.
Always included.
Always included.
Always included.
Always included.
Always included.
up to 20 items
Optional.
Optional.
Optional.
Optional.
Optional.
Optional.
Optional.
Optional.
Optional.
Channel results (search with type=channels): type (channel), id, channelName, handle, description snippet, thumbnail, subscriberCountText ("516M"), subscriberCountInt and badges ("Verified").
up to 100 items
Always included.
Always included.
Always included.
Always included.
Always included.
Always included.
Always included.
Always included.
Always included.
up to 20 items
Playlist results: type (playlist), id, title, thumbnail, playlistUrl, videoId and videoUrl of the first video, videoCount and channel {id, title, handle, channelUrl}.
up to 100 items
Always included.
Always included.
Always included.
Always included.
Always included.
absolute HTTPS URL
Always included.
Always included.
Always included.
Always included.
Always included.
Always included.
Always included.
Always included.
Shorts: type (short), id, url (watch URL), title, viewCountText ("894K", without the word views), viewCountInt; Shorts-tab items also carry thumbnail and the per-video extras.
up to 100 items
Always included.
Always included.
Always included.
absolute HTTPS URL
Always included.
Optional.
Always included.
Always included.
Optional.
Optional.
Optional.
Optional.
Optional.
Optional.
Optional.
Optional.
Optional.
Named shelves YouTube inserts into results (type shelf, title, items of video or short items). Shorts shelves are folded into shorts.
up to 10 items
Always included.
Always included.
Always included.
up to 100 items
Live and scheduled streams (type live) with the same fields as videos; lengthText is "LIVE" or "Upcoming" and lengthSeconds null when no duration is shown.
up to 100 items
Always included.
one of: video, live
Always included.
Always included.
absolute HTTPS URL
Always included.
Always included.
Always included.
Always included.
Always included.
Always included.
Always included.
Always included.
Always included.
Always included.
Always included.
Always included.
Always included.
Always included.
up to 20 items
Optional.
Optional.
Optional.
Optional.
Optional.
Optional.
Optional.
Optional.
Optional.
YouTube's own continuation token for the next page, or null at the end. Pass it back unchanged as continuationToken; tokens are caller-carried and never stored.
Public YouTube URL the operation represents (page or API route).
absolute HTTPS URL
UTC retrieval timestamp.
source is public_api. Warnings: extras_incomplete, items_truncated and watch_next_omitted when includeExtras is set (see channel-videos).
Always included.
one of: public_page, public_api
Always included.
Always included.
up to 8 items
No fields match.
HTTP 200 returns the success variant. Check status: partial means usable data with warnings, and failed or challenged requests carry a failure object described in Errors & responses.
| HTTP | failure.code | Meaning |
|---|---|---|
| 400 | invalid_request | Missing, malformed, duplicate or conflicting parameters, unsupported parameters or an unsafe URL. |
| 400 | invalid_continuation | YouTube rejected the supplied continuation token. |
| 401 | unauthorized | Missing or invalid worker API key. |
| 403 | restricted_page | The channel, video, playlist or post is terminated, private, members-only or otherwise unavailable. |
| 403 | age_restricted | The video is age restricted and cannot be read logged out. |
| 404 | not_found | YouTube reports no channel, video, playlist or post for the identifier. |
| 429 | upstream_rate_limited | YouTube rate limited the request; no automatic retry. |
| 502 | upstream_challenged | YouTube rejected or challenged the request. |
| 502 | unsupported_page | The response lacks the embedded data, the data is malformed, or the resolved identity does not match the request. |
| 502 | response_too_large payload_too_complex | The response exceeded byte, depth or node limits. |
| 502 | unsafe_redirect request_limit upstream_error | The bounded request could not complete. |
| 503 | busy | All worker slots are in use. |
| 504 | timeout | The total retrieval deadline expired. |