Tracking what is breaking out on YouTube across different countries and verticals—news, gaming, sports, learning, courses, fashion, or shopping—requires more than a generic keyword search. You need the actual rank-ordered list YouTube displays on each category's trending page, along with channel metadata, view counts, video lengths, and thumbnails.
The SocQ YouTube Trending Videos API returns up to 50 ranked videos for a chosen category and two-letter country code in a single asynchronous request, billed strictly per returned video.
Quick answer: Send
category(news,gaming,sports,learning,courses,fashion, orshopping), an optional two-letterregion(defaultUS), andresults_limit(1–50, default50) toPOST /v1/youtube/trending-videos. PollGET /v1/tasks/{task_id}and readdata.results.items. Billing is 0.5 credits ($0.0025) per video returned, with 0 base fee (empty results cost $0).
Endpoint Overview and Pricing
SocQ bills at 1 credit = $0.005. This endpoint uses base_plus_result pricing with a zero base fee:
| Endpoint | Method & Path | Billing Mode | Price |
|---|---|---|---|
| YouTube Trending Videos API | POST /v1/youtube/trending-videos | Per result (baseCredits: 0) | 0.5 credits ($0.0025) / video (50 videos ≈ 25 credits / $0.125; 0 credits if empty) |
See the YouTube Trending Videos documentation for the full OpenAPI schema.
How This Differs from the Official YouTube Data API
The official YouTube Data API v3 provides videos.list(chart=mostPopular) with regionCode and numeric videoCategoryId. However, mostPopular does not mirror YouTube's newer vertical trending feeds such as courses, learning, fashion, or shopping in the same rank-ordered layout shown on YouTube's category pages, and it enforces daily quota budgets that quickly tighten when polling multiple countries on a schedule.
SocQ reads the category trending page directly for your target region, preserves the exact rank (starting at 1), and charges only for the videos actually returned—no OAuth setup or quota-extension requests required.
Request Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
category | string | Yes | — | One of news, gaming, sports, learning, courses, fashion, shopping. |
region | string | No | "US" | Two-letter ISO country code, such as US, GB, JP, or DE. |
results_limit | integer | No | 50 | Maximum number of trending videos to return (1 to 50). |
callback_url | string (URI) | No | — | Optional webhook URL notified when the task finishes. |
Submit a Request and Poll for Results
Authenticate with Authorization: Bearer $SOCQ_API_KEY.
1. Submit the trending-videos task
curl -X POST "https://api.socq.ai/v1/youtube/trending-videos" \
-H "Authorization: Bearer $SOCQ_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"category": "news",
"region": "US",
"results_limit": 50
}'
2. Poll the task until succeeded
curl "https://api.socq.ai/v1/tasks/$TASK_ID" \
-H "Authorization: Bearer $SOCQ_API_KEY"
Completed tasks return normalized trending-video items in rank order:
{
"code": 200,
"data": {
"task_id": "example-youtube-trending-videos",
"status": "succeeded",
"public_id": "youtube/trending-videos",
"result_count": 2,
"credits_amount": 1,
"results": {
"limit": 50,
"next_cursor": null,
"has_more": false,
"schema_id": "trending-video",
"schema_version": "1.0",
"items": [
{
"id": "X92BwhZZKOU",
"platform": "youtube",
"resource": "trending-videos",
"type": "video",
"url": "https://www.youtube.com/watch?v=X92BwhZZKOU",
"published_at": null,
"collected_at": "2026-11-20T08:10:17Z",
"rank": 1,
"category": "news",
"region": "US",
"title": "Historic or just a photo op? Reading Trump's Xi-Putin summit",
"text": "US President Donald Trump hailed his unprecedented three-way summit...",
"author": {
"id": "UChqUTb7kYRX8-EiaN3XFrSQ",
"username": "Reuters",
"name": "Reuters",
"url": "https://www.youtube.com/@Reuters",
"avatar_url": "https://example.com/reuters-avatar.jpg",
"is_verified": true,
"is_private": null
},
"metrics": {
"views_count": 387
},
"duration_seconds": 177,
"thumbnail_url": "https://i.ytimg.com/vi/X92BwhZZKOU/hqdefault.jpg",
"published_time_text": "15 min ago"
}
]
}
}
}
Standard Result Fields
| Field | Type | Nullable | Description |
|---|---|---|---|
id | string | Yes | YouTube video ID. |
url | string | Yes | Full YouTube watch URL. |
rank | integer | Yes | Position on the category trending page, starting at 1. |
category | string | Yes | Requested trending category (news, gaming, etc.). |
region | string | Yes | Two-letter country code of the trending page. |
title | string | Yes | Video title. |
text | string | Yes | Description snippet shown on the trending page. |
author | object | Yes | Publishing channel (id, username, name, url, avatar_url, is_verified, is_private). |
metrics.views_count | integer | Yes | View count shown on the trending page. |
duration_seconds | number | Yes | Video length in seconds. |
thumbnail_url | string | Yes | Video thumbnail URL. |
published_time_text | string | Yes | Relative age displayed by YouTube (for example, 15 min ago or 3h ago). |
published_at | string | Yes | ISO 8601 publish timestamp when provided by the source (null if YouTube only displays relative text). |
collected_at | string | No | ISO 8601 timestamp when SocQ collected the item. |
Practical Workflows
- Scheduled rank-velocity tracking: Poll the same
categoryandregionevery hour and store(collected_at, id, rank, metrics.views_count)to spot fast-rising topics and channels holding top spots. - Cross-market content discovery: Run
gamingorfashionacrossUS,GB,JP, andKRto detect formats trending in one country before they break out in another. - Downstream transcript & comment pipelines: Pass top-ranked video URLs into our YouTube Transcripts API or other endpoints covered in our YouTube API New Endpoints 2026 guide to summarize breaking coverage automatically.
Frequently Asked Questions
Why is published_at sometimes null while published_time_text is populated?
YouTube's trending page often displays relative ages such as 15 min ago or 1 hr ago rather than an exact UTC timestamp. SocQ preserves the source string in published_time_text and leaves published_at as null instead of guessing an approximate timestamp.
How can I control spend per request?
Set results_limit between 1 and 50. Because billing is 0.5 credits ($0.0025) per returned video with zero base fee, requesting the top 10 videos costs at most 5 credits ($0.025).
What happens if a category returns zero videos for a region?
Because baseCredits is 0 and emptyResultPolicy is base_only, an empty result costs 0 credits ($0).
Which categories are supported?
Seven categories are accepted: news, gaming, sports, learning, courses, fashion, and shopping.
YOUTUBE API
Test the workflow with a public YouTube URL
Submit public inputs and receive normalized records with traceable source context.
Explore YouTube APIs