Skip to content

Search Suggestions

GET/v1/youtube/search/typeahead1 credit

Returns YouTube's search box suggestions for a partial query, including suggested channels.

01Query parameters

NameTypeDescription
queryrequiredstringThe text typed so far.

02Request

curl "https://api.scrapesocial.ai/v1/youtube/search/typeahead?query=mr+beast" \
  -H "x-api-key: $SCRAPESOCIAL_KEY"

03Responses

Real answers from the API. Lists are shortened to 2 items.

GET /v1/youtube/search/typeahead?query=mr%20beast

{
  "success": true,
  "credits_remaining": 4980,
  "credits_charged": 1,
  "query": "mr beast",
  "suggestions": [
    {
      "text": "mrbeast",
      "type": "channel",
      "channel": {
        "id": "UCX6OQ3DkcsbYNE6H8uQQuVA",
        "handle": "@MrBeast",
        "name": "MrBeast",
        "thumbnailUrl": "https://yt3.googleusercontent.com/nxYrc_1_2f77DoBadyxMTmv7ZpRZapHR5jbuYe7PlPd5cIRJxtNNEYyOC0ZsxaDyJJzXrnJiuDE=s88-c-k-c0x00ffffff-no-rj"
      }
    },
    {
      "text": "mr beast give me some money",
      "type": "query"
    }
  ]
}

Common to every endpoint

Any route can answer these: a missing or wrong key, no credits left, the platform not answering, or a failure on our side. None of them costs credits.

GET /v1/cosmos/profile?handle=design

{
  "success": false,
  "message": "Invalid API key"
}

04Notes

Each suggestion has a `type` of `query` or `channel`; channel suggestions carry the channel's id, handle, name and thumbnail. No suggestions = an empty list for 0 credits.

05Errors & credits

Every error has success: false, a real HTTP status and costs no credits.

  • 400missing_parameter

    A required parameter is missing or invalid.

  • 403private_account

    The account is private or age-restricted.

  • 404not_found

    No such account.

  • 503upstream_error

    The platform did not answer; retry shortly.