{
  "openapi": "3.0.1",
  "info": {
    "title": "TikTok Scraper: Hashtag, Search & Trending Videos, No Login",
    "description": "Scrape TikTok videos by hashtag, keyword search or trending feed: plays, likes, shares, saves, comments, caption, music and author followers. Free date filter, optional MP4 download and a views vs creator median score to spot viral videos. No login or cookies. Works via API and MCP.",
    "version": "0.1",
    "x-build-id": "lI0RD4QYra897GSTf"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/themineworks~tiktok-hashtag-search-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-themineworks-tiktok-hashtag-search-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/themineworks~tiktok-hashtag-search-scraper/runs": {
      "post": {
        "operationId": "runs-sync-themineworks-tiktok-hashtag-search-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/themineworks~tiktok-hashtag-search-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-themineworks-tiktok-hashtag-search-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": "TikTok hashtags to scrape, one per line, with or without the # (for example jewelrytok or #engagementring). A tiktok.com/tag/... link also works. TikTok's hashtag feed is not in date order and usually holds a few hundred videos at most, so use postedWithinDays to keep only recent ones.",
            "items": {
              "type": "string"
            }
          },
          "keywords": {
            "title": "Search keywords",
            "type": "array",
            "description": "Search terms, one per line, exactly as you would type them in the TikTok search box (for example lab grown diamond ring). Returns the videos TikTok's video search shows for the term. TikTok's web search ignores its own date and sort options, so the date filter below is applied after fetching.",
            "items": {
              "type": "string"
            }
          },
          "trending": {
            "title": "Trending videos",
            "type": "boolean",
            "description": "Also scrape the videos TikTok's Explore page is currently showing (its trending feed) for the category below. Each call is a fresh draw, so repeated runs return different videos.",
            "default": false
          },
          "trendingCategory": {
            "title": "Trending category",
            "enum": [
              "120",
              "119",
              "104",
              "112",
              "100",
              "107",
              "101",
              "110",
              "105",
              "102",
              "103",
              "114",
              "109",
              "115",
              "111",
              "113",
              "106",
              "108",
              "117",
              "116",
              "118"
            ],
            "type": "string",
            "description": "Explore page category used when Trending videos is on.",
            "default": "120"
          },
          "maxItems": {
            "title": "Max videos per input",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Most videos to return for EACH hashtag, keyword and the trending feed. A shallow hashtag feed can hold fewer; the run summary (OUTPUT) then reports how deep the feed went. You only pay for videos delivered.",
            "default": 50
          },
          "postedWithinDays": {
            "title": "Posted within the last N days",
            "minimum": 1,
            "maximum": 3650,
            "type": "integer",
            "description": "Keep only videos posted in the last N days, based on each video's createTime. Older videos are skipped and never charged. Leave empty for no date filter."
          },
          "region": {
            "title": "Region",
            "enum": [
              "US"
            ],
            "type": "string",
            "description": "Country TikTok is browsed from. Only the United States is available: tested on 26 Sep 2026, TikTok refuses its web video feeds to logged out visitors from the UK, EU, Canada, Australia, Brazil, Japan and Mexico, and TikTok is not available in India. Videos from creators anywhere still appear in US hashtag, search and trending feeds.",
            "default": "US"
          },
          "downloadVideos": {
            "title": "Download video files (MP4)",
            "type": "boolean",
            "description": "Save each video's MP4 to this run's key-value store and put a public link to it in videoFileUrl. TikTok's own videoUrl only plays with TikTok session cookies, so this is the way to get a file you can open anywhere. Charged per file actually saved; a failed download is not charged. Slideshow (photo) posts have no MP4 and are skipped.",
            "default": false
          },
          "includeAuthorMedianPlays": {
            "title": "Add author median plays",
            "type": "boolean",
            "description": "For each unique author, read their most recent posts and add authorMedianPlays (the median play count of those posts) and playsVsAuthorMedian (this video's plays divided by that median). A value of 3 means the video did three times the author's usual. Fetched once per author per run.",
            "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}