Social Fetch
YouTube

Search YouTube

Search YouTube.

Operation

GET/v1/youtube/search

Headers

x-api-keystringrequired(header)

API key (`sfk_...`)

Parameters

querystringrequired(query)

Search query text for YouTube content.

min 1 chars · max 512 chars

uploadDatestring(query)

Optional upload date filter for video results.

one of: today, this_week, this_month, this_year

sortBystring(query)

Optional sort order for search results.

one of: relevance, popular

typestring(query)

Optional content type filter for search results.

one of: videos, shorts, channels, playlists

durationstring(query)

Optional duration filter for video results. Applies to videos, not shorts.

one of: under_3_min, between_3_and_20_min, over_20_min

regionstring(query)

Optional two-letter region code for localized search results.

min 2 chars · max 2 chars

cursorstring(query)

Opaque pagination cursor returned by a previous response.

min 1 chars

includeExtrasboolean(query)

When true, returns richer per-video metadata when available. May increase response time.

Response fields

data
objectrequired

Endpoint-specific response payload.

dataquery
stringrequired

Search query string evaluated for this response.

datavideos
arrayrequired

Matching YouTube videos.

datavideos[]id
stringrequired

YouTube content identifier.

min 1 chars

datavideos[]kind
stringrequired

Normalized media kind for this row.

one of: video, short, live

datavideos[]url
stringrequirednullable

Canonical public URL for this item when available.

datavideos[]title
stringrequirednullable

Title shown for this item.

datavideos[]thumbnailUrl
stringrequirednullable

Thumbnail image URL when available.

datavideos[]channel
objectrequirednullable

Channel metadata when available.

datavideos[]channelid
stringrequirednullable

Channel identifier when available.

datavideos[]channeltitle
stringrequirednullable

Channel title when available.

datavideos[]channelhandle
stringrequirednullable

Channel handle when available.

datavideos[]channelthumbnailUrl
stringrequirednullable

Channel thumbnail URL when available.

datavideos[]viewCount
integerrequirednullable

View count when available.

≥ 0

datavideos[]viewCountText
stringrequirednullable

Human-readable view count label when available.

datavideos[]publishedAt
stringrequirednullable

ISO-8601 publish timestamp when available. May be null for some live items.

datavideos[]publishedTimeText
stringrequirednullable

Human-readable relative publish time when available.

datavideos[]durationSeconds
integerrequirednullable

Duration in seconds when available.

≥ 0

datavideos[]durationText
stringrequirednullable

Human-readable duration label when available.

datavideos[]badges
arrayrequired

Display badges such as New, Live, or 4K when present.

datavideos[]badges[]
string
datavideos[]description
stringnullable

Description text when extras are requested and available.

datavideos[]likeCount
integernullable

Like count when extras are requested and available.

≥ 0

datavideos[]likeCountText
stringnullable

Human-readable like count when extras are requested.

datavideos[]commentCount
integernullable

Comment count when extras are requested and available.

≥ 0

datavideos[]commentCountText
stringnullable

Human-readable comment count when extras are requested.

datashorts
arrayrequired

Matching YouTube Shorts.

datashorts[]id
stringrequired

YouTube content identifier.

min 1 chars

datashorts[]kind
stringrequired

Normalized media kind for this row.

one of: video, short, live

datashorts[]url
stringrequirednullable

Canonical public URL for this item when available.

datashorts[]title
stringrequirednullable

Title shown for this item.

datashorts[]thumbnailUrl
stringrequirednullable

Thumbnail image URL when available.

datashorts[]channel
objectrequirednullable

Channel metadata when available.

datashorts[]channelid
stringrequirednullable

Channel identifier when available.

datashorts[]channeltitle
stringrequirednullable

Channel title when available.

datashorts[]channelhandle
stringrequirednullable

Channel handle when available.

datashorts[]channelthumbnailUrl
stringrequirednullable

Channel thumbnail URL when available.

datashorts[]viewCount
integerrequirednullable

View count when available.

≥ 0

datashorts[]viewCountText
stringrequirednullable

