Skip to content
youtubeapi.io
All endpoints

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

  • geostring

    2-letter ISO 3166-1 alpha-2 country code.

  • typestring

    Trending 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

FieldTypeSample / Notes
codeinteger
providerstring
statusstring
msgstring
dataobject
geostring
categorystring
itemsarray of VideoData
kind"video" | "short" | "live"
videoIdstring11-character YouTube video ID.
videoType"video" | "short" | "live"
urlstringCanonical YouTube video or Shorts URL.
titlestringVideo title.
descriptionstringFull video description including timestamps and links.
channelIdstringChannel ID (UC...).
channelTitlestringChannel display name.
channelHandlestringnullChannel handle without @ (e.g. mrbeast).
lengthSecondsintegerVideo duration in seconds.
viewCountintegerTotal view count.
likeCountintegerTotal like count.
commentCountintegerTotal comment count.
publishDatestringnullISO 8601 publish timestamp.
publishedTextstringnullRelative or formatted publish date text.
categorystringnullYouTube video category.
isLiveContentboolean
isShortboolean
isFamilySafeboolean
thumbnailUrlstringnullHigh-resolution thumbnail URL.
keywordsarray of string
hasTranscriptbooleanTrue if captions/transcripts are available.
metaResponseMeta
request_idstringUnique UUID for tracing and support.
endpointstringCanonical endpoint path.
cachedbooleanTrue if served from L1 Redis or L2 PostgreSQL 16 asset sink.
sourcestringData source tier (redis, pg, upstream_primary, upstream_fallback, oembed).
items_countintegerNumber of records returned in data.
credits_chargedintegerCredits deducted for this request ($1 = 10,000 Credits).
has_morebooleanWhether additional pages are available via next_cursor.
next_cursorstringnullContinuation cursor for the next page.
latency_msintegerEnd-to-end gateway latency in milliseconds.

Status Codes

200
Successful trending videos response