Get Trending YouTube Videos by Country & Category
GET/v1/youtube/trending
Fetches currently trending YouTube videos for a 2-letter ISO country code (US, GB, JP, DE, IN, etc.) and category (now, music, gaming, movies). Cost: Flat 10 Credits ($0.001) per call.
Query Parameters
geostring2-letter ISO 3166-1 alpha-2 country code.
typestringTrending category (
now,music,gaming,movies).limitinteger
Example Request (cURL / Python / JavaScript)
curl "https://api.youtubeapi.io/v1/youtube/trending" \
-H "x-api-key: yt_live_your_api_key"Response Fields
Successful trending videos response
| Field | Type | Sample / Notes |
|---|---|---|
code | integer | |
provider | string | |
status | string | |
msg | string | |
data | object | |
geo | string | |
category | string | |
items | array of VideoData | |
kind | "video" | "short" | "live" | |
videoId | string | 11-character YouTube video ID. |
videoType | "video" | "short" | "live" | |
url | string | Canonical YouTube video or Shorts URL. |
title | string | Video title. |
description | string | Full video description including timestamps and links. |
channelId | string | Channel ID (UC...). |
channelTitle | string | Channel display name. |
channelHandle | stringnull | Channel handle without @ (e.g. mrbeast). |
lengthSeconds | integer | Video duration in seconds. |
viewCount | integer | Total view count. |
likeCount | integer | Total like count. |
commentCount | integer | Total comment count. |
publishDate | stringnull | ISO 8601 publish timestamp. |
publishedText | stringnull | Relative or formatted publish date text. |
category | stringnull | YouTube video category. |
isLiveContent | boolean | |
isShort | boolean | |
isFamilySafe | boolean | |
thumbnailUrl | stringnull | High-resolution thumbnail URL. |
keywords | array of string | |
hasTranscript | boolean | True if captions/transcripts are available. |
meta | ResponseMeta | |
request_id | string | Unique UUID for tracing and support. |
endpoint | string | Canonical endpoint path. |
cached | boolean | True if served from L1 Redis or L2 PostgreSQL 16 asset sink. |
source | string | Data source tier (redis, pg, upstream_primary, upstream_fallback, oembed). |
items_count | integer | Number of records returned in data. |
credits_charged | integer | Credits deducted for this request ($1 = 10,000 Credits). |
has_more | boolean | Whether additional pages are available via next_cursor. |
next_cursor | stringnull | Continuation cursor for the next page. |
latency_ms | integer | End-to-end gateway latency in milliseconds. |
Status Codes
- 200
- Successful trending videos response