New: the Scrapier MCP server. Every scraper in Claude Code with one command. See how →
GET/api/v2/youtube-hashtag-videos/

YouTube Video Scraper By Hashtag

The videos and Shorts under a YouTube hashtag as typed JSON, a page at a time: title, URL, channel name, view count, publish time and whether it is a Short. Pass the hashtag without #. 1 credit per page. No YouTube login.

Free API key · 1 credit per page of videos · failed calls free

Last updated
// GET /api/v2/youtube-hashtag-videos/?hashtags=chatgpt · sample from the catalog
{
  "success": true,
  "data": {
    "hashtags": "chatgpt",
    "page": 1,
    "page_size": 25,
    "videos": [
      {
        "video_id": "dQw4w9WgXcQ",
        "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
        "title": "ChatGPT trick for productivity",
        "channel_name": "Example Channel",
        "view_count": 124000,
        "published_at": "2026-11-25T10:00:00Z",
        "is_short": false,
        "scraped_at": "2026-12-01T12:00:00.000Z",
        "input_hashtag": "chatgpt"
      }
    ],
    "next_cursor": "eyJoIjoiYWJjMTIzZGVmIiwiaSI6ImNoYXRncHQiLCJwIjoyLCJsayI6e319"
  }
}
Copy for your AI agent
Quick answer

Scrapier's YouTube Video Scraper By Hashtag returns the videos and Shorts under a YouTube hashtag as JSON, a page at a time: title, url, channel_name, view_count, published_at and is_short. It costs 1 credit per successful call. No YouTube login.

Every request is fetched live at call time · failed calls are free

YouTube Video Scraper By Hashtag extracts the videos listed under a hashtag, one page per call: video ID, title, watch URL, channel name, view count, publish time and a flag for Shorts. Limit the results to Shorts or to regular videos only. Every response is structured JSON, ready to pass directly to an LLM, index into a vector store or feed a trend-tracking pipeline. It is one of 17 YouTube endpoints on the same API key used by 12,000+ developers. Follow next_cursor to read the next page.

What data can I extract with YouTube Video Scraper By Hashtag?

Using this YouTube Video Scraper By Hashtag, you can extract the following data from public YouTube pages of videos:

Video title
Channel name
View count
Publish time
Short or regular video flag
Watch URL
Video ID
Your hashtag, echoed back
Scrape timestamp
Page size and next cursor

Want the exact field names? See the example output.

Playground

Try YouTube Video Scraper By Hashtag Live

Press Run to see the catalog sample. Add your API key and it runs a real call to the Scrapier API from your browser. The key is sent only to proxy.scrapier.io and never stored.

YouTubeYouTube Hashtag VideosLive

Parameters
+ Run live with your API key
Response
Sample dataCatalog sample, run to see live data

How to use YouTube Video Scraper By Hashtag

Hand it to your AI assistant, or run it yourself in five steps.

Copy to your AI assistant

Paste this into ChatGPT, Claude or Cursor and it knows how to call the scraper.

Use the Scrapier YouTube Video Scraper By Hashtag to get public YouTube pages of videos. Endpoint: GET https://proxy.scrapier.io/api/v2/youtube-hashtag-videos/?hashtags={hashtags} with header "X-API-Key: YOUR_API_KEY" and a 210-second timeout. Send one value per call in hashtags; for a list, make one call per value, at most 3 in parallel. It returns JSON under data.videos: video_id, url, title, channel_name, view_count, published_at, is_short, scraped_at, input_hashtag. Each successful call costs 1 credit; failed calls are free. If you support MCP, run: claude mcp add -t http scrapier https://mcp.scrapier.io/mcp --header "X-API-Key: YOUR_API_KEY" and call run_scrape with endpoint "youtube-hashtag-videos" (find it with search_endpoints).
YouTube Video Scraper By Hashtag MCP Server

Use this scraper from ChatGPT, Claude or Cursor. Point your assistant at Scrapier and it reads YouTube pages of videos on its own: no glue code, no scraping logic in your prompts.

MCP setup →

Run it yourself

  1. Get your free Scrapier API keySign up at app.scrapier.io; the free tier lets you try it first.
  2. Open YouTube Video Scraper By Hashtag in the catalogIt lives under Scrapers / YouTube.
  3. Enter the hashtag without the # signFor example chatgpt in hashtags. Set scrape_shorts_only or scrape_videos_only to true to narrow the results.
  4. Send your API requestOne GET with your key in the X-API-Key header, or one run_scrape call from your agent. Set a 210-second client timeout.
  5. Save your resultsEach page comes back as JSON in data.videos: store it as is, or flatten it to CSV. Pass data.next_cursor back to get the next page until it is null.

