YouTube trending feed scraper skill for AI agents
Get video lists for YouTube's Gaming, Music, News, Movies and Trending sections in any of 31 regional markets, with views, duration and channel details; rows from a fallback search are labeled.
What the skill does
It tells your agent when a request fits the YouTube Trending Feed Extractor by Category & Market Actor, which input to send and which fields come back (source, title, channel, chart views and 66 more). The agent runs it through the Apify API with your token and gets JSON rows.
Skill files updated 2026-11-14.Install by hand
Save the five files into a folder named youtube-trending-feed-extractor-by-category-and-market: ~/.claude/skills/youtube-trending-feed-extractor-by-category-and-market/ for Claude Code, ~/.agents/skills/youtube-trending-feed-extractor-by-category-and-market/ for Codex and most other agents.
- SKILL.mdWhen to use the skill, the input and the fields it returns, 5.7 KB
- scripts/run.mjsRuns the Actor with your token (Node 18 or later), 1.2 KB
- references/example-input.jsonA starter input that passes the Actor's schema, 121 bytes
- references/input-schema.jsonEvery input setting the Actor accepts, 9.2 KB
- references/output-fields.jsonEvery field the Actor declares, 2.0 KB
The same five files as one download: youtube-trending-feed-extractor-by-category-and-market.zip (6.7 KB).
Run it
Ask your agent in plain words, for example "YouTube trending feed scraper", and it picks the skill from its description. Or run the script yourself:
export APIFY_TOKEN=your_apify_token
cd youtube-trending-feed-extractor-by-category-and-market # the skill folder
node scripts/run.mjs # the example input
node scripts/run.mjs my-input.json # your own input Without an argument the script uses references/example-input.json. It waits for the run and prints the rows as JSON; for long runs SKILL.md shows the async API calls.
What it returns
| Field | What it is |
|---|---|
| sourceName | Source |
| title | Title |
| channelName | Channel |
| chartViewCount | Chart Views |
| viewCount | Lifetime Views |
| countryCode | Country |
| chartType | Chart |
| url | URL |
| status | Status |
Read SKILL.md
Show the whole file (5.7 KB)
---
name: youtube-trending-feed-extractor-by-category-and-market
description: "Get video lists for YouTube's Gaming, Music, News, Movies and Trending sections in any of 31 regional markets, with views, duration and channel details; rows from a fallback search are labeled. Output fields: sourceName, title, channelName, chartViewCount, viewCount and more, as JSON rows. Use it for requests like \"YouTube trending feed scraper\", or a CSV/JSON export of public YouTube data."
---
# YouTube Trending Feed Extractor by Category & Market
Get video lists for YouTube's Gaming, Music, News, Movies and Trending sections in any of 31 regional markets, with views, duration and channel details; rows from a fallback search are labeled.
- Actor: https://apify.com/nimbryxo-studio/youtube-trending-feed-extractor-by-category (ID `nimbryxo-studio~youtube-trending-feed-extractor-by-category`)
- n8n workflow for the same Actor: https://scraperfinder.com/n8n/youtube-trending-feed-extractor-by-category-and-market/
- Example input: `references/example-input.json`
- Input schema: `references/input-schema.json`
- Output fields: `references/output-fields.json`
## When to use
Use this skill when the user wants:
- YouTube trending feed scraper
- a repeatable export of public YouTube data as CSV or JSON
Do not use it for private, login-protected or paywalled data.
## What it returns
One JSON row per result. Columns from the Actor's dataset schema:
- `sourceName`: Source
- `title`: Title
- `channelName`: Channel
- `chartViewCount`: Chart Views
- `viewCount`: Lifetime Views
- `countryCode`: Country
- `chartType`: Chart
- `url`: URL
- `status`: Status
All 70 declared fields: `references/output-fields.json`.
## Inputs
| Field | Type | Required | Default | Notes |
|---|---|---|---|---|
| `mode` | string | yes | charts | What to read. 'charts' uses YouTube's official music, trailer and podcast charts. 'hubs' uses YouTube's category pages such as Gaming trending, News, Sports, Learning and Courses. |
| `charts` | array | no | ["trendingVideos"] | One or more YouTube charts. Trending music videos is the official replacement for the retired general Trending page. |
| `categories` | array | no | ["gaming"] | One or more category pages. Gaming trending and Gaming live return up to 50 videos. News reads the selected news sections. |
| `newsSections` | array | no | ["top"] | Which News tabs to read. 'Top stories' is the main /news page; the other sections are direct news-destination feeds. Available sections vary by country. |
| `countries` | array | no | ["US"] | One or more markets. The 68 YouTube Charts markets are supported; 'global' is supported only for charts that publish a global ranking (top videos, top songs, top artists, Shorts… |
| `period` | string | no | daily | Daily or weekly ranking. Weekly-only charts automatically use weekly. Current-only charts such as Trending music videos and Trending movie trailers ignore this setting. |
| `date` | string | no | | Historical chart date in YYYY-MM-DD format. Leave empty for the latest chart. Supported by Top music videos, Top songs, Top artists and Shorts songs; current-only charts ignore it. |
| `maxItems` | integer | no | 100 | Total data rows to return across all charts, categories and countries. |
| `maxItemsPerChart` | integer | no | 100 | Rows to take from each chart/country or category/country combination. Source ceilings still apply. |
| `includeVideoDetails` | boolean | no | true | Fetch exact lifetime views, likes, upload dates and descriptions for every video. YouTube category, tags, Shorts eligibility and family-safe flags are filled when YouTube's player… |
| `maxConcurrency` | integer | no | 5 | How many exact-detail requests may run in parallel. |
| `onlyNew` | boolean | no | false | Skip rows already emitted by a previous run with the same monitor name. |
| `monitorName` | string | no | default | Separate only-new histories by monitor name. |
Example (`references/example-input.json`):
```json
{
"maxItems": 25,
"maxItemsPerChart": 3,
"includeVideoDetails": false,
"maxConcurrency": 3,
"mode": "charts"
}
```
The input passes the Actor's input schema (checked at every publish). First run: `maxItems` = 25, small enough for the 300-second sync wait; raise it once the rows look right.
## Run it
Set `APIFY_TOKEN`, then call the synchronous endpoint for small and medium runs (it waits up to 300 seconds):
```bash
curl -s -X POST "https://api.apify.com/v2/acts/nimbryxo-studio~youtube-trending-feed-extractor-by-category/run-sync-get-dataset-items" \
-H "Authorization: Bearer $APIFY_TOKEN" \
-H "Content-Type: application/json" \
-d @references/example-input.json > output.json
```
Or with Node 18+: `node scripts/run.mjs [input.json]`.
For large runs, start an async run and read its dataset when it finishes:
```bash
RUN=$(curl -s -X POST "https://api.apify.com/v2/acts/nimbryxo-studio~youtube-trending-feed-extractor-by-category/runs" \
-H "Authorization: Bearer $APIFY_TOKEN" -H "Content-Type: application/json" \
-d @references/example-input.json)
RUN_ID=$(echo "$RUN" | jq -r '.data.id'); DATASET=$(echo "$RUN" | jq -r '.data.defaultDatasetId')
curl -s "https://api.apify.com/v2/actor-runs/$RUN_ID?waitForFinish=60" -H "Authorization: Bearer $APIFY_TOKEN" | jq -r '.data.status'
curl -s "https://api.apify.com/v2/datasets/$DATASET/items?format=json" -H "Authorization: Bearer $APIFY_TOKEN" > output.json
```
## Cost and limits
- Apify bills the Actor's usage on your account; the Actor's Pricing tab shows the current price.
- Keep the limit in the input small for a first run.
## Guardrails
- Public data only. Do not pass cookies, sessions or private account data.
- Do not use the output for spam, harassment or unlawful discrimination.
- Check the target site's terms and local law before running at scale.
Same Actor, other ways
- The youTube trending feed scraper n8n workflow: the same job as a scheduled n8n workflow, imported from a URL.
- YouTube Trending Feed Extractor by Category & Market: fields, inputs and price per plan.
- YouTube Trending Feed Extractor by Category & Market in the Apify Store.
Questions people ask
Which agents can use this skill?
Any agent that reads Agent Skills folders: Claude Code, Codex, Cursor, Gemini CLI and the other agents the skills CLI installs into. The skill is a SKILL.md file plus a small Node script, so an agent without skill support can still follow the file by hand.
Does the skill cost anything?
The skill is free. Running it starts the YouTube Trending Feed Extractor by Category & Market Actor on your own Apify account, which bills the run at the Actor's Store price; the Apify Free plan includes $5 of usage a month.
What does npx skills add install?
The whole folder: SKILL.md, scripts/run.mjs and the three reference files, downloaded from this site and checked against the SHA-256 digest in scraperfinder.com/.well-known/agent-skills/index.json. Add -g to install it for every project.