# YouTube Hashtag Videos: what a hashtag surfaces, in order (`steadydata/youtube-hashtag-videos`) Actor

The videos YouTube lists for a hashtag, up to 200 hashtags per run: title, channel, views, when it was posted and duration, in YouTube's own order, without opening a browser. Track a campaign tag, a trend or a niche. No commenter or viewer data. Pay per delivered video.

- **URL**: https://apify.com/steadydata/youtube-hashtag-videos.md
- **Developed by:** [Steadydata Team](https://apify.com/steadydata) (community)
- **Categories:** Videos, Marketing, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.35 / 1,000 video listeds

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 Hashtag Videos: what a hashtag surfaces, in order

The videos YouTube lists for a hashtag, up to 200 hashtags per run: title, channel, views, when it was posted and duration, in YouTube's own order, without opening a browser. Track a campaign tag, a trend or a niche. No commenter or viewer data. Pay per delivered video.

### Why this scraper

- **Only delivered results are charged.** Inputs that fail come back as clear error
  records at no cost.
- **Measured on a real hashtag** (#travel, 16 September 2026): 20 videos in one run with
  title, channel, views, posting time and duration, for a platform cost of a tenth of a
  cent. No browser: the same lightweight endpoint as our Shorts and Live actors, 24 videos
  per page.
- **The hashtag page, in YouTube's order.** Search actors return what a query matches; this
  actor returns what YouTube itself lists under the tag, top to bottom, which is what a
  campaign or trend audit needs.
- **Shorts and long videos, told apart.** `isShort` and `durationSeconds` come with every
  row, so you can split a tag's feed by format.

### Who this is for

Campaign and trend monitoring: which videos and channels own a hashtag right now, how big
they are, how fresh, and whether the tag is a Shorts tag or a long-form tag. Agencies
tracking client tags, researchers sampling a topic, creators sizing a niche. Up to 200
hashtags per run, up to 500 videos each.

### Who this is not for

- **Exact view counts.** `viewCount` is parsed from YouTube's rounded label ("22M views"), so
  it is the rounded figure, not the precise number. Use `youtube-video-details` for that.
- **Every video ever tagged.** The hashtag page is YouTube's ranked selection; it is not a
  complete index of all videos that carry the tag.
- **Comments, likes or channel contact data.** Not delivered.

### Input example

```json
{
    "hashtags": [
        "travel",
        "#fitness"
    ],
    "maxVideosPerHashtag": 50,
    "language": "en",
    "country": "US"
}
```

### Output fields

- `hashtag`
- `position`
- `videoId`
- `url`
- `title`
- `channelName`
- `channelId`
- `viewCount`
- `publishedText`
- `durationSeconds`
- `isShort`
- `thumbnailUrl`

### Output example

```json
{
    "hashtag": "#travel",
    "position": 3,
    "videoId": "CWC1dH6N4Hw",
    "url": "https://www.youtube.com/watch?v=CWC1dH6N4Hw",
    "title": "Flying First Class #firstclass #travel #baby",
    "channelName": "Bayleigh Daily",
    "channelId": "UC8B7O5hA5Sf4pNgFofl5Ssw",
    "viewCount": 35000000,
    "publishedText": "1 year ago",
    "durationSeconds": 11,
    "isShort": true,
    "thumbnailUrl": "https://i.ytimg.com/vi/CWC1dH6N4Hw/default.jpg",
    "status": "ok"
}
```

Error codes: `INVALID_HASHTAG` (not a single word), `HASHTAG_NOT_FOUND`, `NO_VIDEOS` (YouTube
lists nothing under the tag), `BLOCKED` (after retries on fresh exits). None is charged.

### Related actors from steadydata

- [youtube-search](https://apify.com/steadydata/youtube-search): the same idea for a free-text query instead of a hashtag
- [youtube-video-details](https://apify.com/steadydata/youtube-video-details): full metadata for a video you found
- [youtube-channel-details](https://apify.com/steadydata/youtube-channel-details): the profile of a channel that keeps showing up

### Pricing

Pay per event: one `video-listed` event per delivered result. No charge for inputs
that fail, no separate platform-usage surcharge.

**Free Apify plan:** this actor delivers up to 25 rows per run for accounts on the Apify free
plan, and then stops with a message. That limit is set by us, not by Apify. It exists so the
actor keeps paying for itself for the people who do pay. Any paid Apify plan runs it at full
size, billed per delivered row, with failed rows never charged.

**Reviews:** if this actor saves you time, a short review on this page is the one thing that
helps most. Ratings are what other buyers look at first, and we have no other way to ask.

### FAQ

**Do I include the #?** Either way: `travel` and `#travel` are the same; a full
youtube.com/hashtag/... URL works too.

**What order do the videos come in?** YouTube's own order on the hashtag page, newest page
first, `position` counting from 1.

**Why is `viewCount` sometimes empty?** Some cards (live streams, premieres) show no view
label; the field is then empty rather than guessed.

**What happens with a hashtag nobody uses?** A `NO_VIDEOS` error record and no charge.

**Is personal data collected?** No. Public video titles, channel names and counts only.

**Is personal data collected?**
No. Public video titles, channel names and counts only.

**What happens when the source changes?**
Sources change from time to time; that is the nature of this work. The actor is
monitored daily and fixed fast, and while it is broken you are not charged, because
only delivered results cost anything.

# Changelog

This Actor's version history is a separate document: https://apify.com/steadydata/youtube-hashtag-videos/changelog.md

# Actor input Schema

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

One per row, up to 200, with or without the #: travel, #fitness.

## `maxVideosPerHashtag` (type: `integer`):

Cost ceiling per hashtag, in YouTube's order.

## `language` (type: `string`):

Two-letter code for labels.

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

Two-letter code.

## Actor input object example

```json
{
  "hashtags": [
    "travel",
    "#fitness"
  ],
  "maxVideosPerHashtag": 50,
  "language": "en",
  "country": "US"
}
```

# Actor output Schema

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

No description

# 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": [
        "travel",
        "#fitness"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("steadydata/youtube-hashtag-videos").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": [
        "travel",
        "#fitness",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("steadydata/youtube-hashtag-videos").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": [
    "travel",
    "#fitness"
  ]
}' |
apify call steadydata/youtube-hashtag-videos --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,steadydata/youtube-hashtag-videos"
        }
    }
}
```

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/lK4k1OzkFU8c8RoDf/builds/GbcaFoURA1fD3R0QR/openapi.json
