{
  "openapi": "3.0.1",
  "info": {
    "title": "TikTok Hashtag Scraper - Video Analytics",
    "description": "Scrape public TikTok videos from one or more hashtags and get views, likes, comments, shares, saves, engagement rate, creator data, music metadata, captions, timestamps, thumbnails, and quality filters. Cookieless, provider-backed, MCP-ready.",
    "version": "0.1",
    "x-build-id": "jIAFR9TPZQaiChIu4"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/khadinakbar~tiktok-hashtag-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-khadinakbar-tiktok-hashtag-scraper",
        "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/khadinakbar~tiktok-hashtag-scraper/runs": {
      "post": {
        "operationId": "runs-sync-khadinakbar-tiktok-hashtag-scraper",
        "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/khadinakbar~tiktok-hashtag-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-khadinakbar-tiktok-hashtag-scraper",
        "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": {
          "hashtags": {
            "title": "Hashtags",
            "type": "array",
            "description": "Use this when you want videos from one or more public TikTok hashtag feeds. Enter names with or without '#', for example 'fitness' or '#booktok'. Defaults to the prefill if you run the example task. Not for TikTok profiles, comments, or keyword search.",
            "items": {
              "type": "string"
            }
          },
          "hashtagUrls": {
            "title": "Hashtag URLs",
            "type": "array",
            "description": "Use this when you already have TikTok /tag/ URLs instead of plain hashtag names. Accepts URLs like 'https://www.tiktok.com/tag/skincare'. Empty by default. Not for video URLs or profile URLs.",
            "items": {
              "type": "string"
            }
          },
          "maxVideosPerHashtag": {
            "title": "Max videos per hashtag",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum filter-passing videos to save and charge for per hashtag. Accepts 1 to 10000, for example 50. Defaults to 50. This is a per-hashtag cap, not the total cap across all hashtags.",
            "default": 50
          },
          "region": {
            "title": "Region",
            "type": "string",
            "description": "Two-letter ISO country code used to localize TikTok hashtag results. Use values like 'US', 'GB', or 'DE'. Defaults to 'US'. Not a language filter or city-level location.",
            "default": "US"
          },
          "minViews": {
            "title": "Minimum views",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only videos with at least this many plays/views. Use 100000 to focus on viral posts. Defaults to 0, which keeps all view counts. Filtered-out videos are not saved or charged.",
            "default": 0
          },
          "minLikes": {
            "title": "Minimum likes",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only videos with at least this many likes. Use 5000 to focus on posts with proven engagement. Defaults to 0. Not a sort option; it removes rows below the threshold.",
            "default": 0
          },
          "minComments": {
            "title": "Minimum comments",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only videos with at least this many comments. Use 100 to find discussion-heavy hashtag posts. Defaults to 0. Not for downloading comments; use a TikTok comments actor for comment text.",
            "default": 0
          },
          "minShares": {
            "title": "Minimum shares",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only videos with at least this many shares. Use 100 to find posts spreading beyond the original audience. Defaults to 0. Not a share-export option.",
            "default": 0
          },
          "minDurationSeconds": {
            "title": "Minimum duration",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only videos at least this many seconds long. Use 15 to skip very short clips. Defaults to 0. Videos missing duration are dropped only when this filter is set.",
            "default": 0
          },
          "maxDurationSeconds": {
            "title": "Maximum duration",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only videos no longer than this many seconds. Use 60 to focus on short-form clips. Defaults to 0, meaning no upper limit. Videos missing duration are dropped only when this filter is set.",
            "default": 0
          },
          "includePhotoPosts": {
            "title": "Include photo posts",
            "type": "boolean",
            "description": "TikTok hashtag feeds can include image carousel posts. Keep true to include them, or set false to keep video posts only. Defaults to true. Not a media download option.",
            "default": true
          },
          "maxPagesPerHashtag": {
            "title": "Max pages per hashtag",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Safety cap for provider pagination per hashtag. Accepts 1 to 500, for example 20. Defaults to 20. Raise it only when maxVideosPerHashtag is high or filters are strict.",
            "default": 20
          },
          "providerOrder": {
            "title": "Data provider",
            "enum": [
              "scrapecreators-first",
              "sociavault-first",
              "scrapecreators-only",
              "sociavault-only"
            ],
            "type": "string",
            "description": "Controls provider routing for public TikTok hashtag data. 'scrapecreators-first' uses ScrapeCreators then SociaVault, for example. Defaults to ScrapeCreators first. Not a user API key field; provider keys are owner secrets.",
            "default": "scrapecreators-first"
          },
          "includeRawData": {
            "title": "Include raw provider data",
            "type": "boolean",
            "description": "Attach the raw provider payload to each dataset row under rawResult. Use this for debugging or custom downstream parsing. Defaults to false to keep rows compact. Not recommended for AI-agent previews.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}