# YouTube Hashtag Videos – Search Results & Metadata (`scrapingmonkey/youtube-hashtag-videos-scraper`) Actor

Search YouTube for hashtags and export video and Shorts results. Get titles, links, view labels, thumbnails, durations, and author context with configurable pagination.

- **URL**: https://apify.com/scrapingmonkey/youtube-hashtag-videos-scraper.md
- **Developed by:** [ScrapingMonkey](https://apify.com/scrapingmonkey) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 results

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?

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

Find YouTube video and Shorts results for a hashtag query. **YouTube Hashtag Videos Scraper** searches for # followed by your tag and exports the returned titles, links, available view labels, durations, thumbnails, and creator details.

Use it for topic discovery and repeatable research from known hashtags. Results follow YouTube search relevance; membership in an exact hashtag feed is not verified.

| At a glance | Details |
| --- | --- |
| 📥 Input | Hashtags with or without # |
| 📤 Output | Video and Shorts search results for hashtags, with titles, links, public labels, and author context |
| 🔐 Login required | No |
| 📄 Collection | Configurable result pages per input |
| 💾 Delivery | One row per video or Short result, in one table |

### What the YouTube hashtag videos scraper collects 🔎

The Actor submits each tag as a YouTube search query and keeps video and Shorts results.

- Original input, normalized #hashtag query, and saved-result position
- Video or Short ID, public URL, type, and title
- Available description snippet, view count, and displayed view label
- Duration, publication text, badges, and exposed content-state flags
- Thumbnail references with available sizes
- Author identity, channel link, and avatar details when exposed

Playlist and channel cards are excluded. The Actor does not inspect every result's full description to confirm that it explicitly contains the hashtag.

### How to scrape YouTube hashtag videos 🚀

1. Prepare the hashtags you want to collect.
2. Add them to `inputList`, one value per item.
3. Set `pagesPerInput` and start the Actor.
4. Check `status` and export the fields needed for your workflow.

```json
{
  "inputList": [
    "space"
  ],
  "pagesPerInput": 1
}
```

### YouTube hashtag videos data fields and output 📦

| Field group | Included data |
| --- | --- |
| Query and result | Input, normalized hashtag query, result position, ID, URL, and type |
| Content preview | Title, description snippet, thumbnail variants, and author context |
| Public card labels | Available views, duration, publication text, badges, and flags |

Complete illustrative success item. The fictional values below demonstrate the output and are not a live result:

```json
{
  "input": "hiking",
  "status": "success",
  "id": "TrailWalk01",
  "url": "https://www.youtube.com/watch?v=TrailWalk01",
  "type": "video",
  "title": "A quiet forest loop: route guide",
  "description": "A shaded forest loop with route notes at https://example.com/trail #hiking",
  "thumbnail_url": "https://example.com/trail-large.jpg",
  "thumbnails.url": [
    "https://example.com/trail-small.jpg",
    "https://example.com/trail-large.jpg"
  ],
  "thumbnails.width": [
    160,
    1280
  ],
  "thumbnails.height": [
    90,
    720
  ],
  "duration_seconds": 150,
  "duration_text": "2:30",
  "views": 123000,
  "views_text": "123K views",
  "published_text": "2 days ago",
  "badges": [],
  "is_live": false,
  "is_upcoming": false,
  "is_premiere": false,
  "is_members_only": false,
  "stream_status": null,
  "scheduled_start_time": null,
  "accessibility_text": "A quiet forest loop: route guide by Trail Journal",
  "author.id": "UCabcdefghijklmnopqrstuv",
  "author.name": "Trail Journal",
  "author.handle": "@TrailJournal",
  "author.url": "https://www.youtube.com/@TrailJournal",
  "author.avatar_url": "https://example.com/trail-large.jpg",
  "author.avatar_thumbnails.url": [
    "https://example.com/trail-small.jpg",
    "https://example.com/trail-large.jpg"
  ],
  "author.avatar_thumbnails.width": [
    160,
    800
  ],
  "author.avatar_thumbnails.height": [
    160,
    800
  ],
  "author.is_verified": false,
  "query": "#hiking",
  "position": 1
}
```

The table and JSON use the same flat field names, including literal dotted keys. The query field records the normalized hashtag search. position reflects saved-result order within that input, not an absolute YouTube ranking. Thumbnail and author-avatar fields use aligned URL, width, and height lists. Shorts cards can have fewer populated fields than ordinary video cards.

Optional values can be `null`, empty strings, `false`, or empty lists. Missing counts are normally `null`; numeric values parsed from abbreviated labels remain approximate. Failed rows preserve `input` and `status` and set the result-data fields to `null`. `position` is the running order of saved results for that input, not a global ranking.

### Input requirements and coverage ⚙️

| Parameter | Type | Default | Rules |
| --- | --- | --- | --- |
| `inputList` | array of strings | Required | One or more hashtags, with or without #. Submit one tag per string, without spaces or a URL. No fixed batch-size maximum. |
| `pagesPerInput` | integer | `1` | At least 1; no fixed upper bound. Limits result pages for each input. |

The Actor removes one leading # and searches YouTube for # followed by the tag. Values containing spaces, another #, /, ?, or & are rejected. Matching follows YouTube search relevance and does not verify that every video explicitly uses the hashtag.

YouTube controls page size. Collection stops at the requested page limit or when the list ends, whichever comes first. The initial result page counts as page 1; each continuation uses another page. Repeated items within an input are skipped, but repeating the input itself starts a separate collection.

### YouTube hashtag videos use cases 🎯

#### Topic discovery

Collect candidate videos and Shorts around a hashtag, then review their relevance before using them in an analysis.

#### Creator research

Identify public channel links associated with returned videos and shortlist creators for a separate channel-profile lookup.

#### Content comparisons

Compare result titles, types, thumbnails, and available view labels across a set of topic tags.

#### Repeatable search snapshots

Schedule the same tags and compare result exports while accounting for changes in YouTube's search ordering.

### Pricing and billable video result rows 💰

Check the Actor's **Pricing** tab for the current pricing model and rate.

Under dataset-item pricing, each saved success or failed row can be billable. Automatic retry attempts do not independently add rows. The number of billable items follows saved results, not requested pages. A collection that ends without results or a failed request can produce a failed row; if a later page fails, earlier saved results remain.

Image variants and other list fields remain in their parent row and do not create separate dataset items.

### YouTube Hashtag Videos Scraper API and integrations 🔌

Use the Actor ID from the **API** tab as $ACTOR\_ID and your Apify token as $APIFY\_TOKEN.

```bash
curl -X POST "https://api.apify.com/v2/acts/$ACTOR_ID/runs?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"inputList":["space"],"pagesPerInput":1}'
```

The request starts a run. Retrieve the dataset when it finishes, or use a completion webhook to send results to your application. Apify schedules can repeat collection; exports and integrations support JSON, CSV, Excel, Google Sheets, Make, and Zapier workflows.

### Reliability and limits ⚠️

Up to five requests run concurrently, with automatic retries for temporary failures. Invalid, unavailable, or unresolved inputs are visible as failed rows. YouTube can restrict public access or omit fields.

Hashtag input is converted to a #tag search. Search results are not an exhaustive or verified set of videos carrying that hashtag, and relevance can change over time or by location. Only exposed video and Shorts cards are collected; missing card fields remain absent. There are no date, sort, duration, or exact-membership filters in the input.

Pagination preserves results already saved, but a page limit, inaccessible continuation, or changing source list can leave a partial collection. A completed run does not prove that every historical item was available.

### Frequently asked questions ❓

#### Is this the exact list of videos using a hashtag?

No. It searches YouTube for #tag and returns video and Shorts results. YouTube may include related results that do not explicitly use the tag.

#### Should I include the # symbol?

Either form is accepted. The Actor normalizes a plain tag such as space to the query #space.

#### Can I paste a hashtag page URL?

No. Submit one tag per string, without spaces or a URL.

#### Will results include Shorts?

Yes. The output type distinguishes ordinary videos from Shorts. Channel and playlist cards are excluded.

#### Can I sort by upload date or restrict duration?

There are no sort, date, or duration inputs. pagesPerInput controls collection depth.

#### Are the results globally deduplicated across hashtags?

No. Repeated results are skipped within an input. The same video can appear in separate rows for different submitted tags.

### Support, responsible use, and related actors 🛟

For support, share the run ID and a safe public example input through the Actor's support channel. Keep tokens and credentials out of messages.

Use public data and media within the privacy, copyright, and other obligations that apply to your project.

# Actor input Schema

## `inputList` (type: `array`):

Add one hashtag per item, with or without #. This actor uses YouTube search for #hashtag and returns video and Shorts results; it is not an exact-membership hashtag feed.

## `pagesPerInput` (type: `integer`):

Number of result pages to collect for each input. YouTube controls the page size. Results are saved after each page; collection stops when the list ends. Bootstrap requests do not count as result pages.

## Actor input object example

```json
{
  "inputList": [
    "space"
  ],
  "pagesPerInput": 1
}
```

# Actor output Schema

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

Success and failed rows. Check the status column.

# 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 = {
    "inputList": [
        "space"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapingmonkey/youtube-hashtag-videos-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 = { "inputList": ["space"] }

# Run the Actor and wait for it to finish
run = client.actor("scrapingmonkey/youtube-hashtag-videos-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 '{
  "inputList": [
    "space"
  ]
}' |
apify call scrapingmonkey/youtube-hashtag-videos-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,scrapingmonkey/youtube-hashtag-videos-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/67p0MQLXHPHjb4LEp/builds/bOz0T1chudLhNLsEk/openapi.json
