# YouTube Trending Scraper: Trending Charts as JSON | Scrapier (https://scrapier.io/scrapers/youtube/trending/)

> YouTube Trending Scraper API: trending charts by country as JSON with chart position, views, likes and channel. 1 credit per page. Get a free API key.

Last updated: 2026-11-10

**GET**/api/v2/youtube-trending/

## YouTube Trending Scraper

YouTube's trending charts by country as typed JSON: music, trailers, gaming and more, with chart position, title, views, likes, channel and publish date. Pass a country code. 1 credit per page. No YouTube login.

[Get a free API key →](https://app.scrapier.io/sign-up) [View API docs](https://scrapier.io/scrapers/youtube/trending/api/)

Free API key · 1 credit per page of trending videos · failed calls free

Last updated 9 Nov 2026

// GET /api/v2/youtube-trending/?country\_code=US · sample from the catalog
{
  "success": true,
  "data": {
    "country\_code": "US",
    "content\_type": "music",
    "page": 1,
    "page\_size": 25,
    "videos": \[
      {
        "type": "video",
        "id": "V-uIp-WuD60",
        "video\_id": "V-uIp-WuD60",
        "title": "Patient Zero",
        "status": "OK",
        "url": "https://www.youtube.com/watch?v=V-uIp-WuD60",
        "description": "Provided to YouTube by Universal Music Group\\n\\nPatient Zero · Taylor Swift\\n\\nThe Life of a Showgirl: The Encore\\n\\n℗ 2026 Taylor Swift\\n\\nReleased on: 2026-09-25\\n\\nCom",
        "duration": 226,
        "views": "6722880",
        "view\_count": 6722880,
        "likes": "95077",
        "like\_count": 95077,
        "comments": null
      }
    \],
    "next\_cursor": "eyJjdCI6Im11c2ljIiwiaSI6IlVTIiwicCI6Miwic24iOlsiMGExYjJjIl19"
  }
}

Copy for your AI agent

Pricing

[1 credit / page of trending videos](https://scrapier.io/pricing/)

From $1.58 per 1,000 on Pro

Endpoint facts

Credits per call**1**

Pagination**cursor**

YouTube login**Not needed**

Format**JSON**

Auth

`X-API-Key: <your key>`

MCP tool

`run_scrape · youtube-trending`

One of six tools in the Scrapier MCP server, which reach all 199 endpoints.

Platform

[YouTube: 17 endpoints →](https://scrapier.io/scrapers/youtube/)

Quick answer

Scrapier's YouTube Trending Scraper returns YouTube's trending charts for a country as JSON, a page at a time: `trending_position`, `title`, `view_count`, `like_count`, `channel_name` and `published_at`. It costs 1 credit per successful call. No YouTube login.

Every request is fetched live at call time · failed calls are free

YouTube Trending Scraper extracts a trending chart per call: rank, video title and URL, views, likes, channel, category, publish date, thumbnails and, for music, the artists. Choose the country with country\_code and the chart with content\_type: music, movies (trailers), top music videos, gaming, sports, news, live, learning or fashion. Every response is structured JSON, ready to pass directly to an LLM, index into a vector store or feed a trend-tracking pipeline. It is one of 17 YouTube endpoints on the same API key used by 12,000+ developers. Follow next\_cursor to read the next page.

## What data can I extract with YouTube Trending Scraper?

Using this YouTube Trending Scraper, you can extract the following data from public YouTube pages of trending videos:

Chart position

Video title and URL

View count and like count

Channel name, ID and details

Category and chart type

Publish and upload dates

Duration in seconds

Keywords and artists

Thumbnails with width and height

Previous position and periods on chart

Live, family-safe, embeddable flags

Embed URL

Country and chart you asked for

Want the exact field names? See the [example output](#output).

Playground

## Try YouTube Trending Scraper Live

Press **Run** to see the catalog sample. Add your API key and it runs a real call to the Scrapier API from your browser. The key is sent only to proxy.scrapier.io and never stored.

YouTube**YouTube Trending**Live

Platform

Endpoint

Parameters

### \+ Run live with your API key

Response

Sample dataCatalog sample, run to see live data

## How to use YouTube Trending Scraper

Hand it to your AI assistant, or run it yourself in five steps.

### Copy to your AI assistant

Paste this into ChatGPT, Claude or Cursor and it knows how to call the scraper.

Use the Scrapier YouTube Trending Scraper to get public YouTube pages of trending videos. Endpoint: GET https://proxy.scrapier.io/api/v2/youtube-trending/?country\_code={country\_code} with header "X-API-Key: YOUR\_API\_KEY" and a 210-second timeout. Send one value per call in country\_code; for a list, make one call per value, at most 3 in parallel. It returns JSON under data.videos: type, id, video\_id, title, status, url, description, duration, views, view\_count, likes, like\_count. Each successful call costs 1 credit; failed calls are free. If you support MCP, run: claude mcp add -t http scrapier https://mcp.scrapier.io/mcp --header "X-API-Key: YOUR\_API\_KEY" and call run\_scrape with endpoint "youtube-trending" (find it with search\_endpoints).

**YouTube Trending Scraper MCP Server**

Use this scraper from ChatGPT, Claude or Cursor. Point your assistant at Scrapier and it reads YouTube pages of trending videos on its own: no glue code, no scraping logic in your prompts.

[MCP setup →](https://scrapier.io/scrapers/youtube/trending/mcp/)

### Run it yourself

1. **Get your free Scrapier API key**Sign up at [app.scrapier.io](https://app.scrapier.io/sign-up); the free tier lets you try it first.
2. **Open YouTube Trending Scraper in the catalog**It lives under [Scrapers / YouTube](https://scrapier.io/scrapers/youtube/).
3. **Enter the country and the chart**For example `US` in `country_code` and `music` in `content_type`. Other charts are `movies`, `top_music_videos`, `gaming`, `sports`, `news`, `live`, `learning` and `fashion`.
4. **Send your API request**One GET with your key in the `X-API-Key` header, or one `run_scrape` call from your agent. Set a 210-second client timeout.
5. **Save your results**Each page comes back as JSON in `data.videos`: store it as is, or flatten it to CSV. Pass `data.next_cursor` back to get the next page until it is null.

### How to scale to bulk YouTube pages of trending videos

`country_code` takes one country per call, and `content_type` one chart, so for several markets you loop: one request per country and chart. Within a chart, pass back `data.next_cursor` to read the next page. Run up to 3 requests in parallel per API key; above that the API answers 429 with a `Retry-After` header, and throttled calls cost nothing. Each page is 1 credit and failed calls are free, so 1,000 pages cost 1,000 credits, inside the Hobby plan's 15,000.

## Features

YouTube Trending Scraper reads what is climbing the charts in any country. It suits trend research, music tracking, content planning and any workflow that needs a ranked list of what YouTube viewers are watching now, with the numbers attached.

It extracts, per page of trending videos

- **Rank**`trending_position`, plus `previous_position` and `periods_on_chart` when available
- **Reach**`view_count` and `like_count` as numbers
- **Charts**`content_type` selects music, trailers, gaming, sports, news and more
- **Markets**`country_code` selects the country of the chart
- **Details**`category`, `duration`, `keywords` and `artists`
- **Channel**`channel_name`, `channel_id` and a `channel` object

Proxies, retries and parsing run on Scrapier's side, so you send one request and get JSON back, at **1 credit per page of trending videos** and **0 credits for a failed call**.

## Use cases

- **Music label analyst** pulls the music chart for ten countries every day and tracks where an artist's `trending_position` rises.
- **Content strategist** checks the gaming and news charts weekly to see which formats reach viewers right now.
- **Trend newsletter** builds a weekly list of the top trailers from `content_type` movies, with views and publish dates.
- **Researcher** stores daily chart snapshots into a dataset, one row per ranked video, for a study of how long videos stay trending.
- **AI engineer** gives an agent a tool that returns today's chart for a country, so it can answer "what is trending in Japan" from live data with `scraped_at`.

Running these from an agent? Use the [MCP integration](https://scrapier.io/scrapers/youtube/trending/mcp/) and let Claude or Cursor call the scraper directly.

## Why choose this Scraper API?

**Charts by country and type.**

`country_code` and `content_type` pick the market and the chart, from music and trailers to gaming, sports and news.

**Ranked, with the numbers.**

Every row has `trending_position`, `view_count` and `like_count` as typed fields, so sorting and charting need no text parsing.

**One envelope, 17 YouTube endpoints.**

Trending, video details, hashtag and search endpoints share the same key and response envelope, so a chart feeds the next call without new code.

## Input

The scraper takes one country per call in `country_code`, a two-letter code such as US, GB or IN. It is required on the first call and ignored once you pass a `cursor`. `content_type` picks the chart and is locked in the cursor; an invalid value returns 400. Send parameters in the query string (GET) or as a JSON body (POST).

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `country_code` | string | Yes | — | Two-letter ISO country code, such as US, BD, IN or GB. One per call. Required on the first call; ignored when `cursor` is supplied. Alias: `country` |
| `cursor` | string | No | — | Pass back `data.next_cursor` from the previous response to get the next page; `null` means the last page |
| `content_type` | string | No | `music` | The chart: `music` (default, 30 videos; regions without that chart fall back to daily top music videos), `movies` (trending trailers, 30), `top_music_videos` (100), `gaming`, `sports`, `news`, `live`, `learning` or `fashion`. Invalid value returns 400. Locked in the cursor. Alias: `category` |
| `use_proxy` | boolean | No | `true` | Route through Scrapier's residential proxy pool. Leave as is |
| `raw_data` | boolean | No | `false` | Return YouTube's raw upstream payload under `raw_responses` instead of the formatted items |

One country and one chart per call: to cover ten markets, make ten calls and page each with `cursor`. Booleans are the strings `true` or `false`.

### Example input

POST body · input.json

{
  "country\_code": "US",
  "content\_type": "music",
  "use\_proxy": "true",
  "raw\_data": "false"
}

### Error codes

| Status | Meaning | Billed | Fix |
| --- | --- | --- | --- |
| 200 | Page of trending videos data returned in `data.videos` | Yes | — |
| 400 | Bad or missing input | No | Check `country_code`: one value per call |
| 401 | `X-API-Key` header missing | No | Add the header |
| 402 | Out of credits (body has `balance`) | No | Top up; retrying will not help |
| 403 | Invalid or revoked API key | No | Check the key in your dashboard |
| 429 | Throttled | No | Wait `Retry-After` seconds, then retry |
| 5xx | Upstream failure or timeout | No | Retry with backoff; set a 210 s client timeout |

From the [error reference](https://docs.scrapier.io/errors/). Any non-2xx response costs 0 credits.

## Output

Typed JSON with the same schema on every call. One call returns a page of ranked videos under `videos`, each with 44 fields, inside the standard `data` envelope. Some fields appear twice, as a string and a number, such as `views` and `view_count`, and some are null when the chart has no value. Field names stay the same on every call. Set `raw_data` to true if you want YouTube's raw payload instead.

### Example output

200 OK · 1 credit · catalog sample

{
  "success": true,
  "data": {
    "country\_code": "US",
    "content\_type": "music",
    "page": 1,
    "page\_size": 25,
    "videos": \[
      {
        "type": "video",
        "id": "V-uIp-WuD60",
        "video\_id": "V-uIp-WuD60",
        "title": "Patient Zero",
        "status": "OK",
        "url": "https://www.youtube.com/watch?v=V-uIp-WuD60",
        "description": "Provided to YouTube by Universal Music Group\\n\\nPatient Zero · Taylor Swift\\n\\nThe Life of a Showgirl: The Encore\\n\\n℗ 2026 Taylor Swift\\n\\nReleased on: 2026-09-25\\n\\nCom",
        "duration": 226,
        "views": "6722880",
        "view\_count": 6722880,
        "likes": "95077",
        "like\_count": 95077,
        "comments": null,
        "channel": {
          "id": "UCPC0L1d253x-KuMNwa05TpA",
          "name": "Taylor Swift - Topic",
          "handle": null,
          "url": "https://www.youtube.com/channel/UCPC0L1d253x-KuMNwa05TpA",
          "subscriber\_count": null,
          "thumbnails": \[\],
          "badges": \[\]
        },
        "channel\_id": "UCPC0L1d253x-KuMNwa05TpA",
        "channel\_name": "Taylor Swift - Topic",
        "keywords": \[
          "Taylor Swift",
          "テイラースウィフト",
          "テイラー・スウィフト"
        \],
        "is\_ratings\_allowed": true,
        "is\_live": false,
        "is\_live\_content": false,
        "is\_family\_safe": true,
        "category": "Music",
        "is\_private": false,
        "is\_exclusive": false,
        "thumbnails": \[
          {
            "url": "https://i.ytimg.com/vi/V-uIp-WuD60/maxresdefault.jpg",
            "width": 1920,
            "height": 1080
          }
        \],
        "embed\_url": "https://www.youtube.com/embed/V-uIp-WuD60",
        "is\_embeddable": true,
        "is\_unlisted": false,
        "publish\_date": "2026-09-24T21:02:10-07:00",
        "published\_at": "2026-09-24T21:02:10-07:00",
        "relative\_date": null,
        "upload\_date": "2026-09-24T21:02:10-07:00",
        "trending\_position": 1,
        "previous\_position": null,
        "periods\_on\_chart": null,
        "chart\_view\_count": null,
        "artists": \[
          "Taylor Swift"
        \],
        "release\_date": "2026-09-24",
        "country\_code": "US",
        "content\_type": "music",
        "source": "youtube\_charts",
        "chart\_type": "TRENDING\_VIDEOS",
        "enriched": true,
        "scraped\_at": "2026-10-03T04:28:40.122Z"
      }
    \],
    "next\_cursor": "eyJjdCI6Im11c2ljIiwiaSI6IlVTIiwicCI6Miwic24iOlsiMGExYjJjIl19"
  }
}

The catalog's sample response for `country_code=US`, labelled as a sample: live calls return the account's current values.

### Video

| Field | Type | Example | Description |
| --- | --- | --- | --- |
| `videos.type` | string | `"video"` | Record type, video in the sample |
| `videos.id` | string | `"V-uIp-WuD60"` | YouTube video ID |
| `videos.video_id` | string | `"V-uIp-WuD60"` | YouTube video ID (same value as id) |
| `videos.title` | string | `"Patient Zero"` | Title of the video |
| `videos.status` | string | `"OK"` | Availability status, OK in the sample |
| `videos.url` | string | `"https://www.youtube.com/watch?v=V-uIp-WuD60"` | Watch URL |
| `videos.description` | string | `"Provided to YouTube by Universal Music Grou…"` | Video description text |
| `videos.duration` | integer | `226` | Length in seconds |
| `videos.category` | string | `"Music"` | YouTube category, such as Music |
| `videos.keywords` | array | `5 items` | List of keywords of the video |
| `videos.artists` | array | `1 items` | List of artist names for music |
| `videos.release_date` | string | `"2026-09-24"` | Release date (YYYY-MM-DD) |

### Reach and engagement

| Field | Type | Example | Description |
| --- | --- | --- | --- |
| `videos.views` | string | `"6722880"` | View count as a string |
| `videos.view_count` | integer | `6722880` | View count as a number |
| `videos.likes` | string | `"95077"` | Like count as a string |
| `videos.like_count` | integer | `95077` | Like count as a number |
| `videos.comments` | null | `null` | Comment count; null when not available |

### Chart position

| Field | Type | Example | Description |
| --- | --- | --- | --- |
| `videos.trending_position` | integer | `1` | Rank on the chart |
| `videos.previous_position` | null | `null` | Previous rank; null when not available |
| `videos.periods_on_chart` | null | `null` | Periods on the chart; null when not available |
| `videos.chart_view_count` | null | `null` | Chart view count; null when not available |
| `videos.chart_type` | string | `"TRENDING_VIDEOS"` | Chart kind, such as TRENDING\_VIDEOS |
| `videos.source` | string | `"youtube_charts"` | Where the chart comes from, youtube\_charts in the sample |
| `videos.enriched` | boolean | `true` | true when details were added to the chart row |
| `videos.country_code` | string | `"US"` | Country of the chart |
| `videos.content_type` | string | `"music"` | Chart type you asked for |

### Channel

| Field | Type | Example | Description |
| --- | --- | --- | --- |
| `videos.channel` | object | `{…}` | Channel object: id, name, handle, url, subscriber\_count, thumbnails, badges |
| `videos.channel_id` | string | `"UCPC0L1d253x-KuMNwa05TpA"` | UC channel ID |
| `videos.channel_name` | string | `"Taylor Swift - Topic"` | Channel name |

### Dates

| Field | Type | Example | Description |
| --- | --- | --- | --- |
| `videos.publish_date` | string | `"2026-09-24T21:02:10-07:00"` | Publish date with time zone offset |
| `videos.published_at` | string | `"2026-09-24T21:02:10-07:00"` | Publish time (ISO 8601) |
| `videos.relative_date` | null | `null` | Relative date text; null in the sample |
| `videos.upload_date` | string | `"2026-09-24T21:02:10-07:00"` | Upload time (ISO 8601) |
| `videos.scraped_at` | string | `"2026-10-03T04:28:40.122Z"` | When Scrapier read the chart (ISO 8601, UTC) |

### Flags and media

| Field | Type | Example | Description |
| --- | --- | --- | --- |
| `videos.is_ratings_allowed` | boolean | `true` | true when ratings are allowed |
| `videos.is_live` | boolean | `false` | true when the video is live |
| `videos.is_live_content` | boolean | `false` | true for live or past-live content |
| `videos.is_family_safe` | boolean | `true` | true when marked family safe |
| `videos.is_private` | boolean | `false` | true when the video is private |
| `videos.is_exclusive` | boolean | `false` | true when the video is exclusive |
| `videos.is_embeddable` | boolean | `true` | true when the video can be embedded |
| `videos.is_unlisted` | boolean | `false` | true when the video is unlisted |
| `videos.thumbnails` | array | `1 items` | List of thumbnails with url, width and height |
| `videos.embed_url` | string | `"https://www.youtube.com/embed/V-uIp-WuD60"` | Embeddable player URL |

### Response envelope and paging

| Field | Type | Example | Description |
| --- | --- | --- | --- |
| `success` | boolean | `true` | true on every 200 response |
| `data.country_code` | string | `"US"` | Country of the chart |
| `data.content_type` | string | `"music"` | Chart you asked for |
| `data.page` | integer | `1` | Page number of this response |
| `data.page_size` | integer | `25` | Videos per page |
| `data.next_cursor` | string | `"eyJjdCI6Im11c2ljIiwiaSI6IlVTIiwicCI6Miwic24…"` | Pass back as cursor for the next page; null on the last page |

## How does it work?

01

Scrapier sends each request through its residential proxy pool (`use_proxy`, on by default), so you never manage IPs or proxy accounts.

02

Retries and parsing of YouTube's pages and responses happen on Scrapier's side. You send one HTTP request and get typed JSON back.

03

Only publicly visible data is returned: what any visitor sees without signing in. No YouTube account, cookie or Google API key is used for this endpoint.

04

The schema is stable. When YouTube changes, Scrapier updates the scraper; the field names under `videos` stay the same.

## How do you integrate YouTube Trending Scraper into your stack?

It works with what you already use: any HTTP client, AI agents over MCP, and no-code automation tools. Code samples for cURL, Python and Node.js are on the [API tab](https://scrapier.io/scrapers/youtube/trending/api/).

### MCP integration for AI agents

claude mcp add -t http scrapier …

This registers the Scrapier MCP server, whose tools reach every Scrapier scraper, including `youtube-trending`: the agent finds it with `search_endpoints` and calls it with `run_scrape`. Works with Claude Code, Cursor and Windsurf. MCP calls are billed like REST: 1 credit per successful call. [Full MCP setup →](https://scrapier.io/scrapers/youtube/trending/mcp/)

### No-code tools (n8n, Make, LangChain)

**n8n**

Use the HTTP Request node with your Scrapier API key in an `X-API-Key` header and point it at `/api/v2/youtube-trending/` with a `country_code` query parameter. Map `data.videos` into the next node.

**Make**

Add an HTTP "Make a request" module with the same header and URL, and parse the response as JSON. Map `trending_position` and `view_count` straight into Sheets, Airtable or your CRM.

**LangChain**

Wrap the endpoint in a `requests`\-based tool, or load the Scrapier MCP server through LangChain's MCP adapters so the agent finds `youtube-trending` with `search_endpoints` itself.

## Pricing and Rate Limits

One YouTube page of trending videos costs 1 credit, so 1,000 pages of trending videos cost 1,000 credits: $1.58 on the Pro plan. Failed and empty calls are not billed. Run up to 3 requests in parallel per key; above that the API answers 429 with a `Retry-After` header.

| Plan | Monthly price | Credits | Pages of trending videos included | Per 1,000 pages of trending videos |
| --- | --- | --- | --- | --- |
| Hobby | $29 | 15,000 | 15,000 | $1.93 |
| Pro | $79 | 50,000 | 50,000 | $1.58 |
| Scale | $299 | 250,000 | 250,000 | $1.20 |
| Enterprise | [Custom volume and terms](https://scrapier.io/enterprise/#contact) |

Prices from the live billing page. [See all plans and limits](https://scrapier.io/pricing/).

## Call cost and timing

**1**credit per successful call

**0**credits for a failed call

**3**parallel requests per key

**210s**recommended client timeout

### How we measure this

Credit cost, pagination and the sample come from the live catalog (`GET /api/v2/endpoints`, /youtube-trending/, checked 9 Nov 2026). Concurrency and timeout guidance come from the [rate limits page](https://docs.scrapier.io/rate-limits/) of the docs. Scrapier does not publish latency or success-rate figures for this endpoint, so none are shown here.

## YouTube Trending Scraper vs the Official YouTube API

| Feature | Scrapier page of trending videos scraper | Official YouTube API |
| --- | --- | --- |
| Access needed | One Scrapier API key | A Google Cloud project, an API key and a daily quota |
| Which charts | Music, trailers, top music, gaming, sports, news, live, learning and fashion, by country | A most-popular videos list by region and category through the videos resource |
| Fields returned | 44 fields per ranked video, including chart position and artists | Depends on the resource and parts you request |
| Rate limits | Up to 3 parallel requests per key; 429 with Retry-After | Daily quota units set per Google Cloud project |
| Setup | Sign up, copy a key, send a request | Create a project, enable the API, create credentials |
| Cost | 1 credit per page, from $1.20 per 1,000 pages | Free within quota; more needs a quota extension request |

The official YouTube Data API is the better choice when you build an app that must follow Google's API terms and only needs its most-popular list.

## Is it legal to scrape YouTube data?

Scraping publicly available YouTube data is generally lawful in many countries, but the answer depends on what you collect, where you are and how you use it. In the US, hiQ Labs v. LinkedIn is the case most often cited on public-data scraping. Scrapier returns only data any visitor can see without logging in. Under GDPR and similar laws, collecting public data can be permissible, but how you store and use personal data, such as names or comment text, must still comply with local data-protection rules, and YouTube's terms apply. Consult legal counsel if your use case involves bulk storage of personal data. This is not legal advice; see our [Terms of Use](https://scrapier.io/terms/).

## Frequently asked questions

### What fields does YouTube Trending Scraper return?

Each ranked video has trending\_position, title, url, view\_count, like\_count, channel\_name, category, duration, published\_at, thumbnails, artists and more: 44 fields in data.videos. Each successful call costs 1 credit and needs no YouTube login.

### Which trending charts can I choose?

Set content\_type to music (the default), movies for trailers, top\_music\_videos, gaming, sports, news, live, learning or fashion. Music and trailers return 30 videos, top music videos returns 100. An invalid value returns 400.

### Which countries are supported?

country\_code takes a two-letter ISO code such as US, BD, IN or GB. For regions without a music chart, the catalog says the endpoint falls back to the daily top music videos. Check the rows of your own call for a given market.

### Why are some fields null?

Some chart fields, such as comments, previous\_position, periods\_on\_chart and chart\_view\_count, are null in the catalog sample when the chart does not provide a value. Treat them as optional in your code.

### Does YouTube Trending Scraper require a YouTube account or login?

No. The YouTube Trending Scraper uses no YouTube account or cookies: you send your Scrapier API key in the X-API-Key header and a country code, and get JSON back. Only public YouTube data is returned, and no Google API key or quota is involved.

### How fast does YouTube Trending Scraper run?

Scrapier does not publish a latency figure for this endpoint. Each call reads YouTube live, and scraped\_at in the response records when. Set a client timeout of 210 seconds, as the docs recommend for every endpoint.

### What happens if the input is wrong or YouTube returns nothing?

If a call fails, the API returns a non-2xx status and costs 0 credits. In code, check the status, then skip that input or retry it later. Throttled calls (429 with a Retry-After header) are free as well, so retry loops cost nothing.

### Does YouTube Trending Scraper work with Claude, ChatGPT and other AI agent tools?

Yes. Connect the Scrapier MCP server with claude mcp add -t http scrapier https://mcp.scrapier.io/mcp and your API key in an X-API-Key header; it works in Claude Code, Cursor and Windsurf. The agent finds youtube-trending with search\_endpoints and calls it with run\_scrape. Any agent that can call an HTTP endpoint can use the REST API directly.

### How does it compare to other YouTube scrapers?

Scrapier charges a flat 1 credit per successful call, and failed calls are free; platforms that bill compute units vary with run time and infrastructure. The same API key and MCP server reach all 199 Scrapier endpoints. Scrapier returns structured JSON for public YouTube data.

### Does it return data in a format LLMs can use directly?

Yes. Every response is typed JSON with the same field names on every call: no HTML parsing and no selectors. Pass it straight to an LLM, index it into a vector store or return it from an agent tool.

### What happens when YouTube changes its layout or anti-bot system?

Scrapier maintains the scraper. When YouTube changes its pages or internal responses, Scrapier updates it, and your calls keep returning the same JSON field names without changes on your end.

### How much does it cost to run YouTube Trending Scraper 1,000 times?

1,000 credits, because each call is 1 credit. That is about $1.93 on Hobby, $1.58 on Pro and $1.20 on Scale, at the plans' price per credit. Failed calls are free.

### How do I use YouTube Trending Scraper with Python?

Send a GET request with the requests library to https://proxy.scrapier.io/api/v2/youtube-trending/ with params={"country\_code": "US"}, your key in the X-API-Key header and timeout=210. Read r.json()\["data"\]\["videos"\]: it is already JSON, so no HTML parsing is needed.

### Is it legal to scrape YouTube data?

It depends on your use and your country, so this is not legal advice. Scrapier returns public YouTube data only. YouTube's terms and privacy law such as GDPR or CCPA apply to how you store and use it. Collect only what you need, and ask a lawyer about your specific case.

## Related scrapers

| Scraper | What it extracts |
| --- | --- |
| Trending Shorts Scraper | Shorts from a hashtag feed such as #trendingshorts, by country, with sort options. |
| [Hashtag Videos Scraper](https://scrapier.io/scrapers/youtube/hashtag-videos/) | Videos and Shorts under a hashtag, with channel, views and publish date. |
| [Video Details Scraper](https://scrapier.io/scrapers/youtube/video/) | One video by URL: title, channel, description, views, likes, duration, tags and upload date. |
| [Search Suggestions Scraper](https://scrapier.io/scrapers/youtube/search-suggestions/) | Autocomplete suggestions YouTube shows for a search term, with entity data. |
| [Channel Scraper](https://scrapier.io/scrapers/youtube/channel/) | One channel record: about section, stats and the first page of videos, Shorts, live streams and posts. |

All 17 YouTube endpoints are on the [YouTube scraper hub](https://scrapier.io/scrapers/youtube/).

## Your feedback

Found a bug or missing a field? Let us know. Write to support@scrapier.io and the team replies to every report.

[Report an issue](https://scrapier.io/contact/)[Email support](mailto:support@scrapier.io)

Get started

## Start Scraping YouTube Pages Of Trending Videos

Public YouTube pages of trending videos as JSON, 1 credit each, from REST or MCP.

[Get a free API key →](https://app.scrapier.io/sign-up)[View pricing](https://scrapier.io/pricing/)

---
Canonical page: https://scrapier.io/scrapers/youtube/trending/
Site index for AI agents: https://scrapier.io/llms.txt