How to scale to bulk YouTube pages of videos

hashtags takes one hashtag per call, so for a list of tags you loop: one request per hashtag. Within a hashtag, pass back data.next_cursor to page through the results. Run up to 3 requests in parallel per API key; above that the API answers 429 with a Retry-After header, and throttled calls cost nothing. Each page is 1 credit and failed calls are free, so 1,000 pages cost 1,000 credits, inside the Hobby plan's 15,000.

Features

YouTube Video Scraper By Hashtag turns a hashtag page into clean rows. It suits trend research, topic monitoring, content ideation and any workflow that needs the videos creators publish under a tag, with channel and view data attached.

It extracts, per page of videos
  • Videostitle, url and video_id for each result
  • Channelchannel_name of the uploader
  • Reachview_count as a number you can sort and chart
  • Typeis_short marks Shorts; two flags filter to Shorts or videos only
  • Timingpublished_at as a timestamp
  • Pagingnext_cursor walks the hashtag page by page

Proxies, retries and parsing run on Scrapier's side, so you send one request and get JSON back, at 1 credit per page of videos and 0 credits for a failed call.

Use cases

  • Trend analyst checks the videos under 20 hashtags every week and ranks them by view_count to see which topics are growing.
  • Content strategist lists the Shorts under a niche hashtag to study titles and channels that already reach the audience.
  • Brand monitor tracks a campaign hashtag and posts new url values to a team channel.
  • Researcher exports hashtag results into a dataset, one row per video, for a study of how a topic spreads.
  • AI engineer gives an agent a tool that fetches the videos under a hashtag, then passes each url to the video details endpoint for the full record.

Running these from an agent? Use the MCP integration and let Claude or Cursor call the scraper directly.

Why choose this Scraper API?

Videos and Shorts, split on demand.

is_short is on every row, and scrape_shorts_only or scrape_videos_only narrow the whole result before you pay for it.

Plain hashtag input.

hashtags takes the tag without #, with aliases hashtag, tags and tag, and the response echoes it in input_hashtag.

One envelope, 17 YouTube endpoints.

Hashtag, video details, channel and search endpoints share the same key and response envelope, so a result feeds the next call without new code.

Input

The scraper takes one hashtag per call in hashtags, written without the # sign. It is required on the first call and ignored once you pass a cursor. The two Shorts and videos flags are optional and locked in the cursor. Send parameters in the query string (GET) or as a JSON body (POST).

NameTypeRequiredDefaultDescription
hashtagsstringYes—A hashtag without #. One per call. Required on the first call; ignored when cursor is supplied. Aliases: hashtag, tags, tag
cursorstringNo—Pass back data.next_cursor from the previous response to get the next page; null means the last page
scrape_shorts_onlybooleanNofalsetrue returns only Shorts (default false). Locked in the cursor
scrape_videos_onlybooleanNofalsetrue returns only regular videos (default false). Locked in the cursor
use_proxybooleanNotrueRoute through Scrapier's residential proxy pool. Leave as is
raw_databooleanNofalseReturn YouTube's raw upstream payload under raw_responses instead of the formatted items

One hashtag per call: to scan ten tags, make ten calls and page each with cursor. Booleans are the strings true or false.

Example input

POST body · input.json
{
  "hashtags": "chatgpt",
  "scrape_shorts_only": "false",
  "scrape_videos_only": "false",
  "use_proxy": "true",
  "raw_data": "false"
}

Error codes

StatusMeaningBilledFix
200Page of videos data returned in data.videosYes—
400Bad or missing inputNoCheck hashtags: one value per call
401X-API-Key header missingNoAdd the header
402Out of credits (body has balance)NoTop up; retrying will not help
403Invalid or revoked API keyNoCheck the key in your dashboard
429ThrottledNoWait Retry-After seconds, then retry
5xxUpstream failure or timeoutNoRetry with backoff; set a 210 s client timeout

From the error reference. Any non-2xx response costs 0 credits.

Output

Typed JSON with the same schema on every call. One call returns a page of videos under videos, each with 9 fields, inside the standard data envelope. Field names stay the same on every call. Set raw_data to true if you want YouTube's raw payload instead.

Example output

200 OK · 1 credit · catalog sample
{
  "success": true,
  "data": {
    "hashtags": "chatgpt",
    "page": 1,
    "page_size": 25,
    "videos": [
      {
        "video_id": "dQw4w9WgXcQ",
        "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
        "title": "ChatGPT trick for productivity",
        "channel_name": "Example Channel",
        "view_count": 124000,
        "published_at": "2026-11-25T10:00:00Z",
        "is_short": false,
        "scraped_at": "2026-12-01T12:00:00.000Z",
        "input_hashtag": "chatgpt"
      }
    ],
    "next_cursor": "eyJoIjoiYWJjMTIzZGVmIiwiaSI6ImNoYXRncHQiLCJwIjoyLCJsayI6e319"
  }
}

