Skip to content
scrapeatlas.Dashboard

Search YouTube

Try in Playground

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.

GET/v1/youtube/searchx-api-key
x-api-keystringrequiredheader

Your ScrapeAtlas customer key. Create one on /account/ and set SCRAPEATLAS_API_KEY.

Query parameters
9
querystringrequiredquery

Search text (1–500 characters). YouTube's intitle: operator narrows title matches.

min 1 chars · max 500 chars

Examplerunning
uploadDateenumquery

today, this_week, this_month or this_year.

one of: today, this_week, this_month, this_year

sortByenumquery

relevance (default) or popular (view count).

one of: relevance, popular

typeenumquery

videos, shorts, channels or playlists. Default: mixed results.

one of: videos, shorts, channels, playlists

Examplevideos
durationenumquery

under_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

regionstringquery

Two-letter region code selecting YouTube's regional results (default US).

continuationTokenstringquery

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.

includeExtrasenumquery

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

extrasDetailenumquery

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

Response fields
113
requestIdstring

Operation identifier for correlation.

Upstream HTTP attempts, decoded bytes and duration.

accounting.upstreamRequestsinteger

Always included.

≥ 0

accounting.responseBytesinteger

Always included.

≥ 0

accounting.durationMsnumber

Always included.

≥ 0

successboolean

True when usable data was returned; inspect status and coverage.

statusenum

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

videos.typeenum

Always included.

one of: video, live

videos.idstring

Always included.

videos.urlstring

Always included.

absolute HTTPS URL

videos.titlestring

Always included.

videos.thumbnailstringnullable

Always included.

Always included.

videos.channel.idstringnullable

Always included.

videos.channel.titlestringnullable

Always included.

videos.channel.handlestringnullable

Always included.

videos.channel.thumbnailstringnullable

Always included.

videos.viewCountTextstringnullable

Always included.

videos.viewCountIntintegernullable

Always included.

videos.publishedTimeTextstringnullable

Always included.

videos.publishedTimestringnullable

Always included.

videos.lengthTextstringnullable

Always included.

videos.lengthSecondsintegernullable

Always included.

videos.badgesstring[]

Always included.

up to 20 items

videos.descriptionstringnullableoptional

Optional.

videos.commentCountTextstringnullableoptional

Optional.

videos.commentCountIntintegernullableoptional

Optional.

videos.likeCountIntintegernullableoptional

Optional.

videos.likeCountTextstringnullableoptional

Optional.

videos.publishDatestringnullableoptional

Optional.

videos.genrestringnullableoptional

Optional.

videos.durationMsintegernullableoptional

Optional.

videos.durationFormattedstringnullableoptional

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

channels.typestring

Always included.

channels.idstring

Always included.

channels.channelNamestring

Always included.

channels.handlestringnullable

Always included.

channels.descriptionstringnullable

Always included.

channels.thumbnailstringnullable

Always included.

channels.subscriberCountTextstringnullable

Always included.

channels.subscriberCountIntintegernullable

Always included.

channels.badgesstring[]

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

playlists.typestring

Always included.

playlists.idstring

Always included.

playlists.titlestring

Always included.

playlists.thumbnailstringnullable

Always included.

playlists.playlistUrlstring

Always included.

absolute HTTPS URL

playlists.videoIdstringnullable

Always included.

playlists.videoUrlstringnullable

Always included.

playlists.videoCountintegernullable

Always included.

Always included.

playlists.channel.idstringnullable

Always included.

playlists.channel.titlestringnullable

Always included.

playlists.channel.handlestringnullable

Always included.

playlists.channel.channelUrlstringnullable

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

shorts.typestring

Always included.

shorts.idstring

Always included.

shorts.urlstring

Always included.

absolute HTTPS URL

shorts.titlestring

Always included.

shorts.thumbnailstringnullableoptional

Optional.

shorts.viewCountTextstringnullable

Always included.

shorts.viewCountIntintegernullable

Always included.

shorts.descriptionstringnullableoptional

Optional.

shorts.commentCountTextstringnullableoptional

Optional.

shorts.commentCountIntintegernullableoptional

Optional.

shorts.likeCountIntintegernullableoptional

Optional.

shorts.likeCountTextstringnullableoptional

Optional.

shorts.publishDatestringnullableoptional

Optional.

shorts.genrestringnullableoptional

Optional.

shorts.durationMsintegernullableoptional

Optional.

shorts.durationFormattedstringnullableoptional

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

shelves.typestring

Always included.

shelves.titlestringnullable

Always included.

shelves.itemsobject[]

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

lives.typeenum

Always included.

one of: video, live

lives.idstring

Always included.

lives.urlstring

Always included.

absolute HTTPS URL

lives.titlestring

Always included.

lives.thumbnailstringnullable

Always included.

Always included.

lives.channel.idstringnullable

Always included.

lives.channel.titlestringnullable

Always included.

lives.channel.handlestringnullable

Always included.

lives.channel.thumbnailstringnullable

Always included.

lives.viewCountTextstringnullable

Always included.

lives.viewCountIntintegernullable

Always included.

lives.publishedTimeTextstringnullable

Always included.

lives.publishedTimestringnullable

Always included.

lives.lengthTextstringnullable

Always included.

lives.lengthSecondsintegernullable

Always included.

lives.badgesstring[]

Always included.

up to 20 items

lives.descriptionstringnullableoptional

Optional.

lives.commentCountTextstringnullableoptional

Optional.

lives.commentCountIntintegernullableoptional

Optional.

lives.likeCountIntintegernullableoptional

Optional.

lives.likeCountTextstringnullableoptional

Optional.

lives.publishDatestringnullableoptional

Optional.

lives.genrestringnullableoptional

Optional.

lives.durationMsintegernullableoptional

Optional.

lives.durationFormattedstringnullableoptional

Optional.

continuationTokenstringnullable

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.

sourceUrlstring

Public YouTube URL the operation represents (page or API route).

absolute HTTPS URL

fetchedAtstring

UTC retrieval timestamp.

source is public_api. Warnings: extras_incomplete, items_truncated and watch_next_omitted when includeExtras is set (see channel-videos).

coverage.sourceenum

Always included.

one of: public_page, public_api

coverage.completeboolean

Always included.

coverage.warningsenum[]

Always included.

up to 8 items

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.

Error codes
13
HTTPfailure.codeMeaning
400invalid_requestMissing, malformed, duplicate or conflicting parameters, unsupported parameters or an unsafe URL.
400invalid_continuationYouTube rejected the supplied continuation token.
401unauthorizedMissing or invalid worker API key.
403restricted_pageThe channel, video, playlist or post is terminated, private, members-only or otherwise unavailable.
403age_restrictedThe video is age restricted and cannot be read logged out.
404not_foundYouTube reports no channel, video, playlist or post for the identifier.
429upstream_rate_limitedYouTube rate limited the request; no automatic retry.
502upstream_challengedYouTube rejected or challenged the request.
502unsupported_pageThe response lacks the embedded data, the data is malformed, or the resolved identity does not match the request.
502response_too_large payload_too_complexThe response exceeded byte, depth or node limits.
502unsafe_redirect request_limit upstream_errorThe bounded request could not complete.
503busyAll worker slots are in use.
504timeoutThe total retrieval deadline expired.