Videos tagged with a YouTube hashtag (title, channel, views, length, publish time), with cursor pagination.
curl -X POST "https://api.primaryapi.com/v1/run/youtube.search_hashtag" \
-H "Authorization: Bearer $PRIMARYAPI_API_KEY" \
-H "Content-Type: application/json" \
-d '{"hashtag":"shorts"}'{
"output": {
"found": true,
"data": {
"nextCursor": "eyJsIjoieW91dHViZS5zZWFyY2hfaGFzaHR…",
"videos": [
{
"title": "Epic fails 🤣🤣🤣 #shorts #funny #f…",
"views": 22668056,
"durationSeconds": 60,
"image": "https://i.ytimg.com/vi/jXMISgQq9MM/…", …
}
]
}
},
"credits": 2
}Input and output
4 fields
shorts.14 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.