100 free credits. No credit card required. Get a key

YouTube trending videos API

The videos on YouTube’s trending shelves for music, sports, news or gaming (YouTube retired the Trending page in 2025).

GET /v1/youtube/trending/videosBeta2 credits per callRefunded on failure
import os, requests

res = requests.get(
    "https://api.groundsocial.dev/v1/youtube/trending/videos?category=music",
    headers={"Authorization": f"Bearer {os.environ['GROUNDSOCIAL_API_KEY']}"},
)
res.raise_for_status()
data = res.json()
Response
200 · 2 credits
{
"kind": "youtube#videoListResponse",
"items": [
{
"kind": "youtube#video",
"id": "UyNgewSEJBo",
"snippet": {
"publishedTimeText": "3 months ago",
"publishedAt": "2026-08-26T12:00:00.000Z",
"publishedAtIsApproximate": true,
"channelId": "UCRies0g4PwzR8wn4VMJCTNw",
"channelTitle": "mthu",
"title": "mthu - it's like i'm not even here (Official Music Video)",
"thumbnails": {
"default": {
"…": "3 fields"
},
"medium": {
"…": "3 fields"
},
"high": {
"…": "3 fields"
},
"standard": {
"…": "3 fields"
}
},
"liveBroadcastContent": "none"
},
"channel": {
"id": "UCRies0g4PwzR8wn4VMJCTNw",
"title": "mthu",
"handle": "@mthuonspotify",
"url": "https://www.youtube.com/@mthuonspotify",
"thumbnails": {
"default": {
"…": "3 fields"
},
"medium": {
"…": "3 fields"
},
"high": {
"…": "3 fields"
}
}
},
"statistics": {
"viewCount": "728000"
},
"statisticsAreApproximate": true,
"contentDetails": {
"duration": "PT1M40S",
"durationSeconds": 100
}
},
{
"kind": "youtube#video",
"id": "2Tp9lBaj7W8",
"snippet": {
"publishedTimeText": "1 month ago",
"publishedAt": "2026-10-25T12:00:00.000Z",
"publishedAtIsApproximate": true,
"channelId": "UCrigz9aEMzT3JwTOeIvCb-A",
"channelTitle": "Say Now",
"title": "Say Now - Hot & talking (Official Music Video)",
"thumbnails": {
"default": {
"…": "3 fields"
},
"medium": {
"…": "3 fields"
},
"high": {
"…": "3 fields"
},
"standard": {
"…": "3 fields"
}
},
"liveBroadcastContent": "none"
},
"channel": {
"id": "UCrigz9aEMzT3JwTOeIvCb-A",
"title": "Say Now",
"url": "https://www.youtube.com/channel/UCrigz9aEMzT3JwTOeIvCb-A",
"thumbnails": {
"default": {
"…": "3 fields"
},
"medium": {
"…": "3 fields"
},
"high": {
"…": "3 fields"
}
}
},
"statistics": {
"viewCount": "1800000"
},
"statisticsAreApproximate": true,
"contentDetails": {
"duration": "PT3M23S",
"durationSeconds": 203
}
},
"… 1 more"
],
"pageInfo": {
"resultsPerPage": 7
}
}

Parameters

NameTypeDescription
categoryquery"music" | "sports" | "news" | "gaming"One of music, sports, news, gaming.
regionquerystringISO 3166-1 alpha-2 country: the results a visitor there sees. Example: US.
Response fields

200 with a YouTubeVideoList, in the shape of YouTube Data API v3 resources.

FieldTypeDescription
kind"youtube#videoListResponse"
itemsYouTubeVideo[]
nextPageTokenstringPass as after for the next page. Absent on the last page. Lasts 6 hours.
pageInfoobject
missingobject[]Batch only: requested ids that did not resolve, and why.
Status codes
StatusMeaning
200The trending shelf’s videos.
400Invalid input. Nothing was charged.
401Missing or invalid API key.
402Not enough credits, a spend cap was reached, or payment is required.
403The target is private, or the account is suspended.
404The video, channel, playlist or post does not exist, was removed, or has nothing there.
429Too many requests. Wait for Retry-After seconds.
503YouTube is temporarily unavailable. Retryable; nothing was charged.

Every error has code, message, hint and retryable. All error codes

Questions

Why no general trending list?

YouTube removed it; the topic pages’ trending shelves are what a visitor sees now.

YouTube is a trademark of Google LLC. We are not affiliated with or endorsed by Google or YouTube.