# YouTube Hashtags Scraper (`icoe-man/youtube-hashtags-scraper`) Actor

A youtube hashtag scraper: collect the public videos and Shorts shown for any YouTube hashtag, with titles, channels, view counts and dates. Export JSON, CSV or Excel.

- **URL**: https://apify.com/icoe-man/youtube-hashtags-scraper.md
- **Developed by:** [Icoe Man](https://apify.com/icoe-man) (community)
- **Categories:** Social media, Videos
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.73 / 1,000 hashtag videos

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

## YouTube Hashtags Scraper

See which public videos and Shorts YouTube shows for the hashtags you're researching. Enter one or more hashtags to get a table of video links, titles, channels, view counts and publish dates. Download the table to compare videos side by side or use the results in other tools.

### What you get

Enter up to 100 hashtags in **Hashtags**, and set **Shorts only** (optional), **Minimum views** (optional). By default, you get up to 100 public posts for each hashtag. To change that limit, enter a number no higher than 1000 in **Result limit per hashtag**. Each post gets its own row in the results table. Choose **Live** under **Data freshness** to collect fresh data on every run.

### Ways to use the data

- Trend research: Check which videos show up under a hashtag and how many views each has.
- Content ideas: See what channels are posting about a topic and scan their titles for ideas for your next video.
- Campaign reporting: Add a list of videos from your campaign hashtag to your report.
- Market research: Compare what YouTube shows across several hashtags to see how the videos differ by topic.

### What to enter

| Field key | Name on the form | What to enter |
| --- | --- | --- |
| `hashtags` | Hashtags | Enter one or more YouTube hashtags. The # sign is optional: #nasa and nasa both work. |
| `shortsOnly` | Shorts only | Turn this on to collect only Shorts. |
| `minViews` | Minimum views | Enter the minimum number of views a video needs. Leave blank for no minimum. You may get fewer results than your Result limit per hashtag. The run stops early if three pages in a row have no matches or if too few videos meet the minimum. |
| `maxItems` | Result limit per hashtag | Enter the maximum number of results to collect for each hashtag. |
| `freshness` | Data freshness | Standard can return results faster when recently collected data is available. Choose Live to collect fresh data on every run. |

Example input:

```json
{
  "hashtags": [
    "nasa"
  ],
  "maxItems": 20,
  "freshness": "standard"
}
```

### Your results

Example result for one post:

```json
{
  "status": "ok",
  "type": "post",
  "platform": "youtube",
  "id": "LHUvedAssyE",
  "url": "https://www.youtube.com/watch?v=LHUvedAssyE",
  "author": {
    "id": "UCLA_DiR1FfKNvjuUpBHmylQ",
    "username": "NASA",
    "displayName": "NASA"
  },
  "text": "A short example sentence about a space mission, shown for illustration.",
  "createdAt": "2026-11-09T17:08:54Z",
  "metrics": {
    "views": 60193
  },
  "hashtags": [
    "nasa"
  ],
  "mentions": [],
  "media": [
    {
      "kind": "video",
      "url": "https://www.youtube.com/watch?v=LHUvedAssyE",
      "thumbnailUrl": "https://i.ytimg.com/vi/LHUvedAssyE/hqdefault.jpg",
      "durationSec": 87
    }
  ],
  "details": {
    "youtube": {
      "kind": "video",
      "title": "An example video title for illustration",
      "durationSec": 87,
      "timeApproximate": true
    }
  },
  "collectedAt": "2026-11-14T12:00:00Z",
  "input": {
    "hashtag": "nasa",
    "maxItems": 20
  }
}
```

Every row has a `status` field. For each entry that fails, the Actor returns one row with `status: "error"`. The `error` field has a `code` and a `message`.

### Pricing

You pay per result. Prices for each Apify plan are in USD per 1,000 results.

| What you pay for | Free | Bronze | Silver | Gold | Platinum | Diamond |
| --- | --- | --- | --- | --- | --- | --- |
| Hashtag videos | $2.992 | $2.250 | $1.950 | $1.731 | $1.731 | $1.731 |

You don't pay for errors or empty results. The run stops when it reaches your spending limit.

On the free plan, you can collect up to 100 results per run and make up to 20 runs per day.

### Common questions

#### What details do I get for each video?

You get the link, title, channel, view count, publish date, video length and thumbnail when YouTube shows those details publicly. If YouTube shows a label like "2 weeks ago", the publish date may be an estimate.

#### Can I collect only Shorts or set a minimum view count?

Yes. Turn on Shorts only to skip other videos, set Minimum views to keep videos with at least that many views, or use both. The Actor checks view counts after it finds videos, so you may get fewer results than your Result limit per hashtag. The run stops early if three pages in a row have no matches or if too few of the videos it checks meet the minimum.

#### Do I need to include the # sign?

No. In Hashtags, you can enter either nasa or #nasa.

#### Do I need a YouTube account to run this?

No. The Actor collects only public information, so you don't need to sign in to YouTube or share browser cookies.

#### How do I limit my results, and what do I pay for?

Set Result limit per hashtag to cap how many videos the Actor collects for each hashtag. You pay only for the videos you get, and the run stops if it reaches your spending limit. There's no charge for errors or empty results.

#### Is this Actor affiliated with YouTube?

No. This tool is independent and is not affiliated with, endorsed by or sponsored by YouTube or Google. It collects only information YouTube shows publicly.

### Disclaimer

This Actor is not affiliated with, endorsed by, or sponsored by YouTube. All trademarks belong to their owners.

# Actor input Schema

## `hashtags` (type: `array`):

Enter one or more YouTube hashtags. The # sign is optional: #nasa and nasa both work.

## `shortsOnly` (type: `string`):

Turn this on to collect only Shorts.

## `minViews` (type: `string`):

Enter the minimum number of views a video needs. Leave blank for no minimum. You may get fewer results than your Result limit per hashtag. The run stops early if three pages in a row have no matches or if too few videos meet the minimum.

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

Enter the maximum number of results to collect for each hashtag.

## `freshness` (type: `string`):

Standard can return results faster when recently collected data is available. Choose Live to collect fresh data on every run.

## Actor input object example

```json
{
  "hashtags": [
    "nasa"
  ],
  "maxItems": 20,
  "freshness": "standard"
}
```

# Actor output Schema

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

See everything this run collected in one table.

# 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 = {
    "hashtags": [
        "nasa"
    ],
    "maxItems": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("icoe-man/youtube-hashtags-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 = {
    "hashtags": ["nasa"],
    "maxItems": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("icoe-man/youtube-hashtags-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 '{
  "hashtags": [
    "nasa"
  ],
  "maxItems": 20
}' |
apify call icoe-man/youtube-hashtags-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,icoe-man/youtube-hashtags-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/21dElcBeIF1cJK1GE/builds/RkbroagzsaFWMKFlF/openapi.json
