Get YouTube search suggestions

Get YouTube search suggestions for a partial query.

GET/v1/youtube/search/suggestions
1credit
x-api-keystringheader

API key (`sfk_...`)

Parameters
1
querystringrequiredquery

The text typed so far, whole or partial, such as `mr beast`.

min 1 chars · max 512 chars

Response fields
18

Endpoint-specific response payload.

dataquery
string

Search query that was evaluated for this response.

Suggestions in the order YouTube shows them. Empty when YouTube has none.

datasuggestions[]text
string

Suggested search text.

min 1 chars

datasuggestions[]type
string

`query` for a search phrase, `channel` when YouTube suggests a channel.

one of: query, channel

The suggested channel; null unless `type` is `channel`.

datasuggestions[]channelplatform
string

Social platform for this channel.

one of: youtube

datasuggestions[]channelplatformUserId
stringnullable

YouTube channel id when available.

datasuggestions[]channelhandle
stringnullable

YouTube channel handle without the leading @, when available.

datasuggestions[]channeldisplayName
stringnullable

Public display name of the channel when available.

datasuggestions[]channelavatarUrl
stringnullable

Channel avatar image URL when available.

datatotalSuggestions
integer

Number of suggestions returned in this response.

≥ 0

Metadata describing the request and billing outcome.

metarequestId
string

Unique request identifier for tracing this API call.

min 1 chars

metacreditsCharged
integer

Credits charged for this request.

≥ 0

metaversion
string

Public API version that served the response.

one of: v1

metastale
booleanoptional

Present, and `true`, only when the source couldn't be reached and this is the last good answer for the same request instead, up to 24 hours old. Absent on every live answer.

one of: true

metafetchedAt
stringoptional

When a stale answer (`stale: true`) was originally fetched (ISO 8601, UTC). Absent on every live answer.

Code example

curl "https://api.socialfetch.dev/v1/youtube/search/suggestions?query=mr%20beast" \
  -H "x-api-key: YOUR_API_KEY"

Responses

Search suggestions for the requested query.