Human-readable view count label when available.

datashorts[]publishedAt
stringrequirednullable

ISO-8601 publish timestamp when available. May be null for some live items.

datashorts[]publishedTimeText
stringrequirednullable

Human-readable relative publish time when available.

datashorts[]durationSeconds
integerrequirednullable

Duration in seconds when available.

≥ 0

datashorts[]durationText
stringrequirednullable

Human-readable duration label when available.

datashorts[]badges
arrayrequired

Display badges such as New, Live, or 4K when present.

datashorts[]badges[]
string
datashorts[]description
stringnullable

Description text when extras are requested and available.

datashorts[]likeCount
integernullable

Like count when extras are requested and available.

≥ 0

datashorts[]likeCountText
stringnullable

Human-readable like count when extras are requested.

datashorts[]commentCount
integernullable

Comment count when extras are requested and available.

≥ 0

datashorts[]commentCountText
stringnullable

Human-readable comment count when extras are requested.

datachannels
arrayrequired

Matching YouTube channels.

datachannels[]id
stringrequired

YouTube channel identifier.

min 1 chars

datachannels[]name
stringrequirednullable

Channel display name.

datachannels[]handle
stringrequirednullable

Channel handle when available.

datachannels[]description
stringrequirednullable

Channel description snippet when available.

datachannels[]thumbnailUrl
stringrequirednullable

Channel avatar or banner thumbnail when available.

datachannels[]subscriberCount
integerrequirednullable

Subscriber count when available.

≥ 0

datachannels[]subscriberCountText
stringrequirednullable

Human-readable subscriber count when available.

datachannels[]badges
arrayrequired

Display badges such as Verified when present.

datachannels[]badges[]
string
dataplaylists
arrayrequired

Matching YouTube playlists.

dataplaylists[]id
stringrequired

YouTube playlist identifier.

min 1 chars

dataplaylists[]title
stringrequirednullable

Playlist title.

dataplaylists[]url
stringrequirednullable

Canonical playlist URL when available.

dataplaylists[]thumbnailUrl
stringrequirednullable

Playlist thumbnail URL when available.

dataplaylists[]videoCount
integerrequirednullable

Number of videos in the playlist when available.

≥ 0

dataplaylists[]videoId
stringrequirednullable

Representative video id shown for the playlist when available.

dataplaylists[]videoUrl
stringrequirednullable

Representative video URL when available.

dataplaylists[]channel
objectrequirednullable

Playlist owner channel when available.

dataplaylists[]channelid
stringrequirednullable

Playlist owner channel id when available.

dataplaylists[]channeltitle
stringrequirednullable

Playlist owner channel title.

dataplaylists[]channelhandle
stringrequirednullable

Playlist owner handle when available.

dataplaylists[]channelurl
stringrequirednullable

Playlist owner channel URL when available.

datashelves
arrayrequired

Grouped shelf rows when returned.

datashelves[]type
stringrequirednullable

Shelf type label when available.

datashelves[]title
stringrequirednullable

Shelf title when available.

datashelves[]items
arrayrequired

Media items grouped in this shelf.

datashelves[]items[]id
stringrequired

YouTube content identifier.

min 1 chars

datashelves[]items[]kind
stringrequired

Normalized media kind for this row.

one of: video, short, live

datashelves[]items[]url
stringrequirednullable

Canonical public URL for this item when available.

datashelves[]items[]title
stringrequirednullable

Title shown for this item.

datashelves[]items[]thumbnailUrl
stringrequirednullable

Thumbnail image URL when available.

datashelves[]items[]channel
objectrequirednullable

Channel metadata when available.

datashelves[]items[]channelid
stringrequirednullable

Channel identifier when available.

datashelves[]items[]channeltitle
stringrequirednullable

Channel title when available.

datashelves[]items[]channelhandle
stringrequirednullable

Channel handle when available.

datashelves[]items[]channelthumbnailUrl
stringrequirednullable

Channel thumbnail URL when available.

datashelves[]items[]viewCount
integerrequirednullable