The catalog's sample response for hashtags=chatgpt, labelled as a sample: live calls return the account's current values.

Video

FieldTypeExampleDescription
videos.video_idstring"dQw4w9WgXcQ"YouTube video ID
videos.titlestring"ChatGPT trick for productivity"Title of the video
videos.urlstring"https://www.youtube.com/watch?v=dQw4w9WgXcQ"Watch URL of the video
videos.is_shortbooleanfalsetrue when the result is a Short

Channel and reach

FieldTypeExampleDescription
videos.channel_namestring"Example Channel"Name of the uploading channel
videos.view_countinteger124000Views as a number
videos.published_atstring"2026-11-25T10:00:00Z"When the video was published (ISO 8601)

Input and timestamp

FieldTypeExampleDescription
videos.input_hashtagstring"chatgpt"The hashtag you sent
videos.scraped_atstring"2026-12-01T12:00:00.000Z"When Scrapier read the page (ISO 8601, UTC)

Response envelope and paging

FieldTypeExampleDescription
successbooleantruetrue on every 200 response
data.hashtagsstring"chatgpt"Your hashtag, echoed back
data.pageinteger1Page number of this response
data.page_sizeinteger25Videos per page
data.next_cursorstring"eyJoIjoiYWJjMTIzZGVmIiwiaSI6ImNoYXRncHQiLCJ…"Pass back as cursor for the next page; null on the last page

How does it work?

01

Scrapier sends each request through its residential proxy pool (use_proxy, on by default), so you never manage IPs or proxy accounts.

02

Retries and parsing of YouTube's pages and responses happen on Scrapier's side. You send one HTTP request and get typed JSON back.

03

Only publicly visible data is returned: what any visitor sees without signing in. No YouTube account, cookie or Google API key is used for this endpoint.

04

The schema is stable. When YouTube changes, Scrapier updates the scraper; the field names under videos stay the same.

How do you integrate YouTube Video Scraper By Hashtag into your stack?

It works with what you already use: any HTTP client, AI agents over MCP, and no-code automation tools. Code samples for cURL, Python and Node.js are on the API tab.

MCP integration for AI agents

claude mcp add -t http scrapier …

This registers the Scrapier MCP server, whose tools reach every Scrapier scraper, including youtube-hashtag-videos: the agent finds it with search_endpoints and calls it with run_scrape. Works with Claude Code, Cursor and Windsurf. MCP calls are billed like REST: 1 credit per successful call. Full MCP setup →

No-code tools (n8n, Make, LangChain)

n8n

Use the HTTP Request node with your Scrapier API key in an X-API-Key header and point it at /api/v2/youtube-hashtag-videos/ with a hashtags query parameter. Map data.videos into the next node.

Make

Add an HTTP "Make a request" module with the same header and URL, and parse the response as JSON. Map title and view_count straight into Sheets, Airtable or your CRM.

LangChain

Wrap the endpoint in a requests-based tool, or load the Scrapier MCP server through LangChain's MCP adapters so the agent finds youtube-hashtag-videos with search_endpoints itself.

Pricing and Rate Limits

One YouTube page of videos costs 1 credit, so 1,000 pages of videos cost 1,000 credits: $1.58 on the Pro plan. Failed and empty calls are not billed. Run up to 3 requests in parallel per key; above that the API answers 429 with a Retry-After header.

PlanMonthly priceCreditsPages of videos includedPer 1,000 pages of videos
Hobby$2915,00015,000$1.93
Pro$7950,00050,000$1.58
Scale$299250,000250,000$1.20
EnterpriseCustom volume and terms

Prices from the live billing page. See all plans and limits.

Call cost and timing

1credit per successful call
0credits for a failed call
3parallel requests per key
210srecommended client timeout

How we measure this

Credit cost, pagination and the sample come from the live catalog (GET /api/v2/endpoints, /youtube-hashtag-videos/, checked 9 Nov 2026). Concurrency and timeout guidance come from the rate limits page of the docs. Scrapier does not publish latency or success-rate figures for this endpoint, so none are shown here.

YouTube Video Scraper By Hashtag vs the Official YouTube API

