> ## Documentation Index
> Fetch the complete documentation index at: https://docs.scraperize.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Hashtag search

> Searches YouTube for a hashtag and returns what YouTube shows, in its order: videos, Shorts, live streams, channels and playlists (including Mixes), about 20–40 per page — or only Shorts with `type=short`. Videos come with their title, link, description snippet, views, upload time, length, channel and thumbnail; Shorts with their title, views, cover and first frame; channels with their handle, avatar, subscribers and verified badge; playlists with their owner, video count and first video. Results shown in a shelf ("Shorts", "Latest from …") say which. The first page also gives the hashtag's own counts (videos and channels using it) and, when YouTube widens the search to a plain word, that word (`includingResultsFor`). Pass the returned `cursor` back (with the same hashtag) for the next page. Only publicly available data is returned.

> [!NOTE]
>
> **Cost: 1 credit** per successful request. Errors and cache hits (`cache_max_age`) are free.

> [accordion] Copy for AI assistant
>
> Paste this into ChatGPT, Claude or your coding assistant to generate working code for this endpoint (use the copy button).
>
> ```text Prompt
> I want to make an API call to /v1/youtube/search/hashtag. Here are the details:
>
> Endpoint: GET https://api.scraperize.com/v1/youtube/search/hashtag
> Description: Searches YouTube for a hashtag and returns what YouTube shows, in its order: videos, Shorts, live streams, channels and playlists (including Mixes), about 20–40 per page — or only Shorts with `type=short`. Videos come with their title, link, description snippet, views, upload time, length, channel and thumbnail; Shorts with their title, views, cover and first frame; channels with their handle, avatar, subscribers and verified badge; playlists with their owner, video count and first video. Results shown in a shelf ("Shorts", "Latest from …") say which. The first page also gives the hashtag's own counts (videos and channels using it) and, when YouTube widens the search to a plain word, that word (`includingResultsFor`). Pass the returned `cursor` back (with the same hashtag) for the next page. Only publicly available data is returned.
>
> Required Headers:
> - x-api-key: Your API key
>
> Parameters:
> - hashtag (string) [required]: The hashtag, with or without `#`, e.g. `funny`.
> - type (select): `all` (default) or `short` (Shorts only). Ignored with a cursor — the cursor keeps its type.
> - cursor (string): The `cursor` from the previous page, to get the next one. Omit for the first page.
> - cache_max_age (select): Optional. Return a cached result if one this age or newer exists — served for **0 credits** with `meta.cached=true` and `meta.cachedAt`. Otherwise a fresh scrape runs (**1 credit**) and refreshes the cache. Omit to always scrape fresh.
>
> Example Response:
> {
>   "data": {
>     "query": "#funny",
>     "type": "all",
>     "hashtag": {
>       "hashtag": "#funny",
>       "url": "https://www.youtube.com/hashtag/funny",
>       "videoCount": 527000000,
>       "videoCountText": "527M videos",
>       "channelCount": 43000000,
>       "channelCountText": "43M channels"
>     },
>     "includingResultsFor": "funny",
>     "estimatedResults": 4486898005,
>     "results": [
>       {
>         "type": "short",
>         "id": "R-xWC7faDCc",
>         "url": "https://www.youtube.com/shorts/R-xWC7faDCc",
>         "title": "The Ultimate Darts Boss #beneagle #action #comedy #funny #karma #trending #viral #karma",
>         "descriptionSnippet": null,
>         "viewCount": 5800000,
>         "viewCountText": "5.8M views",
>         "concurrentViewers": null,
>         "publishedText": null,
>         "wasLive": false,
>         "durationSeconds": null,
>         "durationText": null,
>         "badges": [],
>         "channelId": null,
>         "channelName": null,
>         "channelHandle": null,
>         "isChannelVerified": false,
>         "thumbnailUrl": "https://i.ytimg.com/vi/R-xWC7faDCc/sardefault.jpg?sqp=-oaymwEdCJUDENAFSFWQAgHyq4qpAwwIARUAAIhCcAHAAQY=&rs=AOn4CLDWqADM31sFsvfBv1O4o8CLkD06Gg",
>         "thumbnails": [
>           {
>             "url": "https://i.ytimg.com/vi/R-xWC7faDCc/sardefault.jpg?sqp=-oaymwEdCJUDENAFSFWQAgHyq4qpAwwIARUAAIhCcAHAAQY=&rs=AOn4CLDWqADM31sFsvfBv1O4o8CLkD06Gg",
>             "width": 405,
>             "height": 720
>           }
>         ],
>         "previewUrl": null,
>         "frameUrl": "https://i.ytimg.com/vi/R-xWC7faDCc/frame0.jpg",
>         "collaborators": [],
>         "position": 1,
>         "shelfTitle": "Shorts"
>       }
>     ],
>     "counts": {
>       "video": 4,
>       "short": 30,
>       "live": 0,
>       "channel": 0,
>       "playlist": 0
>     },
>     "count": 34,
>     "cursor": "eyJrIjoiZnVubnkiLCJ0IjoiYWxsIiwiYyI6IkVuQVNCaU5tZFc1dWVScG1VMEpUUTBGUmRHeGxSVTVYWkhreFFtRXpRbVpPU1VsQ1EzcHNhbFZIUm1Ga1ZYQkNWMGRGTUdkblJVeFJWRVl5Vkc1d2IyUkhaRTFS…",
>     "hasMore": true,
>     "fetchedAt": "2026-11-05T19:15:05.825Z"
>   },
>   "meta": {
>     "requestId": "req_8f0c2b7e-1a2b-4c3d-9e8f-0a1b2c3d4e5f",
>     "creditsCharged": 1,
>     "creditsRemaining": 4999,
>     "cached": false
>   }
> }
>
> Please help me write code in my preferred programming language to make this API call and handle the response appropriately. Include error handling and best practices.
> ```


## OpenAPI

````yaml /api-reference/openapi.json get /v1/youtube/search/hashtag
openapi: 3.0.3
info:
  title: Scraperize API
  version: 1.0.0
  description: >-
    Extract public data from social media platforms as clean JSON. Endpoints are
    split by platform and by what they return, e.g. `GET /v1/twitter/tweet`.


    ## Authentication

    Send your API key in the `x-api-key` header (or `Authorization: Bearer
    <key>`). Create keys in your dashboard.


    ## Credits

    Each successful live scrape costs **1 credit**. Credits are prepaid and
    never expire.


    ## Caching

    Every endpoint accepts an optional `cache_max_age`
    (`1d`|`3d`|`7d`|`14d`|`30d`). A cache hit within that window is returned for
    **0 credits**.


    ## Responses

    Success returns `{ "data": …, "meta": { "requestId", … } }`. Errors return
    `{ "error": { "code", "message", "requestId" } }` with a matching HTTP
    status. `meta` on a scrape carries `creditsCharged`, `creditsRemaining`,
    `cached`, and (on a hit) `cachedAt`.


    ## Rate limits

    Requests are limited per team per minute; over the limit returns `429` with
    a `Retry-After` header.
servers:
  - url: https://api.scraperize.com
    description: Production
security:
  - ApiKeyAuth: []
tags:
  - name: Twitter
    description: Twitter / X scraping endpoints
  - name: Facebook
    description: Facebook scraping endpoints
  - name: Linkme
    description: Linkme (link.me) scraping endpoints
  - name: Amazon
    description: Amazon (creator shop / storefront) scraping endpoints
  - name: Linkbio
    description: Linkbio (lnk.bio) scraping endpoints
  - name: Pillar
    description: Pillar (pillar.io) scraping endpoints
  - name: Komi
    description: Komi (komi.io) scraping endpoints
  - name: Linktree
    description: Linktree (linktr.ee) scraping endpoints
  - name: Kick
    description: Kick (kick.com) scraping endpoints
  - name: Snapchat
    description: Snapchat (snapchat.com) scraping endpoints
  - name: Telegram
    description: Telegram (t.me) scraping endpoints
  - name: LinkedIn
    description: LinkedIn scraping endpoints
  - name: Twitch
    description: Twitch scraping endpoints
  - name: TikTok
    description: TikTok (tiktok.com) scraping endpoints
  - name: Instagram
    description: Instagram scraping endpoints
  - name: Lagos Life
    description: Lagos Life scraping endpoints
  - name: Bluesky
    description: Bluesky (bsky.app) scraping endpoints
  - name: Threads
    description: Threads (threads.com) scraping endpoints
  - name: Reddit
    description: Reddit (reddit.com) scraping endpoints
  - name: Rumble
    description: Rumble (rumble.com) scraping endpoints
  - name: Truth Social
    description: Truth Social (truthsocial.com) scraping endpoints
  - name: YouTube
    description: YouTube (youtube.com) scraping endpoints
paths:
  /v1/youtube/search/hashtag:
    get:
      tags:
        - YouTube
      summary: Hashtag search
      description: >-
        Searches YouTube for a hashtag and returns what YouTube shows, in its
        order: videos, Shorts, live streams, channels and playlists (including
        Mixes), about 20–40 per page — or only Shorts with `type=short`. Videos
        come with their title, link, description snippet, views, upload time,
        length, channel and thumbnail; Shorts with their title, views, cover and
        first frame; channels with their handle, avatar, subscribers and
        verified badge; playlists with their owner, video count and first video.
        Results shown in a shelf ("Shorts", "Latest from …") say which. The
        first page also gives the hashtag's own counts (videos and channels
        using it) and, when YouTube widens the search to a plain word, that word
        (`includingResultsFor`). Pass the returned `cursor` back (with the same
        hashtag) for the next page. Only publicly available data is returned.
      parameters:
        - name: hashtag
          in: query
          required: true
          description: The hashtag, with or without `#`, e.g. `funny`.
          schema:
            type: string
          example: funny
        - name: type
          in: query
          required: false
          description: >-
            `all` (default) or `short` (Shorts only). Ignored with a cursor —
            the cursor keeps its type.
          schema:
            type: string
            enum:
              - all
              - short
        - name: cursor
          in: query
          required: false
          description: >-
            The `cursor` from the previous page, to get the next one. Omit for
            the first page.
          schema:
            type: string
        - name: cache_max_age
          in: query
          required: false
          description: >-
            Optional. Return a cached result if one this age or newer exists —
            served for **0 credits** with `meta.cached=true` and
            `meta.cachedAt`. Otherwise a fresh scrape runs (**1 credit**) and
            refreshes the cache. Omit to always scrape fresh.
          schema:
            type: string
            enum:
              - 1d
              - 3d
              - 7d
              - 14d
              - 30d
          example: 7d
      responses:
        '200':
          description: One page of results (empty when nothing matches).
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      query:
                        type: string
                      type:
                        type: string
                      hashtag:
                        type: object
                        nullable: true
                      includingResultsFor:
                        type: string
                        nullable: true
                      estimatedResults:
                        type: integer
                        nullable: true
                      results:
                        type: array
                        items:
                          type: object
                      counts:
                        type: object
                      count:
                        type: integer
                      cursor:
                        type: string
                        nullable: true
                      hasMore:
                        type: boolean
                      fetchedAt:
                        type: string
                        format: date-time
                  meta:
                    type: object
                    description: >-
                      requestId + credit/caching metadata (creditsCharged,
                      creditsRemaining, cached, cachedAt).
                required:
                  - data
                  - meta
              example:
                data:
                  query: '#funny'
                  type: all
                  hashtag:
                    hashtag: '#funny'
                    url: https://www.youtube.com/hashtag/funny
                    videoCount: 527000000
                    videoCountText: 527M videos
                    channelCount: 43000000
                    channelCountText: 43M channels
                  includingResultsFor: funny
                  estimatedResults: 4486898005
                  results:
                    - type: short
                      id: R-xWC7faDCc
                      url: https://www.youtube.com/shorts/R-xWC7faDCc
                      title: >-
                        The Ultimate Darts Boss #beneagle #action #comedy #funny
                        #karma #trending #viral #karma
                      descriptionSnippet: null
                      viewCount: 5800000
                      viewCountText: 5.8M views
                      concurrentViewers: null
                      publishedText: null
                      wasLive: false
                      durationSeconds: null
                      durationText: null
                      badges: []
                      channelId: null
                      channelName: null
                      channelHandle: null
                      isChannelVerified: false
                      thumbnailUrl: >-
                        https://i.ytimg.com/vi/R-xWC7faDCc/sardefault.jpg?sqp=-oaymwEdCJUDENAFSFWQAgHyq4qpAwwIARUAAIhCcAHAAQY=&rs=AOn4CLDWqADM31sFsvfBv1O4o8CLkD06Gg
                      thumbnails:
                        - url: >-
                            https://i.ytimg.com/vi/R-xWC7faDCc/sardefault.jpg?sqp=-oaymwEdCJUDENAFSFWQAgHyq4qpAwwIARUAAIhCcAHAAQY=&rs=AOn4CLDWqADM31sFsvfBv1O4o8CLkD06Gg
                          width: 405
                          height: 720
                        - url: >-
                            https://i.ytimg.com/vi/R-xWC7faDCc/sardefault.jpg?sqp=-oaymwEgCJUDEOAESFWQAgHyq4qpAw8IARUAAIhCcAHAAQbIAQE=&rs=AOn4CLDCc72cSmt1z37C6B1NEOgQ3gbyhQ
                          width: 405
                          height: 608
                      previewUrl: null
                      frameUrl: https://i.ytimg.com/vi/R-xWC7faDCc/frame0.jpg
                      collaborators: []
                      position: 1
                      shelfTitle: Shorts
                    - type: short
                      id: h3r4Af_Cht0
                      url: https://www.youtube.com/shorts/h3r4Af_Cht0
                      title: >-
                        TRY NOT TO LAUGH WATCHING 🤣😂Best Funny Videos
                        Compilation Tiktok 2026  #funny #comedy #funnyvideo
                      descriptionSnippet: null
                      viewCount: 3000000
                      viewCountText: 3M views
                      concurrentViewers: null
                      publishedText: null
                      wasLive: false
                      durationSeconds: null
                      durationText: null
                      badges: []
                      channelId: null
                      channelName: null
                      channelHandle: null
                      isChannelVerified: false
                      thumbnailUrl: >-
                        https://i.ytimg.com/vi/h3r4Af_Cht0/sardefault.jpg?sqp=-oaymwEdCJUDENAFSFWQAgHyq4qpAwwIARUAAIhCcAHAAQY=&rs=AOn4CLDcGw96xTIz7gKlyDVeUUK7PkrnZQ
                      thumbnails:
                        - url: >-
                            https://i.ytimg.com/vi/h3r4Af_Cht0/sardefault.jpg?sqp=-oaymwEdCJUDENAFSFWQAgHyq4qpAwwIARUAAIhCcAHAAQY=&rs=AOn4CLDcGw96xTIz7gKlyDVeUUK7PkrnZQ
                          width: 405
                          height: 720
                        - url: >-
                            https://i.ytimg.com/vi/h3r4Af_Cht0/sardefault.jpg?sqp=-oaymwEgCJUDEOAESFWQAgHyq4qpAw8IARUAAIhCcAHAAQbIAQE=&rs=AOn4CLBeRIWt4wMj7B6lHRJ45Lq3PrQ2Rw
                          width: 405
                          height: 608
                      previewUrl: null
                      frameUrl: https://i.ytimg.com/vi/h3r4Af_Cht0/frame0.jpg
                      collaborators: []
                      position: 2
                      shelfTitle: Shorts
                    - type: short
                      id: PiwwgzvAPd0
                      url: https://www.youtube.com/shorts/PiwwgzvAPd0
                      title: Can You Imagine This Boy
                      descriptionSnippet: null
                      viewCount: 3500000
                      viewCountText: 3.5M views
                      concurrentViewers: null
                      publishedText: null
                      wasLive: false
                      durationSeconds: null
                      durationText: null
                      badges: []
                      channelId: null
                      channelName: null
                      channelHandle: null
                      isChannelVerified: false
                      thumbnailUrl: >-
                        https://i.ytimg.com/vi/PiwwgzvAPd0/oardefault.jpg?sqp=-oaymwEdCJUDENAFSFWQAgHyq4qpAwwIARUAAIhCcAHAAQY=&rs=AOn4CLBFvnVEODZM7ql1CYo5HDkYWqDgZQ
                      thumbnails:
                        - url: >-
                            https://i.ytimg.com/vi/PiwwgzvAPd0/oardefault.jpg?sqp=-oaymwEdCJUDENAFSFWQAgHyq4qpAwwIARUAAIhCcAHAAQY=&rs=AOn4CLBFvnVEODZM7ql1CYo5HDkYWqDgZQ
                          width: 405
                          height: 720
                        - url: >-
                            https://i.ytimg.com/vi/PiwwgzvAPd0/oardefault.jpg?sqp=-oaymwEgCJUDEOAESFWQAgHyq4qpAw8IARUAAIhCcAHAAQbIAQE=&rs=AOn4CLDf4RSKRk38lmMoA5DnDKZJW3NkvA
                          width: 405
                          height: 608
                      previewUrl: null
                      frameUrl: https://i.ytimg.com/vi/PiwwgzvAPd0/frame0.jpg
                      collaborators: []
                      position: 3
                      shelfTitle: Shorts
                  counts:
                    video: 4
                    short: 30
                    live: 0
                    channel: 0
                    playlist: 0
                  count: 34
                  cursor: >-
                    eyJrIjoiZnVubnkiLCJ0IjoiYWxsIiwiYyI6IkVuQVNCaU5tZFc1dWVScG1VMEpUUTBGUmRHeGxSVTVYWkhreFFtRXpRbVpPU1VsQ1EzcHNhbFZIUm1Ga1ZYQkNWMGRGTUdkblJVeFJWRVl5Vkc1d2IyUkhaRTFSYkZkRFFWRjBiRkY2YkhaU1IyeFhVMVJGTkU5TVNVSkNaMjlGUTBGblVVRjFiMEpDUVdkRFJVSnJKVE5FR0lIZzZCZ2lDM05sWVhKamFDMW1aV1ZrIiwiaCI6eyJoYXNodGFnIjoiI2Z1bm55IiwidXJsIjoiaHR0cHM6Ly93d3cueW91dHViZS5jb20vaGFzaHRhZy9mdW5ueSIsInZpZGVvQ291bnQiOjUyNzAwMDAwMCwidmlkZW9Db3VudFRleHQiOiI1MjdNIHZpZGVvcyIsImNoYW5uZWxDb3VudCI6NDMwMDAwMDAsImNoYW5uZWxDb3VudFRleHQiOiI0M00gY2hhbm5lbHMifX0
                  hasMore: true
                  fetchedAt: '2026-11-05T19:15:05.825Z'
                meta:
                  requestId: req_8f0c2b7e-1a2b-4c3d-9e8f-0a1b2c3d4e5f
                  creditsCharged: 1
                  creditsRemaining: 4999
                  cached: false
        '400':
          description: Invalid or expired cursor (or one for another hashtag).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: BAD_REQUEST
                  message: The request was invalid.
                  requestId: req_8f0c2b7e-1a2b-4c3d-9e8f-0a1b2c3d4e5f
        '401':
          description: Missing, invalid, or revoked API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: UNAUTHORIZED
                  message: API key required — pass it in the `x-api-key` header.
                  requestId: req_8f0c2b7e-1a2b-4c3d-9e8f-0a1b2c3d4e5f
        '402':
          description: Not enough credits for this request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: INSUFFICIENT_CREDITS
                  message: >-
                    This request costs 1 credit, but your balance is 0. Top up
                    to continue.
                  requestId: req_8f0c2b7e-1a2b-4c3d-9e8f-0a1b2c3d4e5f
        '422':
          description: >-
            Invalid query parameters (hashtag is required; type is `all` or
            `short`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: VALIDATION_ERROR
                  message: Request validation failed
                  requestId: req_8f0c2b7e-1a2b-4c3d-9e8f-0a1b2c3d4e5f
                  details:
                    - path: url
                      message: url is required
        '429':
          description: Over the per-minute rate limit — honour `Retry-After`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: RATE_LIMITED
                  message: >-
                    Rate limit exceeded — max 100 requests per 60s. Retry in
                    ~30s.
                  requestId: req_8f0c2b7e-1a2b-4c3d-9e8f-0a1b2c3d4e5f
        '503':
          description: >-
            Temporarily unavailable — retry after `Retry-After`. `error.code`
            tells you why: `UPSTREAM_BLOCKED` (the source blocked this request),
            `EXTRACTION_FAILED` (the source returned unexpected data),
            `PLATFORM_UNAVAILABLE` (the source is down), or
            `SERVICE_UNAVAILABLE` (we are at capacity).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: UPSTREAM_BLOCKED
                  message: >-
                    The source is temporarily unavailable. Please try again
                    shortly.
                  requestId: req_8f0c2b7e-1a2b-4c3d-9e8f-0a1b2c3d4e5f
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              example: NOT_FOUND
            message:
              type: string
              example: The requested content was not found.
            requestId:
              type: string
              example: req_8f0c2b7e-1a2b-4c3d-9e8f-0a1b2c3d4e5f
            details:
              type: array
              items:
                type: object
              description: Present on validation errors.
          required:
            - code
            - message
            - requestId
      required:
        - error
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        Your API key. Send it in the `x-api-key` header (or `Authorization:
        Bearer <key>`). Create and manage keys from your dashboard.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.