cURL
curl --request GET \
--url 'https://api.keyapi.ai/v1/youtube/get_search_suggestions?keyword=Rick+Astley&language=en®ion=US' \
--header 'Authorization: Bearer <YOUR_API_KEY>'import requests
response = requests.get(
'https://api.keyapi.ai/v1/youtube/get_search_suggestions',
params={"keyword": "Rick Astley", "language": "en", "region": "US"},
headers={'Authorization': 'Bearer <YOUR_API_KEY>'}
)
print(response.json())const params = new URLSearchParams({"keyword": "Rick Astley", "language": "en", "region": "US"});
const response = await fetch(`https://api.keyapi.ai/v1/youtube/get_search_suggestions?${params}`, {
method: 'GET',
headers: { 'Authorization': 'Bearer <YOUR_API_KEY>' }
});
const data = await response.json();
console.log(data);HttpResponse<String> response = Unirest.get("https://api.keyapi.ai/v1/youtube/get_search_suggestions")
.header("Authorization", "Bearer <token>")
.asString();{
"code": 0,
"message": "success",
"data": {
"keyword": "Rick Astley",
"suggestions": [
"rick astley never gonna give you up",
"rick astley",
"rick astley together forever",
"rick astley pink pony club",
"rick astley foo fighters",
"rick astley never gonna give you up lyrics",
"rick astley interview",
"rick astley cry for help",
"rick astley songs",
"rick astley never gonna give you up live",
"rick astley take me to your heart",
"rick astley she wants to dance with me",
"rick astley it would take a strong strong man",
"rick astley whenever you need somebody"
],
"total_count": 14
},
"requestId": "aca97c0b-6216-4ba0-b502-df42fb0da1d7"
}{
"code": 400,
"data": null,
"message": "Missing required parameter: handle"
}{
"code": 401,
"data": null,
"message": "apiKey is null"
}{
"code": 402,
"data": null,
"message": "apiKey quota is not enough"
}{
"code": 429,
"data": null,
"message": "qps limit exceeded"
}{
"code": 500,
"data": null,
"message": "Internal server error"
}YouTube Channel
Get search suggestions
Get YouTube search suggestions (autocomplete). Similar to the suggestions shown when typing in the YouTube search box.
Notes: Suggestions vary by language and region Typically returns 10-20 suggestions Response is very fast (< 1 second)
GET
/
v1
/
youtube
/
get_search_suggestions
cURL
curl --request GET \
--url 'https://api.keyapi.ai/v1/youtube/get_search_suggestions?keyword=Rick+Astley&language=en®ion=US' \
--header 'Authorization: Bearer <YOUR_API_KEY>'import requests
response = requests.get(
'https://api.keyapi.ai/v1/youtube/get_search_suggestions',
params={"keyword": "Rick Astley", "language": "en", "region": "US"},
headers={'Authorization': 'Bearer <YOUR_API_KEY>'}
)
print(response.json())const params = new URLSearchParams({"keyword": "Rick Astley", "language": "en", "region": "US"});
const response = await fetch(`https://api.keyapi.ai/v1/youtube/get_search_suggestions?${params}`, {
method: 'GET',
headers: { 'Authorization': 'Bearer <YOUR_API_KEY>' }
});
const data = await response.json();
console.log(data);HttpResponse<String> response = Unirest.get("https://api.keyapi.ai/v1/youtube/get_search_suggestions")
.header("Authorization", "Bearer <token>")
.asString();{
"code": 0,
"message": "success",
"data": {
"keyword": "Rick Astley",
"suggestions": [
"rick astley never gonna give you up",
"rick astley",
"rick astley together forever",
"rick astley pink pony club",
"rick astley foo fighters",
"rick astley never gonna give you up lyrics",
"rick astley interview",
"rick astley cry for help",
"rick astley songs",
"rick astley never gonna give you up live",
"rick astley take me to your heart",
"rick astley she wants to dance with me",
"rick astley it would take a strong strong man",
"rick astley whenever you need somebody"
],
"total_count": 14
},
"requestId": "aca97c0b-6216-4ba0-b502-df42fb0da1d7"
}{
"code": 400,
"data": null,
"message": "Missing required parameter: handle"
}{
"code": 401,
"data": null,
"message": "apiKey is null"
}{
"code": 402,
"data": null,
"message": "apiKey quota is not enough"
}{
"code": 429,
"data": null,
"message": "qps limit exceeded"
}{
"code": 500,
"data": null,
"message": "Internal server error"
}🪙3 creditsper request
Copy for AI
🤖 Why Code When AI Can Do It For You?
Stop writing code like it’s 1970! Let AI do the heavy lifting - click the sparkles to copy a perfectly formatted prompt for ChatGPT, Claude, or your favorite AI assistant.
Authorizations
Query Parameters
Search keyword
Example:
"Rick Astley"
Language code (optional, default: en) Options: en: English zh-cn: Simplified Chinese ja: Japanese ko: Korean
Region code (optional, default: US) US: United States SG: Singapore CN: China JP: Japan KR: South Korea
Response
The response is of type object.

