YOUTUBE API

Search Typeahead

Retrieve search typeahead from YouTube with a single API request.

GET/api/data/v1/youtube/search/typeahead
1credit base cost

Request parameters

Up to 1 credit

Partial or complete YouTube search query

Try in the console

Live requests use your prepaid balance. Cached responses cost zero where supported.

curl --request GET \
  --url 'https://fetchgoblin.com/api/data/v1/youtube/search/typeahead?query=mr+beast' \
  --header 'x-api-key: YOUR_FETCHGOBLIN_API_KEY'

Response

Example
{
  "success": true,
  "credits_charged": 1,
  "data": {
    "query": "mr beast",
    "suggestions": [
      {
        "text": "mrbeast",
        "type": "channel",
        "channel": {
          "id": "UCX6OQ3DkcsbYNE6H8uQQuVA",
          "handle": "@MrBeast",
          "name": "MrBeast",
          "thumbnailUrl": "https://yt3.googleusercontent.com/example=s88-c-k-c0x00ffffff-no-rj"
        }
      }
    ]
  }
}
Example data from the API specification. Run a request to retrieve current data.

Response shape

This schema describes the documented data shape. Some platform fields may be absent or null. The response also includes your FetchGoblin request ID and current credit balance.

View JSON Schema +
{
  "type": "object",
  "properties": {
    "success": {
      "type": "boolean"
    },
    "credits_remaining": {
      "type": "integer"
    },
    "credits_charged": {
      "type": "integer"
    },
    "data": {
      "type": "object",
      "properties": {
        "query": {
          "type": "string"
        },
        "suggestions": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "text": {
                "type": "string"
              },
              "type": {
                "type": "string"
              },
              "channel": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "handle": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  },
                  "thumbnailUrl": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}