#What YouTube Search solves
Use youtube/search to discover demand (autocomplete),
source competitors & collaborators (channels),
map curation targets (playlists),
and fill topical gaps (videos). Filters like date, duration, and sorting let you bias for
fresh vs evergreen.
#Endpoints & when to use them
#POST /v1/youtube/search/autocomplete — Autocomplete
- Best for: Idea mining, SEO variations, quick demand checks per language (
hl). - Output:
query,lang,suggestions[],cnt_results(wrapped underdata). - Tip: Seed titles/descriptions with top 2–3 suggestions; batch by locale to localize copy.
#POST /v1/youtube/search/videos — Search Videos
- Best for: Spot rising topics, collect examples by date or viewCount, and scope by duration.
- Filters:
sort(relevance/date/rating/title/viewCount),published_after/published_before(YYYY-MM-DD),duration(short/medium/long). - Output:
videos[]withid,title,publishedAt,channelId,durationISO,views(wrapped underdata).
#POST /v1/youtube/search/channels — Search Channels
- Best for: Competitor mapping, outreach, “featured creators” rails.
- Output:
channels[]withid(channelId),title,description,publishedAt,thumb(wrapped underdata). - Tip: Combine with
youtube/channel/infoto enrich topics and country.
#POST /v1/youtube/search/playlists — Search Playlists
- Best for: Finding curation hubs to pitch or mirror; tracking “series” potential by list size.
- Output:
playlists[]withid,title,publishedAt,channelId,items(wrapped underdata).
#Quick start
# Autocomplete (English)
curl -X POST "https://api.yeb.to/v1/youtube/search/autocomplete" \
-H "Accept: application/json" -H "Content-Type: application/json" \
-H "X-API-Key: <YOUR_API_KEY>" \
-d '{ "q":"minecraft survival", "hl":"en" }'
# Videos (latest, short-form only)
curl -X POST "https://api.yeb.to/v1/youtube/search/videos" \
-H "Accept: application/json" -H "Content-Type: application/json" \
-H "X-API-Key: <YOUR_API_KEY>" \
-d '{ "q":"how to draw", "sort":"date", "published_after":"2025-01-01", "duration":"short", "limit":10 }'
# Channels (top 5 by relevance)
curl -X POST "https://api.yeb.to/v1/youtube/search/channels" \
-H "Accept: application/json" -H "Content-Type: application/json" \
-H "X-API-Key: <YOUR_API_KEY>" \
-d '{ "q":"technology reviews", "limit":5 }'
# Playlists (lofi, last year)
curl -X POST "https://api.yeb.to/v1/youtube/search/playlists" \
-H "Accept: application/json" -H "Content-Type: application/json" \
-H "X-API-Key: <YOUR_API_KEY>" \
-d '{ "q":"lofi chill", "published_after":"2024-11-01", "limit":8 }'
#Parameters that actually matter
| Param | Type | Required | Practical guidance |
|---|---|---|---|
api_key | string | Yes | Keep server-side or sign short-lived tokens at the edge. |
q | string | Yes* | Query text. Optional only for autocomplete (empty → empty suggestions). |
limit | int | No | 1–50 (default 25). Use 8/12/24 for tidy grids. |
sort | string | No | relevance (default) · date · rating · title · viewCount. |
published_after/published_before | date | No | YYYY-MM-DD. We normalize to ISO; invalid inputs are ignored safely. |
duration | string | No | Videos only: any | short | medium | long. |
hl | string | No | Autocomplete UI language (ISO-639-1, e.g. en, de, tr). |
#Reading & acting on responses
#Autocomplete — interpretation
{
"data": {
"query": "minecraft survival",
"lang": "en",
"suggestions": ["minecraft survival house","minecraft survival guide"],
"cnt_results": 2
}
}
- Use top suggestions as title leads; echo 1–2 in description for better CTR + intent match.
#Videos — interpretation
{
"data": {
"cnt_results": 1,
"videos": [
{
"id": "dQw4w9WgXcQ",
"title": "How to draw a cat",
"publishedAt": "2025-06-05T14:00:01Z",
"channelId": "UCabc123",
"durationISO": "PT3M45S",
"views": 15230
}
]
}
}
- Pipe
idintoyoutube/video/*to check engagement, restrictions, and trending signals. - Use
publishedAtwith your calendar to time responsive mixes while the topic is hot.
#Channels — interpretation
{
"data": {
"cnt_results": 2,
"channels": [
{
"id": "UC_x5XG1OV2P6uZZ5FSM9Ttw",
"title": "Google Developers",
"description": "The official Google Developers channel.",
"publishedAt": "2007-08-23T00:34:43Z",
"thumb": "https://yt3.ggpht.com/…"
}
]
}
}
- Enrich each
idwithyoutube/channel/infoandstatisticsto prioritize partners.
#Playlists — interpretation
{
"data": {
"cnt_results": 1,
"playlists": [
{
"id": "PL12345ABCDE",
"title": "Lo-Fi Chill Beats",
"publishedAt": "2024-11-17T10:00:00Z",
"channelId": "UCLofi123",
"items": 35
}
]
}
}
- Sort by
itemsto locate big curators; track publish cadence viapublishedAt.
#Practical recipes
- Idea mining per locale: Run
autocompletewithhlin target languages; harvest 10–20 suggestions; group by stem. - Fresh topic tracker:
videoswithsort=date+published_after= last 7–30 days → push timely mixes. - Playlist outreach: Use
playliststo find curators (highitems); pitch your best-fitting mix. - Competitor map:
channels→ enrich with channelstatisticsandinfo; tag by topic for dashboards.
#YouTube identifiers you’ll use
| Field | What it is | How to use |
|---|---|---|
videoId |
11-char video ID | Feed into youtube/video/* endpoints (engagement, restrictions, audit). |
channelId |
Canonical channel ID (UC…) |
Resolve to metadata via youtube/channel/*. |
playlistId |
Playlist identifier | Open as https://www.youtube.com/playlist?list={playlistId} for QA or outreach. |
#Errors & troubleshooting
400 "Missing "action" parameter"— Ensure routing sets the action segment.400 "Missing "q" (query) parameter"— Required for all exceptautocomplete.- No 4xx on bad dates — invalid
published_after/beforeare ignored (safe default). sortoutside allowed values quietly falls back torelevance.
#API Changelog (youtube/search)
data
(e.g., { "data": { "videos": [...] }}) for consistency across the suite.
published_after/published_before (YYYY-MM-DD) to videos/channels/playlists; normalized to ISO internally.
sort values (relevance, date, rating, title, viewCount).
Invalid values now fall back to relevance without errors.
hl for language-aware suggestions; tuned parsing for better result counts.
Try the Playgrounds attached to each endpoint above with your own queries to see live shapes and decide which filters matter for your workflow.