{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Video Scraper by Hashtag With Exact Engagement Stats",
    "description": "YouTube Video Scraper By Hashtag extracts videos linked to any YouTube hashtag. Collect titles, creators, views, likes, thumbnails, tags, and metadata. Ideal for trend research, content analysis, competitor tracking, and workflows needing structured hashtag-based YouTube data.",
    "version": "0.1",
    "x-build-id": "n0qIZTumk1WoQjSN3"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/api-empire~youtube-video-scraper-by-hashtag/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-api-empire-youtube-video-scraper-by-hashtag",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/api-empire~youtube-video-scraper-by-hashtag/runs": {
      "post": {
        "operationId": "runs-sync-api-empire-youtube-video-scraper-by-hashtag",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/api-empire~youtube-video-scraper-by-hashtag/run-sync": {
      "post": {
        "operationId": "run-sync-api-empire-youtube-video-scraper-by-hashtag",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "searchTerms": {
            "title": "🎯 Search Terms (#hashtag, keyword or @handle)",
            "type": "array",
            "description": "One or more terms. Examples: #chatgpt, chatgpt, @mkbhd. A '#' is never added for you, so a bare keyword really is a keyword search.",
            "items": {
              "type": "string"
            }
          },
          "hashtags": {
            "title": "♻️ Hashtags (compatibility key)",
            "type": "array",
            "description": "Backward-compatible alias of 'Search Terms' for callers built against the original actor. When this list is filled it takes priority over 'Search Terms'. Leave it empty otherwise.",
            "items": {
              "type": "string"
            }
          },
          "maxResults": {
            "title": "🎬 Videos per Search Term",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "How many videos to keep for each term, counted after filtering. YouTube exhausts a busy hashtag at roughly 300 results, so the ceiling here is 500 rather than a number the site cannot serve.",
            "default": 10
          },
          "scrapeShortsOnly": {
            "title": "📱 Shorts Only",
            "type": "boolean",
            "description": "Restrict results to YouTube Shorts. Shorts are read from the current 'shortsLockupViewModel' shelf shape, and the run stops cleanly when the shelf runs dry.",
            "default": false
          },
          "fetchExactStats": {
            "title": "📈 Fetch Exact Views, Likes & Tags",
            "type": "boolean",
            "description": "Turn on the per-video player lookup that returns the exact view count, the exact like count, the creator's tags, the video category and the ISO upload date. Turn it off for a fast, search-only run.",
            "default": true
          },
          "maxStatLookups": {
            "title": "🧮 Player Lookup Budget (per run)",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "Hard cap on how many videos get the extra player call in one run. Videos past the budget are still returned, flagged with statsFetched = false, never with invented numbers.",
            "default": 100
          },
          "statLookupConcurrency": {
            "title": "⚡ Parallel Lookups",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "How many player lookups run at once. Lower this if YouTube starts refusing calls from your exit IP.",
            "default": 4
          },
          "residentialStatsFallback": {
            "title": "🏠 Auto-Use a Residential Exit for the Player Calls",
            "type": "boolean",
            "description": "YouTube refuses its player endpoint from datacenter IPs ('Sign in to confirm you're not a bot'), which is where Apify runs. With this on, only the small player calls are re-routed through an Apify residential exit — the large search pages stay on the cheap connection. Turn it off and exact views, likes and tags will simply be unavailable, flagged statsFetched = false.",
            "default": true
          },
          "includeFullDescription": {
            "title": "📝 Include the Full Description",
            "type": "boolean",
            "description": "Add the complete video description text to each enriched row. Off by default because descriptions are long and inflate the dataset.",
            "default": false
          },
          "minLikeCount": {
            "title": "👍 Minimum Like Count",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only videos with at least this many likes. 0 disables the filter. Needs the player lookup, which is switched on automatically when you set any filter.",
            "default": 0
          },
          "minExactViewCount": {
            "title": "👁️ Minimum Exact View Count",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only videos with at least this many exact views. 0 disables the filter.",
            "default": 0
          },
          "tagKeywords": {
            "title": "🏷️ Tag Must Contain",
            "type": "array",
            "description": "Keep a video only when at least one of its creator tags contains one of these words (case-insensitive substring match). Leave empty to disable.",
            "items": {
              "type": "string"
            }
          },
          "requireTags": {
            "title": "🔖 Only Videos That Have Tags",
            "type": "boolean",
            "description": "Drop videos whose creator set no tags at all. Tags are creator-dependent, so this can remove a large share of any result set.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "🌐 Proxy Configuration",
            "type": "object",
            "description": "Optional. Pick an Apify proxy group to route the run through a different exit IP."
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}