# YouTube Hashtag Scraper (`parseforge/youtube-hashtag-scraper`) Actor

Scrape YouTube videos and Shorts from hashtag pages. Each result has the title, URL, type, duration, view count, publish time, channel name, ID and link, verified badge and thumbnails. Filter to videos only or Shorts only. No API key needed. Export to CSV, Excel or JSON.

- **URL**: https://apify.com/parseforge/youtube-hashtag-scraper.md
- **Developed by:** [ParseForge](https://apify.com/parseforge) (community)
- **Categories:** Social media, Developer tools
- **Features:** Limited permissions
- **Stats:** 28 total users, 3 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.40 / 1,000 result items

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

[![ParseForge](https://raw.githubusercontent.com/ParseForge/apify-assets/main/banner-v4.webp)](https://apify.com/parseforge?fpr=vmoqkp)

### YouTube Hashtag Scraper

**Scrape YouTube videos and Shorts from any hashtag page, up to a million per run.** Each result includes the video title, view count, duration, publish time, channel name and ID, and direct URL. No API key or quota limits. Export to CSV, JSON, Excel, or XML.

YouTube's official API requires OAuth, has daily quotas, and limits the depth of results you can pull from hashtag feeds. This YouTube Hashtag Scraper reads the public hashtag pages directly, letting you collect video and Shorts metadata for any list of hashtags you provide. You get a clean, flat dataset of every video found, filtered by content type, with no rate limits to manage.

| Who uses it | What they scrape YouTube for |
|---|---|
| Content strategists | Discovering trending video formats and topics within a niche. |
| Market researchers | Analyzing the competitive landscape for a specific content category. |
| Social media managers | Finding relevant videos and creators to engage with or share. |
| Data analysts | Building a dataset of video performance metrics tied to specific hashtags. |

### What it does

This Actor collects video and Shorts metadata from YouTube hashtag pages and returns each result as a flat row with video title, view count, duration, publish time, channel name, and URL.

- 🏷️ **Bulk hashtag input:** Provide a list of hashtags like 'gaming', 'cooking', or 'ai' and scrape each one in a single run.
- 🎬 **Content type filter:** Choose to collect all content, only standard videos, or only Shorts from a hashtag page.
- 📊 **Scalable collection:** Set a maximum number of videos to collect per hashtag, from a single sample to a million.

Results export to CSV, JSON, Excel, or XML, or straight from the API.

### What you can do with YouTube data

**📈 Monitor content trends.**

A content strategist scrapes the #ai hashtag weekly to track which video styles and topics are gaining the most views and engagement.

**🔍 Find niche creators.**

A brand manager scrapes the #sustainablefashion hashtag to identify up-and-coming YouTube channels for potential sponsorship deals.

**📊 Benchmark performance.**

A market researcher scrapes a competitor's branded hashtag to analyze the average views of its videos and which channels post under it.

**🎬 Build a Shorts dataset.**

A data analyst scrapes the #comedy Shorts feed to compile a large dataset for training a video virality prediction model.

### Why choose this scraper

|  | What you get |
|---|---|
| **No API key required** | Access public YouTube hashtag data without registering an app or managing OAuth tokens. |
| **No rate limits** | Scrape thousands of videos without worrying about daily quota restrictions. |
| **Structured output** | Get a consistent, flat schema for every video, ready for analysis in any spreadsheet or database. |

### How it compares

This Actor is purpose-built for scraping hashtag pages, a feature not directly offered by general YouTube scrapers that focus on channels, individual videos, or search queries.

| Feature | ParseForge | YouTube Scraper | Fast YouTube Channel Scraper | YouTube Comments Scraper |
|---|---|---|---|---|
| Scrapes hashtag pages | Yes | Not listed | Not listed | Not listed |
| Filters by Shorts, Videos, or All | Yes | Not listed | Not listed | Not listed |
| Bulk hashtag input | Yes | Not listed | Not listed | Not listed |
| Scrapes channel info | Yes | Yes | Yes | Not listed |
| Scrapes video metadata | Yes | Yes | Yes | Not listed |
| Scrapes comments | Not listed | Not listed | Not listed | Yes |

### Configure the run

Drive the Actor with a list of hashtag keywords, and filter results by content type as each video is read so only matches reach your dataset. The Input tab lists every parameter.

A first run with the defaults:

```json
{
  "keywords": [
    "funny"
  ],
  "maxItems": 10,
  "contentType": "ALL"
}
```

A larger pull:

```json
{
  "keywords": [
    "funny"
  ],
  "maxItems": 200,
  "contentType": "ALL"
}
```

### Pricing

You pay per video written to your dataset, with no start fee. The price depends on your Apify plan:

| Your Apify plan | Per result | Per 1,000 results |
|---|---|---|
| Free | $0.0035 | $3.50 |
| Bronze | $0.003 | $3.00 |
| Silver | $0.0026 | $2.60 |
| Gold and above | $0.0024 | $2.40 |

Rows that only report an error are free. The Pricing tab always shows the live numbers.

New Apify accounts start with $5 in free credit.

### Free users

Free-plan runs return up to 100 results in total. [Upgrade your Apify plan](https://console.apify.com/sign-up?fpr=vmoqkp) to collect up to 1,000,000 results per hashtag.

### Run it

1. [Create a free Apify account with $5 in credit](https://console.apify.com/sign-up?fpr=vmoqkp).
2. Open the [YouTube Hashtag Scraper](https://apify.com/parseforge/youtube-hashtag-scraper?fpr=vmoqkp).
3. Set your inputs and any filters, then click **Start**.
4. Export the results as CSV, Excel, JSON, or XML from the **Dataset** tab.

Run it programmatically through the [Apify API](https://docs.apify.com/api/v2) (`run-sync-get-dataset-items`) or the [ApifyClient](https://docs.apify.com/api/client/js) for JavaScript and Python.

### Use with AI agents (MCP)

Give an AI agent live access to YouTube through the Model Context Protocol. Add the Actor to Claude, Cursor, or any MCP client:

```bash
claude mcp add --transport http apify "https://mcp.apify.com?tools=parseforge/youtube-hashtag-scraper"
```

Then prompt it in plain language to run the scraper and read back the results.

### Troubleshooting

**Why am I getting no results for a hashtag?**

First, check that the hashtag exists on YouTube and has public videos. Also, ensure you typed the keyword without the # symbol. If the 'Content Type' filter is set to 'Shorts only', a hashtag with only standard videos will return an empty dataset.

**The run is taking a very long time.**

Scraping a large number of videos per hashtag will take time. Reduce the 'Maximum videos per hashtag' number for a faster test run. The Actor is designed to be respectful, so it adds small delays between requests.

**I'm getting fewer results than my 'Maximum videos per hashtag' setting.**

The Actor can only collect videos that are publicly listed on the hashtag page. If the hashtag has fewer total videos than your set maximum, you will receive all of them.

**The publish time is a relative text, not a date.**

The hashtag page shows publish times such as "5d ago", and `publishedTime` keeps that text as YouTube shows it. Compare it with `scrapedAt` to work out the approximate date.

### FAQ

| Question | Answer |
|---|---|
| Do I need a YouTube API key to use this scraper? | No. This Actor accesses public YouTube hashtag pages directly, so you do not need to register an application or manage any API credentials. |
| What data can I get from a YouTube hashtag search? | Each result row includes the video title, URL, type, duration, view count, publish time, the channel name and ID, and whether the channel is verified. The exact fields are listed in the sample output on this page. |
| Can I scrape YouTube Shorts with this Actor? | Yes. Use the 'Content Type' filter and select 'Shorts only' to collect only Shorts from the specified hashtag pages. |
| How many hashtags can I scrape at once? | You can provide a list of as many hashtags as you need. The Actor will process each one sequentially in a single run. |
| Is there a limit to how many videos I can scrape? | You set the limit yourself with the 'Maximum videos per hashtag' input, up to 1,000,000. There are no platform-imposed quotas on the Actor itself. |
| How do I format the hashtag input? | Enter the keywords without the # symbol, one per line in the input field. For example, type 'gaming' instead of '#gaming'. |
| Can I get the full video description or comments? | This Actor focuses on video and channel metadata from the hashtag page. For full descriptions or comments, you would need a dedicated video or comments scraper. |
| What format is the data exported in? | You can export your dataset in JSON, CSV, Excel, or XML format directly from the Apify platform. |
| Does this scraper work for any YouTube hashtag? | Yes, it works for any public hashtag page on YouTube. If a hashtag has no results, the dataset for that keyword will be empty. |
| Can I schedule this Actor to run automatically? | Yes, you can set up a recurring schedule in Apify to run the Actor daily, weekly, or at any custom interval to track hashtags over time. |

### Related actors

Browse the full [ParseForge collection](https://apify.com/parseforge?fpr=vmoqkp) for more scrapers.

🆘 **Need help?** Email parseforge@protonmail.com with your run ID, your input, and what you expected.

⚠️ **Disclaimer.** This Actor is unofficial and is not affiliated with, endorsed by, or sponsored by YouTube, LLC. It collects only publicly available data. You are responsible for using the collected data in compliance with the source's terms of service and applicable data-protection laws, including GDPR, CCPA, and PIPL. Do not use it to collect personal data unlawfully.

# Actor input Schema

## `keywords` (type: `array`):

List of hashtag keywords to scrape (without the # symbol). Each keyword is scraped separately.

## `maxItems` (type: `integer`):

How many videos to collect for each hashtag per run.

## `contentType` (type: `string`):

Filter results by content type: All (default), Videos only, or Shorts only.

## Actor input object example

```json
{
  "keywords": [
    "funny",
    "gaming",
    "cooking",
    "ai",
    "travel"
  ],
  "maxItems": 10,
  "contentType": "ALL"
}
```

# Actor output Schema

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

Full dataset of extracted videos in JSON format.

# 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 = {
    "keywords": [
        "funny"
    ],
    "maxItems": 10,
    "contentType": "ALL"
};

// Run the Actor and wait for it to finish
const run = await client.actor("parseforge/youtube-hashtag-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 = {
    "keywords": ["funny"],
    "maxItems": 10,
    "contentType": "ALL",
}

# Run the Actor and wait for it to finish
run = client.actor("parseforge/youtube-hashtag-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 '{
  "keywords": [
    "funny"
  ],
  "maxItems": 10,
  "contentType": "ALL"
}' |
apify call parseforge/youtube-hashtag-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,parseforge/youtube-hashtag-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/2QfXxe8Zhzyab2v2X/builds/KQjigGIO19yhD5byb/openapi.json