View count when available.

≥ 0

datashelves[]items[]viewCountText
stringrequirednullable

Human-readable view count label when available.

datashelves[]items[]publishedAt
stringrequirednullable

ISO-8601 publish timestamp when available. May be null for some live items.

datashelves[]items[]publishedTimeText
stringrequirednullable

Human-readable relative publish time when available.

datashelves[]items[]durationSeconds
integerrequirednullable

Duration in seconds when available.

≥ 0

datashelves[]items[]durationText
stringrequirednullable

Human-readable duration label when available.

datashelves[]items[]badges
arrayrequired

Display badges such as New, Live, or 4K when present.

datashelves[]items[]badges[]
string
datashelves[]items[]description
stringnullable

Description text when extras are requested and available.

datashelves[]items[]likeCount
integernullable

Like count when extras are requested and available.

≥ 0

datashelves[]items[]likeCountText
stringnullable

Human-readable like count when extras are requested.

datashelves[]items[]commentCount
integernullable

Comment count when extras are requested and available.

≥ 0

datashelves[]items[]commentCountText
stringnullable

Human-readable comment count when extras are requested.

dataliveStreams
arrayrequired

Matching YouTube live streams.

dataliveStreams[]id
stringrequired

YouTube content identifier.

min 1 chars

dataliveStreams[]kind
stringrequired

Normalized media kind for this row.

one of: video, short, live

dataliveStreams[]url
stringrequirednullable

Canonical public URL for this item when available.

dataliveStreams[]title
stringrequirednullable

Title shown for this item.

dataliveStreams[]thumbnailUrl
stringrequirednullable

Thumbnail image URL when available.

dataliveStreams[]channel
objectrequirednullable

Channel metadata when available.

dataliveStreams[]channelid
stringrequirednullable

Channel identifier when available.

dataliveStreams[]channeltitle
stringrequirednullable

Channel title when available.

dataliveStreams[]channelhandle
stringrequirednullable

Channel handle when available.

dataliveStreams[]channelthumbnailUrl
stringrequirednullable

Channel thumbnail URL when available.

dataliveStreams[]viewCount
integerrequirednullable

View count when available.

≥ 0

dataliveStreams[]viewCountText
stringrequirednullable

Human-readable view count label when available.

dataliveStreams[]publishedAt
stringrequirednullable

ISO-8601 publish timestamp when available. May be null for some live items.

dataliveStreams[]publishedTimeText
stringrequirednullable

Human-readable relative publish time when available.

dataliveStreams[]durationSeconds
integerrequirednullable

Duration in seconds when available.

≥ 0

dataliveStreams[]durationText
stringrequirednullable

Human-readable duration label when available.

dataliveStreams[]badges
arrayrequired

Display badges such as New, Live, or 4K when present.

dataliveStreams[]badges[]
string
dataliveStreams[]description
stringnullable

Description text when extras are requested and available.

dataliveStreams[]likeCount
integernullable

Like count when extras are requested and available.

≥ 0

dataliveStreams[]likeCountText
stringnullable

Human-readable like count when extras are requested.

dataliveStreams[]commentCount
integernullable

Comment count when extras are requested and available.

≥ 0

dataliveStreams[]commentCountText
stringnullable

Human-readable comment count when extras are requested.

datatotalResults
integerrequired

Count of top-level result rows returned in this response across all buckets.

≥ 0

datapage
objectrequired

Pagination information for the current response.

datapagenextCursor
stringrequirednullable

Cursor to pass in the next request when another page exists.

datapagehasMore
booleanrequired

Whether another page of results is available.

meta
objectrequired

Metadata describing the request and billing outcome.

metarequestId
stringrequired

Unique request identifier for tracing this API call.

min 1 chars

metacreditsCharged
integerrequired

Credits charged for this request.

≥ 0

metaversion
stringrequired

Public API version that served the response.

one of: v1

Code example

Responses

Search results for the requested query.

Error codes

bad_requestinsufficient_creditsinternal_errorlookup_failedtemporarily_unavailableunauthorized

On this page