FeatureScrapier page of videos scraperOfficial YouTube API
Access neededOne Scrapier API keyA Google Cloud project, an API key and a daily quota
Which videosVideos and Shorts listed under a hashtagNo hashtag lookup resource; hashtag text can be used as a search query
Fields returned9 fields per video: title, URL, channel, views, date and Short flagDepends on the resources and parts you request and combine
Rate limitsUp to 3 parallel requests per key; 429 with Retry-AfterDaily quota units set per Google Cloud project
SetupSign up, copy a key, send a requestCreate a project, enable the API, create credentials
Cost1 credit per page, from $1.20 per 1,000 pagesFree within quota; search calls use a large share of it

The official YouTube Data API is the better choice when you need data tied to a channel you own, or must follow Google's API terms for a published app.

Frequently asked questions

What fields does YouTube Video Scraper By Hashtag return?

Each video has title, url, video_id, channel_name, view_count, published_at, is_short, input_hashtag and scraped_at: 9 fields in data.videos. Each successful call costs 1 credit and needs no YouTube login.

Do I include the # sign in the hashtag?

No. Send the tag without #, for example chatgpt. The hashtags parameter also answers to the aliases hashtag, tags and tag, and the response echoes your input in input_hashtag.

Can I get only Shorts or only regular videos?

Yes. Set scrape_shorts_only to true for Shorts, or scrape_videos_only to true for regular videos. Both default to false, which returns both, and each row has is_short. The choice is locked into the cursor.

How do I get more than the first page of results?

Pass data.next_cursor back as cursor on the next call. Each page is one call at 1 credit, and a null next_cursor means you reached the end. Keep the hashtag the same while you page.

Does YouTube Video Scraper By Hashtag require a YouTube account or login?

No. The YouTube Video Scraper By Hashtag uses no YouTube account or cookies: you send your Scrapier API key in the X-API-Key header and a hashtag, and get JSON back. Only public YouTube data is returned, and no Google API key or quota is involved.

How fast does YouTube Video Scraper By Hashtag run?

Scrapier does not publish a latency figure for this endpoint. Each call reads YouTube live, and scraped_at in the response records when. Set a client timeout of 210 seconds, as the docs recommend for every endpoint.

What happens if the input is wrong or YouTube returns nothing?

If a call fails, the API returns a non-2xx status and costs 0 credits. In code, check the status, then skip that input or retry it later. Throttled calls (429 with a Retry-After header) are free as well, so retry loops cost nothing.

Does YouTube Video Scraper By Hashtag work with Claude, ChatGPT and other AI agent tools?

Yes. Connect the Scrapier MCP server with claude mcp add -t http scrapier https://mcp.scrapier.io/mcp and your API key in an X-API-Key header; it works in Claude Code, Cursor and Windsurf. The agent finds youtube-hashtag-videos with search_endpoints and calls it with run_scrape. Any agent that can call an HTTP endpoint can use the REST API directly.

How does it compare to other YouTube scrapers?

Scrapier charges a flat 1 credit per successful call, and failed calls are free; platforms that bill compute units vary with run time and infrastructure. The same API key and MCP server reach all 199 Scrapier endpoints. Scrapier returns structured JSON for public YouTube data.

Does it return data in a format LLMs can use directly?

Yes. Every response is typed JSON with the same field names on every call: no HTML parsing and no selectors. Pass it straight to an LLM, index it into a vector store or return it from an agent tool.

What happens when YouTube changes its layout or anti-bot system?

Scrapier maintains the scraper. When YouTube changes its pages or internal responses, Scrapier updates it, and your calls keep returning the same JSON field names without changes on your end.

How much does it cost to run YouTube Video Scraper By Hashtag 1,000 times?

1,000 credits, because each call is 1 credit. That is about $1.93 on Hobby, $1.58 on Pro and $1.20 on Scale, at the plans' price per credit. Failed calls are free.

How do I use YouTube Video Scraper By Hashtag with Python?

Send a GET request with the requests library to https://proxy.scrapier.io/api/v2/youtube-hashtag-videos/ with params={"hashtags": "chatgpt"}, your key in the X-API-Key header and timeout=210. Read r.json()["data"]["videos"]: it is already JSON, so no HTML parsing is needed.

Is it legal to scrape YouTube data?

It depends on your use and your country, so this is not legal advice. Scrapier returns public YouTube data only. YouTube's terms and privacy law such as GDPR or CCPA apply to how you store and use it. Collect only what you need, and ask a lawyer about your specific case.

Your feedback

Found a bug or missing a field? Let us know. Write to support@scrapier.io and the team replies to every report.

Get started

Start Scraping YouTube Pages Of Videos

Public YouTube pages of videos as JSON, 1 credit each, from REST or MCP.