Keyword search restricted to YouTube Shorts (title, views, channel, URL) with sorting, upload-date filters and cursor pagination.
curl -X POST "https://api.primaryapi.com/v1/run/youtube.search_shorts" \
-H "Authorization: Bearer $PRIMARYAPI_API_KEY" \
-H "Content-Type: application/json" \
-d '{"query":"cooking hacks"}'{
"output": {
"found": true,
"data": {
"nextCursor": "eyJsIjoieW91dHViZS5zZWFyY2hfc2hvcnR…",
"shorts": [
{
"title": "LONG RUN ROUTINE #run #runvlog #run…",
"views": 462705,
"durationSeconds": 44,
"viewsAvailable": true, …
}
]
}
},
"credits": 2
}Input and output
5 fields
cooking hacks.15 fields
Good to know
One page per call. Send nextCursor back as cursor to read the next page.
The same key and credits work for every API.