- Cost
- 1 credit
- Cached repeats
- 0 creditssend max_age_days, results kept 30 days
- Failed requests
- 0 credits
The all tab holds about 30 videos and usually no next page; the short tab pages with cursor.
You send hashtag.
Part of the YouTube Scraper API: 18 YouTube endpoints on one key.
Request
Send your key in the x-api-key header.
1curl -G "https://api.socialscrape.dev/v1/youtube/search/hashtag" \2 -H "x-api-key: $SOCIALSCRAPE_API_KEY" \3 --data-urlencode 'hashtag=minecraft'1import os2import requests34params = {5 "hashtag": "minecraft",6}7res = requests.get(8 "https://api.socialscrape.dev/v1/youtube/search/hashtag",9 headers={"x-api-key": os.environ["SOCIALSCRAPE_API_KEY"]},10 params=params,11 timeout=60,12)13body = res.json()1415if body["ok"]:16 print(body["data"])17else:18 print(body["error"]["code"], body["error"]["message"])1const url = new URL("https://api.socialscrape.dev/v1/youtube/search/hashtag");2url.search = new URLSearchParams({3 hashtag: "minecraft",4}).toString();5const res = await fetch(url, {6 headers: { "x-api-key": process.env.SOCIALSCRAPE_API_KEY! },7});8const body = await res.json();910if (body.ok) {11 console.log(body.data);12} else {13 console.error(body.error.code, body.error.message);14}1{2 "nodes": [3 {4 "name": "SocialScrape YouTube videos by hashtag",5 "type": "n8n-nodes-base.httpRequest",6 "typeVersion": 4.2,7 "position": [8 0,9 010 ],11 "parameters": {12 "method": "GET",13 "url": "https://api.socialscrape.dev/v1/youtube/search/hashtag",14 "sendQuery": true,15 "queryParameters": {16 "parameters": [17 {18 "name": "hashtag",19 "value": "minecraft"20 }21 ]22 },23 "sendHeaders": true,24 "headerParameters": {25 "parameters": [26 {27 "name": "x-api-key",28 "value": "={{ $env.SOCIALSCRAPE_API_KEY }}"29 }30 ]31 }32 }33 }34 ],35 "connections": {}36}Parameters
| Name | Type | Required | Description |
|---|---|---|---|
hashtag | string | yes | Hashtag, with or without #. |
type | string | Kind of result. | |
cursor | string | Opaque cursor from the previous page; pass it back unchanged. Also accepted as continuationToken, continuation_token, next_max_id, max_id, max_cursor, min_time, after, page_token, pageToken, paginationToken, next_page_id, page. |
Every request also accepts trim, raw and max_age_days.
Response
Sample from a recorded response, shortened. Values are examples, not your data.
1{2 "ok": true,3 "credits_charged": 1,4 "credits_remaining": 4999,5 "cached": false,6 "cached_at": null,7 "request_id": "req_1f827a4f0a9a06a75bba3a8b",8 "data": {9 "object": "list",10 "items": [11 {12 "object": "post",13 "platform": "youtube",14 "id": "PkI-vfHANSE",15 "url": "https://www.youtube.com/watch?v=PkI-vfHANSE",16 "type": "video",17 "author": {18 "id": "UC0h07r_UgTD0Tc-Dn5XLX3g",19 "handle": null,20 "name": "Wisp",21 "url": "https://www.youtube.com/channel/UC0h07r_UgTD0Tc-Dn5XLX3g",22 "avatar_url": null,23 "verified": true24 },25 "title": "Minecraft, But Fishing Drops Custom Items...",26 "text": null,27 "published_at": "2026-10-29T00:00:00Z",28 "duration_seconds": 2376,29 "language": null,30 "hashtags": null,31 "mentions": null,32 "stats": {33 "views": 475245,34 "likes": null,35 "comments": null,36 "shares": null,37 "saves": null,38 "dislikes": null39 },40 "media": {41 "thumbnail_url": "https://i.ytimg.com/vi/PkI-vfHANSE/hq2.jpg?sqp=-oaymwEcCNACELwBSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLBvwWMnkOQPKX7UyJXSmA1PjZWcfA",42 "video_url": null,43 "audio_url": null,44 "image_urls": null,45 "width": null,46 "height": null47 },48 "song": null,49 "location": null,50 "is_pinned": null,51 "is_sponsored": null,52 "extra": {53 "published_at_approximate": true,54 "published_text": "1 day ago",55 "views_text": "475,245 views"56 }57 },58 {59 "object": "post",60 "platform": "youtube",61 "id": "UJXwiq0AnW4",62 "url": "https://www.youtube.com/watch?v=UJXwiq0AnW4",63 "type": "video",64 "author": {65 "id": "UCWVSknuLPIRVGWf-4bFKT4Q",66 "handle": null,67 "name": "Johnny Minecraft",68 "url": "https://www.youtube.com/channel/UCWVSknuLPIRVGWf-4bFKT4Q",69 "avatar_url": null,70 "verified": true71 },72 "title": "Hiding in a SECRET BASE INSIDE the TOILET in Minecraft",73 "text": null,74 "published_at": "2026-10-29T18:00:00Z",75 "duration_seconds": 807,76 "language": null,77 "hashtags": null,78 "mentions": null,79 "stats": {80 "views": 81512,81 "likes": null,82 "comments": null,83 "shares": null,84 "saves": null,85 "dislikes": null86 },87 "media": {88 "thumbnail_url": "https://i.ytimg.com/vi/UJXwiq0AnW4/hq2.jpg?sqp=-oaymwEcCNACELwBSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLAlD9UeQyyO3xbKOCesoAfzKuw9xg",89 "video_url": null,90 "audio_url": null,91 "image_urls": null,92 "width": null,93 "height": null94 },95 "song": null,96 "location": null,97 "is_pinned": null,98 "is_sponsored": null,99 "extra": {100 "published_at_approximate": true,101 "published_text": "8 hours ago",102 "views_text": "81,512 views"103 }104 }105 ],106 "cursor": null,107 "has_more": false,108 "parent": null109 },110 "cursor": null,111 "has_more": false112}Fields
A page of results. Each entry in items is a Post. cursor and has_more page through the rest.
A field the platform does not give is null, never made up. Extra platform details are in extra.
| Field | Type | Always | Notes |
|---|---|---|---|
object | "post" | ||
platform | Platform | yes | |
id | string | yes | |
url | string or null | ||
type | "video" or "short" or "reel" or "image" or "carousel" or "story" or "live" or "clip" or "text" or "link" or "tweet" or "pin" or "community_post" or "episode" or "unknown" | ||
author | Author or null | ||
title | string or null | ||
text | string or null | ||
published_at | string (ISO 8601 date-time) or null | ||
duration_seconds | number or null | ||
language | string or null | ||
hashtags | string[] or null | ||
mentions | string[] or null | ||
stats | Stats |
Show the other 6 fields
Full field list in the reference for this endpoint and the data models. Errors are listed under Errors.
Questions
Which errors can it return?
invalid_params (do not retry), not_found (do not retry). Account and platform errors from the errors list can also happen. A failure always costs 0 credits.
How do I get more than one page?
Send the same request with cursor set to the cursor you received, until has_more is false. Each page costs its own price. See pagination.
Is there an SDK call for it?
The Python client has client.youtube.search_hashtag(...) and the TypeScript client client.youtube.searchHashtag(). Both return the same envelope as the HTTP API. Install them from PyPI (socialscrape-sdk) or npm (socialscrape); plain HTTP works in any language.
Can an AI agent call it?
Yes. The MCP server, which you run on your own machine, reaches every built endpoint, with the same prices.