# YouTube Trending Scraper (by Country & Category) (`scrapers-hub/youtube-trending-scraper`) Actor

YouTube Trending Scraper captures the trending feed by country and category - rank, video title, URL, ID, thumbnail, author, publish time, views, likes and comments. 🔥 For trend spotting, content planning and virality research.

- **URL**: https://apify.com/scrapers-hub/youtube-trending-scraper.md
- **Developed by:** [Scrapers Hub](https://apify.com/scrapers-hub) (community)
- **Categories:** Videos, Social media, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.99 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## YouTube Trending Scraper

### 📈 YouTube Trending Scraper – Extract Trending Videos by Country & Category

The **YouTube Trending Scraper** pulls the current list of trending YouTube videos for any of 26 countries and 13 content categories, returning clean, structured records you can push straight into a spreadsheet, a BI dashboard or a content-planning pipeline. Instead of manually opening the YouTube trending tab, switching regions and copying titles by hand, you pick a country and a category, press Start, and receive a ranked dataset containing video titles, canonical video URLs, video IDs, thumbnail links, channel names, publish recency, view counts, like counts and comment counts.

Trending data is the fastest signal available about what an audience is actually watching right now. Media teams use it to time coverage, marketers use it to find rising formats before saturation, and researchers use it to track how attention moves between regions. This YouTube trending scraper turns that signal into a repeatable dataset rather than a screenshot.

The Actor is built on a lightweight HTTP client, so it runs without a headless browser and without heavy resource consumption. Each run outputs one dataset item per trending video, already ordered by its trending rank.

***

### 📊 What Data Can You Extract with This YouTube Trending Scraper?

Every dataset item describes a single trending video. The fields group naturally into five categories:

| Category | Fields | What you get |
|---|---|---|
| 🥇 Ranking | `rank` | The position of the video within the trending list for the selected country and category |
| 🎬 Video identity | `video_title`, `video_id`, `video_url` | The display title, the eleven-character YouTube video ID, and the canonical watch URL |
| 🖼️ Media assets | `thumbnail_url` | Direct link to the video's thumbnail image, suitable for embedding or downloading |
| 👤 Channel & timing | `author`, `published_time_text` | The uploading channel or credited creator, plus the relative publish time as YouTube displays it |
| 📊 Engagement metrics | `views`, `likes`, `comments` | Abbreviated engagement counts as shown on the platform |
| 🌍 Run context | `country`, `category` | The country slug and the human-readable category the item was collected under |

The most analytically useful field here is `rank` combined with `published_time_text`. Because trending position and publish recency arrive together, you can immediately separate videos that climbed fast from a same-day upload against evergreen content that has been accumulating for weeks — a distinction that raw view counts alone will never give you.

***

### 🌟 Key Features of the YouTube Trending Scraper

| Feature | Description |
|---|---|
| 🌍 26-country coverage | Choose from World, India, Indonesia, United States, Brazil, Saudi Arabia, France, Japan, Germany, Thailand, United Kingdom, Turkey, Mexico, Philippines, Spain, Vietnam, UAE, Russia, South Africa, Canada, Switzerland, Australia, Chile, Netherlands, Italy and South Korea |
| 🎭 13 content categories | Narrow results to Music, Gaming, Sports, News & Politics, Comedy, Entertainment, Film & Animation, Autos & Vehicles, Pets & Animals, People & Blogs, Howto & Style, Science & Technology — or take everything with All |
| 🥇 Rank-ordered output | Items arrive with an explicit `rank` field so the trending order is preserved in the dataset, not just implied by row position |
| ⚡ Browser-free architecture | Runs on plain HTTP requests via `httpx` with no headless Chrome, which keeps memory requirements and run duration low |
| 🖼️ Thumbnail URLs included | Every record carries a `thumbnail_url` so you can build visual dashboards or download creative assets without a second lookup |
| 📊 Engagement metrics in one pass | `views`, `likes` and `comments` are captured alongside the video metadata, avoiding a separate per-video enrichment step |
| 🔁 Repeatable snapshots | Because the input is just two select fields, the same run configuration can be scheduled daily to build a longitudinal trending archive |
| 🧾 Stable, flat schema | Twelve top-level fields with no nested objects, so CSV, Excel and Google Sheets exports stay readable |
| 🔗 Full API and integration support | Trigger runs and pull the dataset through the Apify API, the Python or JavaScript clients, webhooks, Zapier or Make |

***

### 🚀 Why Choose This YouTube Trending Scraper?

**Regional depth without regional accounts.** Getting a genuine view of what is trending in Japan or Brazil normally means a VPN, a fresh browser profile and a lot of manual switching. Here it is a dropdown. The `country` field is written back into every record, so multi-region datasets stay unambiguous when you merge them.

**Category-level precision.** Global trending lists are dominated by music and entertainment, which buries signal for anyone tracking gaming, science, or news. Selecting a specific `category` returns a trending list scoped to that vertical, so a gaming analyst is not forced to filter out chart-topping music videos.

**Lightweight and fast by design.** The Actor uses direct HTTP requests rather than a headless browser. That means shorter runs, lower memory, and a far smaller failure surface — there is no page rendering step that can hang or time out on a slow asset.

**Analysis-ready output.** The dataset is flat, consistently keyed and includes the run context on every row. You can concatenate a month of daily runs into a single table and immediately group by `country`, `category` or `author` without any reshaping.

***

### 📥 Input

The YouTube trending scraper takes two required fields. Both are dropdown selects, so there is nothing to construct or escape.

```json
{
  "country": "world",
  "category": "all"
}
```

#### 🔧 YouTube Trending Scraper Input Fields

| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| `country` | string (enum) | ✅ Yes | `world` | Select the country to scrape trends for. Accepts one of: `world`, `india`, `indonesia`, `united-states`, `brazil`, `saudi-arabia`, `france`, `japan`, `germany`, `thailand`, `united-kingdom`, `turkey`, `mexico`, `philippines`, `spain`, `vietnam`, `united-arab-emirates`, `russia`, `south-africa`, `canada`, `switzerland`, `australia`, `chile`, `netherlands`, `italy`, `south-korea` |
| `category` | string (enum) | ✅ Yes | `all` | Select the category of trends to scrape. Accepts one of: `all`, `film-and-animation`, `autos-and-vehicles`, `music`, `pets-and-animals`, `sports`, `gaming`, `people-and-blogs`, `comedy`, `entertainment`, `news-and-politics`, `howto-and-style`, `science-and-technology` |

#### 💡 Input Examples

**Global trending, everything:**

```json
{
  "country": "world",
  "category": "all"
}
```

**United States gaming trends:**

```json
{
  "country": "united-states",
  "category": "gaming"
}
```

**Indian music charts:**

```json
{
  "country": "india",
  "category": "music"
}
```

***

### 📤 Output

Each trending video becomes one dataset item. Below is a real record from an actual run of the YouTube trending scraper:

```json
{
  "rank": 1,
  "video_title": "Toxic Official Hindi Trailer | Rocking Star Yash | Geetu Mohandas | KVN | Monster Mind Creations",
  "video_url": "https://youtube.com/watch?v=G5hWlD5zfhw",
  "video_id": "G5hWlD5zfhw",
  "thumbnail_url": "https://i.ytimg.com/vi/G5hWlD5zfhw/sddefault.jpg",
  "author": "KVN PRODUCTIONS and Zee Music Company",
  "published_time_text": "3 days ago",
  "views": "28M",
  "likes": "598K",
  "comments": "34K",
  "country": "world",
  "category": "Film & Animation"
}
```

#### 🧾 YouTube Trending Output Fields

| Field | Type | Description |
|---|---|---|
| `rank` | integer | null | Rank of the item in the results |
| `video_title` | string | null | Video title of the item |
| `video_url` | string | null | URL of the video file |
| `video_id` | string | null | Identifier of the video |
| `thumbnail_url` | string | null | URL of the thumbnail image |
| `author` | string | null | Author of the item |
| `published_time_text` | string | null | Text of the published time |
| `views` | string | null | Number of views |
| `likes` | string | null | Number of likes |
| `comments` | string | null | Comments attached to the item |
| `country` | string | null | Country |
| `category` | string | null | Category of the item |

Note that `views`, `likes` and `comments` are returned as strings in the abbreviated form YouTube displays (`28M`, `598K`, `34K`). If you need numeric values for arithmetic, parse the suffix in your downstream pipeline. Any field may be `null` when the platform does not expose that value for a given video.

***

### 💻 How to Use the YouTube Trending Scraper (Step by Step)

#### Step 1: Open the YouTube Trending Scraper on Apify

Sign in to your Apify account and open the Actor page. If you do not have an account yet, creating one takes under a minute and gives you access to the Apify console, where every run, log and dataset is stored. From the Actor page, click **Start** or **Try for free** to open the input form. The console is also where you will later find scheduling, integrations and API tokens, so it is worth getting familiar with the layout early.

#### Step 2: Select the target country

The `country` dropdown controls which regional trending list is fetched. Choose `world` for the aggregated global list, or pick a specific market such as `united-states`, `japan` or `brazil`. This is the single most impactful setting in the whole configuration, because trending lists diverge enormously between regions — a video dominating in Indonesia may not appear at all in the German list. If you plan to compare markets, run the scraper once per country rather than trying to combine them in a single run.

#### Step 3: Choose the content category

The `category` dropdown scopes the trending list to a vertical. Leaving it on `all` returns the general trending feed, which tends to skew toward music and entertainment. Selecting something narrower — `gaming`, `news-and-politics`, `science-and-technology` — gives you a list that is genuinely useful for that niche. The chosen category is echoed back in the `category` output field in its human-readable form, so you can safely merge multiple category runs into one table and group afterwards.

#### Step 4: Start the run and watch the log

Click **Start**. The run log streams live in the console, showing progress as the trending list is fetched and parsed. Because the Actor uses direct HTTP requests rather than a headless browser, runs are typically short. If something goes wrong — an unexpected page structure, a network error — it will surface in the log with a clear message rather than failing silently.

#### Step 5: Review the dataset in the Output tab

When the run finishes, switch to the **Output** or **Dataset** tab. You will see a table with one row per trending video, ordered by `rank`. Scan the first few rows to confirm the country and category match what you selected, and check that `views` and `likes` are populated. This quick sanity check takes seconds and catches configuration mistakes before you build anything on top of the data.

#### Step 6: Export in your preferred format

Apify datasets export to JSON, CSV, Excel, XML, HTML table and RSS from the same screen. CSV is the usual choice for spreadsheet analysis; JSON is better if you are feeding an application. You can also filter and select specific fields at export time — for example, exporting only `rank`, `video_title`, `author` and `views` for a lightweight editorial brief.

#### Step 7: Schedule recurring runs to build a trend archive

A single trending snapshot tells you what is popular today. A month of daily snapshots tells you how popularity moves. Use the **Schedules** section of the Apify console to run the same country/category combination every day at a fixed time. Because the run context is written into every record via the `country` and `category` fields, appending each day's dataset to a growing archive is straightforward, and you can later compute rank velocity per `video_id`.

***

### 🔌 API Access & Integrations

Run the YouTube trending scraper directly from the Apify API and get the dataset items back in a single synchronous call:

```bash
curl -X POST "https://api.apify.com/v2/acts/scrapers-hub~youtube-trending-scraper/run-sync-get-dataset-items?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "country": "united-states",
    "category": "gaming"
  }'
```

The same thing with the official Python client:

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_TOKEN")

run_input = {
    "country": "japan",
    "category": "music",
}

run = client.actor("scrapers-hub/youtube-trending-scraper").call(run_input=run_input)

for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["rank"], item["video_title"], item["views"], item["author"])
```

Beyond the API, the Actor connects to Zapier, Make, Google Sheets, Slack, Airtable and any custom endpoint through Apify webhooks, so a finished run can push fresh trending data into your stack automatically.

***

### 💡 Best Use Cases for YouTube Trending Data

#### 📰 Newsroom and Editorial Planning

Set `category` to `news-and-politics` and run across several countries to see which stories are commanding attention where. The combination of `video_title`, `author` and `published_time_text` shows which outlets broke a story and how quickly it climbed. Editorial teams use this to decide what deserves same-day coverage versus a considered follow-up.

#### 🎮 Gaming Market Intelligence

With `category` set to `gaming`, the `video_title` and `author` fields reveal which titles and which creators are driving discovery in a given market. Tracking `rank` for the same `video_id` across daily runs shows whether a game launch is building momentum or already fading, which is far more informative than a single view count.

#### 🎵 Music A\&R and Playlist Curation

The `music` category surfaces breakout tracks before they reach mainstream charts. Pairing `views` with `published_time_text` isolates songs that accumulated large audiences in days rather than months — exactly the profile A\&R scouts and playlist curators look for. The `thumbnail_url` gives you cover art for internal review decks without extra requests.

#### 📣 Influencer and Creator Discovery

The `author` field across a category-scoped run is effectively a ranked list of creators currently winning attention in that vertical and market. Brands building influencer shortlists can aggregate `author` frequency across several days of runs to distinguish consistent performers from one-hit uploads, then use `video_url` to review the actual content.

#### 📊 Competitive Content Benchmarking

If your own channel operates in a specific category, running the scraper for that `category` and your target `country` gives you a benchmark set. Comparing your engagement ratios against the `views`, `likes` and `comments` of trending peers shows realistically what "good" looks like in your niche rather than against platform-wide averages.

#### 🌍 Cross-Market Trend Comparison

Run the same `category` across multiple `country` values and merge the datasets. Because every row carries its own `country`, you can pivot on it directly and see which videos trend in several markets simultaneously — a strong indicator of content that travels well and a useful input for localisation decisions.

#### 🎨 Creative and Thumbnail Research

The `thumbnail_url` field lets you assemble a visual board of what currently-trending thumbnails look like in your category. Combined with `video_title`, this is practical research for title and cover design: you can see the framing, colour and copy conventions that are working right now rather than relying on general advice.

***

### ⚙️ Tips for Better YouTube Trending Scraping Results

- **Run one country and category per execution.** The input accepts a single value for each. To cover several markets, launch separate runs — this keeps the datasets clean and makes failures isolated rather than partial.
- **Schedule at a consistent time each day.** Trending lists refresh throughout the day. Fixing the run time removes a major source of noise when you compare snapshots across days.
- **Parse the abbreviated counts once, at ingestion.** `views`, `likes` and `comments` arrive as strings such as `28M`. Convert them to integers as the first step of your pipeline so every downstream consumer works with numbers.
- **Use `video_id` as your join key.** Titles change and URLs can carry tracking parameters, but `video_id` is stable. Deduplicate and join daily snapshots on it.
- **Start with `all` before narrowing.** If a specific category returns fewer results than expected for a small market, run `all` for the same country to confirm the region has a populated trending list at that moment.
- **Keep the raw dataset.** Export or copy each run's output before transforming it. Trending lists are ephemeral — once a video drops off, that snapshot is not recoverable from the platform.

***

### 🛠️ Troubleshooting

**Why did my run return fewer items than I expected?**
Trending list length varies by country and category. Smaller markets and narrow categories genuinely have shorter lists at some times of day. Try `all` for the same country to confirm the region is returning data, and check the run log for parsing warnings.

**Why are `views` or `likes` empty on some rows?**
Every output field is nullable. YouTube does not display like counts for every video, and some entries omit engagement figures entirely. Treat `null` as "not published by the platform" rather than as zero, and handle it explicitly in any aggregation.

**Why do the numbers look rounded?**
The scraper captures the abbreviated values the platform renders (`28M`, `598K`). These are the figures YouTube itself displays on the trending page, so they are accurate to the platform's own rounding. Exact integer counts are not exposed there.

**The run finished but the dataset is empty. What now?**
Check that both `country` and `category` are set to values from the allowed enum lists — a slug typed by hand (for example `usa` instead of `united-states`) will not match. Then re-run; transient network conditions can cause an empty fetch, and the Actor is cheap enough to retry immediately.

**Can I get historical trending data for a past date?**
No. The YouTube trending scraper reads the live trending list at the moment the run executes. There is no historical archive to query. Building a history requires scheduling recurring runs from today forward.

***

### ❓ Frequently Asked Questions About YouTube Trending Scraping

**What does the YouTube Trending Scraper actually do?**
It fetches the current YouTube trending list for a country and category you select, then outputs one structured record per video containing rank, title, video ID, URL, thumbnail, channel, publish recency, views, likes and comments.

**Which countries does the YouTube trending scraper support?**
Twenty-six options in total: World, India, Indonesia, United States, Brazil, Saudi Arabia, France, Japan, Germany, Thailand, United Kingdom, Turkey, Mexico, Philippines, Spain, Vietnam, United Arab Emirates, Russia, South Africa, Canada, Switzerland, Australia, Chile, Netherlands, Italy and South Korea.

**Which YouTube categories can I scrape trends for?**
All, Film & Animation, Autos & Vehicles, Music, Pets & Animals, Sports, Gaming, People & Blogs, Comedy, Entertainment, News & Politics, Howto & Style, and Science & Technology.

**Do I need a YouTube API key or a Google account?**
No. The Actor requires only your Apify token to run through the API, and nothing at all if you launch it from the console. No YouTube credentials are involved.

**Can I scrape multiple countries in one run?**
Not in a single run — `country` accepts one value. Launch one run per country and merge the datasets afterwards. Each record includes its own `country` field, which makes merging trivial.

**Is the output ordered by trending position?**
Yes. The `rank` field carries the explicit trending position, so ordering survives export, filtering and re-sorting in a spreadsheet.

**What format can I export the trending data in?**
JSON, CSV, Excel, XML, HTML table and RSS, all directly from the Apify dataset view or through the API.

**Why are view counts returned as text instead of numbers?**
Because YouTube renders them in abbreviated form on the trending page and the scraper captures what is displayed. Convert `28M` to `28000000` in your own pipeline if you need arithmetic.

**Does this YouTube trending scraper use a headless browser?**
No. It runs on direct HTTP requests using `httpx`, which keeps runs fast and memory usage low compared with browser-based scraping.

**How often should I run the YouTube trending scraper?**
Once a day at a fixed time is the most common pattern and is enough to track rank movement. Teams tracking fast-moving news categories sometimes run every few hours.

**Can I get the full video description or comment text?**
No. The output includes a `comments` count, not the comment bodies, and there is no description field. The scraper is scoped to the trending listing data.

**Does the Actor need proxy configuration?**
No proxy configuration is exposed in the input, and none is required to run it.

**Can I track how a specific video moves up or down the trending chart?**
Yes, by scheduling recurring runs and joining snapshots on `video_id`. Comparing `rank` across days gives you a clean velocity metric.

**What happens if YouTube changes its trending page layout?**
Parsing may return fewer fields or an empty dataset until the Actor is updated. If you see a sudden drop in output quality, report it through the Issues tab so it can be fixed quickly.

**Is scraping YouTube trending data legal?**
The Actor collects only publicly visible listing information that any visitor can see without logging in. You remain responsible for complying with YouTube's Terms of Service and applicable law in how you store and use the data.

***

### 🆘 Support & Feedback

Found a bug, hit an unexpected error, or noticed a field that stopped populating? Open a report in the **Issues** tab on the Actor page — issues raised there are tracked and prioritised.

Need a custom version of the YouTube trending scraper, additional fields, a different output shape, or a bespoke scraping build for another platform? Email **scraperhubapi@gmail.com** and describe what you need.

If this Actor saves you time, please leave a review on the Apify Store. Honest feedback helps other users decide and directly shapes what gets improved next.

***

### ⚖️ Disclaimer

The YouTube Trending Scraper collects only publicly available information from YouTube's trending pages — data that any visitor can view without signing in or bypassing access controls. It does not access private videos, member-only content, user accounts, or any material behind authentication.

You are responsible for how you use the data this Actor produces. That includes complying with YouTube's Terms of Service, applicable copyright law, and the data protection regulations of your jurisdiction. Where collected data includes information that could identify an individual — for example a creator's channel name in the `author` field — GDPR, CCPA and equivalent privacy frameworks may apply to your storage and processing of it, and you should ensure you have a lawful basis for that processing.

Thumbnail images and video titles remain the intellectual property of their respective creators and rights holders. The `thumbnail_url` field is a reference to a publicly hosted asset; republishing those assets may require permission from the copyright owner.

This Actor is not affiliated with, endorsed by, or sponsored by YouTube or Google. If you believe data collected by this scraper relates to you and you would like it removed, contact **scraperhubapi@gmail.com** and the request will be handled promptly.

# Actor input Schema

## `country` (type: `string`):

Select the country to scrape trends for.

## `category` (type: `string`):

Select the category of trends to scrape.

## Actor input object example

```json
{
  "country": "world",
  "category": "all"
}
```

# Actor output Schema

## `results` (type: `string`):

Records scraped by YouTube Trending Scraper (by Country & Category), stored in the run's default dataset.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapers-hub/youtube-trending-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("scrapers-hub/youtube-trending-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call scrapers-hub/youtube-trending-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,scrapers-hub/youtube-trending-scraper"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/HDBjPqDPseSea1Cj7/builds/gjkfo2d6KYcYw1bsS/openapi.json
