YouTube Search
Search YouTube videos by keyword in any supported country and get up to 50 matching video IDs, titles, channels and publish timestamps.
curl -X POST https://seonio.com/api/v1/youtube/search \ -H "Content-Type: application/json" \ -H "X-API-Key: $SEONIO_API_KEY" \ -d '{"country": "us", "keyword": "seo tutorial", "limit": 10}'
{
"keyword": "seo tutorial",
"country": "us",
"results": [
{
"video_id": "dQw4w9WgXcQ",
"title": "Complete SEO Tutorial for Beginners",
"channel": "Example SEO Channel",
"published_at": "2026-03-20T12:00:00Z"
},
{
"video_id": "abc123def45",
"title": "On-Page SEO Checklist: Step by Step",
"channel": "Search Lab",
"published_at": "2026-02-14T15:30:00Z"
}
]
}What to send and what comes back
Send a keyword and a country code to get matching YouTube videos by relevance, biased to that country and its language. Each result includes the video ID, title, channel name and publish timestamp. Pass any returned video ID as https://www.youtube.com/watch?v=<video_id> to /api/v1/scraper when you also need its transcript and full video metadata. A completed search with no matching videos is still a charged 200; a provider failure is an uncharged 503.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
keyword |
string | required | The search phrase to look up on YouTube (1–200 characters). Billed per request. |
country |
string | optional | Two-letter ISO country code from Seonio's 50 supported countries (default "us"; "uk" is accepted and returned as "gb"). Results are biased to that country and its language.
50 supported countriesdzAlgeriaarArgentinaauAustraliaatAustriabdBangladeshbeBelgiumbrBrazilbgBulgariacaCanadaczCzechiadkDenmarkegEgyptfiFinlandfrFrancedeGermanyghGhanagrGreecehuHungaryinIndiaidIndonesiaieIrelanditItalyjpJapankeKenyamyMalaysiamxMexicomaMorocconlNetherlandsnzNew ZealandngNigerianoNorwaypkPakistanphPhilippinesplPolandptPortugalroRomaniasaSaudi ArabiarsSerbiasgSingaporezaSouth AfricaesSpainlkSri LankaseSwedenchSwitzerlandthThailandtrTurkiyeaeUnited Arab EmiratesgbUnited Kingdom (also uk, returned as gb)usUnited StatesvnVietnam |
limit |
integer | optional | Maximum number of videos to return, 1–50 (default 10). |
Response
| Field | Type | Description |
|---|---|---|
keyword |
string | The keyword as you sent it (trimmed). |
country |
string | The canonical two-letter country code the search ran in. |
results[] |
object[] | Matching YouTube videos in relevance order. Empty array for a completed search with no matches. |
results[].video_id |
string | The 11-character YouTube video ID. |
results[].title |
string | The video title. |
results[].channel |
string | null | The channel name, or null if unavailable. |
results[].published_at |
string | null | Publish timestamp in ISO 8601 format, or null if unavailable. |
Copy, paste, add your key
The same request in cURL, Python and Node.js.
curl -X POST https://seonio.com/api/v1/youtube/search \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_API_KEY" \
-d '{"country": "us", "keyword": "seo tutorial", "limit": 10}'
import requests
resp = requests.post(
"https://seonio.com/api/v1/youtube/search",
headers={"X-API-Key": "YOUR_API_KEY"},
json={"country": "us", "keyword": "seo tutorial", "limit": 10},
)
print(resp.json())
const resp = await fetch("https://seonio.com/api/v1/youtube/search", {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-API-Key": "YOUR_API_KEY",
},
body: JSON.stringify({"country": "us", "keyword": "seo tutorial", "limit": 10}),
});
console.log(await resp.json());
Run a real request
Send this request from your browser with your API key, or leave the key empty to see the sample response.
A successful run costs $0.05 / request. With no key, you see the sample response and nothing is charged.
{
"country": "us",
"keyword": "seo tutorial",
"results": [
{
"channel": "Example SEO Channel",
"published_at": "2026-03-20T12:00:00Z",
"title": "Complete SEO Tutorial for Beginners",
"video_id": "dQw4w9WgXcQ"
},
{
"channel": "Search Lab",
"published_at": "2026-02-14T15:30:00Z",
"title": "On-Page SEO Checklist: Step by Step",
"video_id": "abc123def45"
}
]
}
What developers build with it
- Find which videos and channels rank on YouTube for your target keywords in a specific country.
- Discover video topics and publishing trends across 50 markets.
- Build a video list and pass each video URL to /api/v1/scraper to pull transcripts.
The same contract on every endpoint
Error responses are JSON with a "detail" field. It is a message string unless the row above says otherwise.
| Code | When |
|---|---|
200 | Success. The lookup completed and was charged, even if the response is empty. /keywords/global charges only the keywords it looked up. |
401 | Missing or unknown API key. |
402 | Not enough balance. "detail" is an object with "error", "message", "balance_required" and "balance_available". Requests still running hold their price until they finish, so a retry can succeed once they do. |
403 | The account is not verified yet, or it is locked. |
409 | Another AI Visibility Report of this account is running, or a start sent with free_only found no free report or site audit left; the detail says which. Not charged. |
422 | Invalid request (wrong shape or types, a keyword over 200 characters, a URL the page checker cannot audit, a domain that does not exist, or a bare public suffix such as co.uk that groups many websites) — never charged. "detail" is usually a list of validation errors; an answer that retrying cannot change (such as a domain without a DNS record) is a message string with an X-Outcome header naming it: missing, unsupported, too_large or refused_input. |
429 | Rate limit exceeded, never charged. Requests per second per account by plan: 5 on a free account, 10 on Starter, 15 on Pro and 20 on Business; retry after the Retry-After header. Also the page checker's provider limit and the AI Visibility Report's hourly limit on new reports. |
503 | A data provider failed or timed out (X-Outcome: temporary). Nothing was charged; retry after the seconds in the Retry-After header. |
Questions, answered
Simple answers for developers using the API.
How is API usage priced?
Every endpoint has a published USD price or formula. Requests draw from the same testing, included and Extra Usage balance as website and MCP actions: testing first, then included usage, then Extra Usage expiring soonest.
How do I authenticate API requests?
API actions require a verified account with a free $1 balance or an active subscription balance. Create and manage API keys from your account, then send the key in the X-API-Key header.
Can I monitor API usage and spend?
Yes. Your account shows API usage and remaining balance, so you can track costs while building and running automated workflows.
What are the API rate limits and how do I handle them?
REST API and MCP requests per second depend on your plan: 5 on a free account, 10 on Starter, 15 on Pro and 20 on Business. Website data requests from the same account count toward the same second. Requests above the limit return HTTP 429 with a Retry-After header and are not charged; wait a second and retry.
Turn search insights into measurable growth
Start your SEO research in seconds.