{"error":"Invalid country code. Use ISO 3166-1 alpha-2 format.","code":400}
Response Codes
Code
Description
200 Success
Request processed OK.
400 Bad Request
Input validation failed.
401 Unauthorized
Missing / wrong API key.
403 Forbidden
Key inactive or not allowed.
429 Rate Limit
Too many requests.
500 Server Error
Unexpected failure.
Trending List
youtube/trending0.0100 credits
Parameters
API Key
body · string
· required
Country
body · string
Category
body · string
Limit
body · string
Code Samples
Response
Status:—
Headers
Body
YouTube Trending API — Practical Guide
A hands-on guide to building “what’s hot now” experiences with YouTube Trending:
when to use it, the few parameters that matter, how to read the payload,
and how to turn results into cards, playlists, and editorial blocks.
Last updated: 21 Nov 2025, 19:41
API Version: v1
Burst: 20 req/s
Latency: 350.7 msCost: 0.01 credits/req
youtube/trending gives a live snapshot of the most popular videos per country,
optionally focused on a specific YouTube category (e.g., 10 = Music).
Use it for landing pages, auto-curated playlists, “Top Today” widgets, and weekly editorial picks.
Field guidance added. Practical notes for id, channelId, durationISO, and thumb; added YouTube ID reference section.
2025-11-21
Category docs. Clarified category=10 for Music and listed common Category IDs for quick selection.
2025-11-07
Unified wrapper. Standardized the top-level payload to {"data":{...}} and added cnt_results.
2025-10-31
Error surface. Consistent 400 validation (country, category) and 502 for upstream YouTube failures.
Frequently Asked Questions
YouTube itself refreshes the list roughly every 15 minutes; the API surfaces whatever is live at request time.
They are numeric: 10 = Music, 17 = Sports, 20 = Gaming, 24 = Entertainment, etc. See YouTube Data API docs for the full table.
Yes. Every request, even those resulting in errors, consumes credits. This is because your credits are tied to the number of requests, regardless of success or failure. If the error is clearly due to a platform problem on our end, we will restore the affected credits (no cash refunds).
Contact us at [email protected]. We take feedback seriously—if your bug report or feature request is meaningful, we can fix or improve the API quickly and grant you 50 free credits as a thank you.
It depends on the API and sometimes even on the endpoint. Some endpoints use data from external sources, which may have stricter limits. We also enforce limits to prevent abuse and keep our platform stable. Check the docs for the specific rate limit for each endpoint.
We operate on a credit system. Credits are prepaid, non-refundable units you spend on API calls and tools. Credits are consumed FIFO (oldest first) and are valid for 12 months from the purchase date. The dashboard shows each purchase date and its expiry.
Yes. All purchased credits (including fractional balances) are valid for 12 months from purchase. Unused credits automatically expire and are permanently deleted at the end of the validity period. Expired credits cannot be restored or converted to cash or other value. Transitional rule: credits bought before 22 Sep 2025 are treated as purchased on 22 Sep 2025 and expire on 22 Sep 2026 (unless an earlier expiry was stated at purchase).
Yes—within their validity window. Unused credits remain available and roll over month-to-month until they expire 12 months after purchase.
Credits are non-refundable. Only buy what you need—you can always top up later. If a platform-side error causes a failed charge, we may restore the affected credits after investigation. No cash refunds.
Prices are set in credits, not dollars. Each endpoint lists its own cost—see the “Credits / request” badge above. You’ll always know exactly what you’re spending.