Sources › Social media › Youtube › Search Suggestions

Youtube Search Suggestions API

YouTube search typeahead: the autocomplete suggestions YouTube shows for partial text (localized by gl/hl).

YoutubeGET /search-suggestionsAll plans1 Zap

Request

GET
https://api.zapi.ink/v1/social-media:youtube-scraper/search-suggestions

Send your key in the x-api-key header. The response is JSON in the { project, data, timestamp } envelope, and an identical request is served from cache for 1 hour.

Parameters

NameTypeInRequiredDescription
querystringqueryYesPartial search text, as typed in the YouTube search box Example: resep nasi
glstringqueryNoTwo-letter country code. Default US Example: ID
hlstringqueryNoLanguage code. Default en Example: id

Code examples

cURL
curl -X GET "https://api.zapi.ink/v1/social-media:youtube-scraper/search-suggestions?query=resep+nasi&gl=ID&hl=id" \
  -H "x-api-key: zpi_xxxxxxxxxxxxxxxxxxxxxxxx"
JavaScript
const res = await fetch("https://api.zapi.ink/v1/social-media:youtube-scraper/search-suggestions?query=resep+nasi&gl=ID&hl=id", {
  method: "GET",
  headers: {
    "x-api-key": "zpi_xxxxxxxxxxxxxxxxxxxxxxxx"
  },
});
const data = await res.json();
console.log(data);
Python
import requests

res = requests.get(
    "https://api.zapi.ink/v1/social-media:youtube-scraper/search-suggestions",
    params={"query":"resep nasi","gl":"ID","hl":"id"},
    headers={"x-api-key":"zpi_xxxxxxxxxxxxxxxxxxxxxxxx"},
)
print(res.json())

Frequently asked questions

How do I call the Youtube Search Suggestions API?

Send a GET request to https://api.zapi.ink/v1/social-media:youtube-scraper/search-suggestions?query=resep+nasi with your Zapi key in the x-api-key header. Parameters — required: query; optional: gl, hl. The response is JSON in the { project, data, timestamp } envelope.

What does the Youtube Search Suggestions API return?

YouTube search typeahead: the autocomplete suggestions YouTube shows for partial text (localized by gl/hl).

Is the Youtube Search Suggestions API free?

Yes. It is on the Zapi free tier: 600 Zap a month with one API key and no credit card. Each call costs 1 Zap. Paid plans raise the limits.

Can an AI assistant call the Youtube Search Suggestions API?

Yes. Add the Zapi MCP server (https://mcp.zapi.ink/mcp) to Claude, Cursor or another MCP client and ask in plain words; it calls run_scraper with scraper "youtube-scraper" and endpoint "search-suggestions".

What other Youtube API endpoints are there?

It has 12 endpoints. Besides Search Suggestions: Get User Profile, Get User Videos, Get Video Detail, Get Video Comments, Search, Get Playlist, and 5 more.