YouTube Search
API key Retired v1Search YouTube by keyword and get up to 50 videos with statistics.
Runs a YouTube video search and enriches each hit with duration and view, like and comment counts. Only videos with public statistics are included.
https://api.zactonz.com/tuber/v1/yt-search.php
Parameters
| Name | Type | Description |
|---|---|---|
keyrequired |
string |
Your API key, repeated as a query parameter. Kept for existing integrations; the |
qrequired |
string |
Search terms. |
Send parameters in the query string.
Response
Matching videos, most relevant first.
| Field | Type | Description |
|---|---|---|
status |
string |
|
results |
array of object | |
results[].videoId |
string | YouTube video id. |
results[].publishedAt |
string | ISO 8601 publish time. |
results[].title |
string | |
results[].description |
string | |
results[].thumbnail |
string |
|
results[].channelId |
string | |
results[].channelTitle |
string | |
results[].duration |
string |
|
results[].viewCount |
string | |
results[].likeCount |
string | |
results[].dislikeCount |
null | Always |
results[].commentCount |
string |
Status codes
The outcome is reported in the JSON status field. See Errors & status codes for the general rules.
200 |
OK | The search ran. |
502 |
Search failed | YouTube's Data API rejected the request. Retry later. |
null |
Rejected |
|
Notes
Each result costs an extra lookup for statistics, so a full page of 50 can take a few seconds. dislikeCount is always null: YouTube retired it from its Data API in 2021 and the key is kept for older clients.