{
  "openapi": "3.0.1",
  "info": {
    "title": "TikTok Search Scraper: Keywords, Hashtags, Creators",
    "description": "Scrape TikTok search results by keyword or hashtag and discover creators. Pay only per result. Views, likes, comments, shares, bookmarks, channel stats, music, subtitles and direct video URLs as JSON. Output compatible with popular TikTok scrapers. No proxies or login needed. Works via API and MCP.",
    "version": "0.1",
    "x-build-id": "djmktuJQMOtzi6ra4"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/xmolodtsov~tiktok-search-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-xmolodtsov-tiktok-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/xmolodtsov~tiktok-search-scraper/runs": {
      "post": {
        "operationId": "runs-sync-xmolodtsov-tiktok-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/xmolodtsov~tiktok-search-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-xmolodtsov-tiktok-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",
        "required": [
          "keywords"
        ],
        "properties": {
          "keywords": {
            "title": "Search Keywords",
            "type": "array",
            "description": "Search terms, typed as you would in the TikTok search bar (e.g. <code>ai tools</code>, <code>skincare routine</code>). Each keyword is searched separately (about 200–420 videos per keyword) and all results land in one dataset.<br><br><strong>Tip:</strong> batch many keywords in a single run for the best cost efficiency.",
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Maximum number of items on output",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum total number of videos on output, across all keywords and expansion pools. Leave empty for 1,000. On the free Apify plan a run is capped at 10."
          },
          "sortType": {
            "title": "Sort Type",
            "enum": [
              "RELEVANCE",
              "MOST_LIKED",
              "DATE_POSTED"
            ],
            "type": "string",
            "description": "Sort order for search results. Sorting is applied client-side after fetching — TikTok ignores server-side sort parameters.",
            "default": "RELEVANCE"
          },
          "uniqueAuthors": {
            "title": "Unique Authors Only",
            "type": "boolean",
            "description": "Creator discovery: emit at most one video per creator (<code>channel.id</code>), so every item is a different creator. Combine with <code>expansion</code> to find about 10x more creators per keyword.",
            "default": false
          },
          "expansion": {
            "title": "Expansion Pools",
            "type": "array",
            "description": "Opt-in harvest pools that multiply the number of <strong>new creators</strong> per keyword ~10x. On top of the classic keyword search, the Actor harvests TikTok's search suggestions, hashtag feeds and sound feeds — all seeded from the keyword's own search results, and every item still carries the original keyword.<br><br>Leave empty for classic keyword search only. Available on paid Apify plans; free-plan runs use classic search only.",
            "items": {
              "type": "string",
              "enum": [
                "suggest",
                "hashtag",
                "music"
              ],
              "enumTitles": [
                "Search suggestions",
                "Hashtag feeds",
                "Sound/music feeds"
              ]
            },
            "default": []
          },
          "relevanceThreshold": {
            "title": "Relevance Threshold (music pool)",
            "minimum": 0,
            "maximum": 1,
            "type": "number",
            "description": "Topicality gate for the sound/music pool: the fraction of a sound's first page of captions that must match the seed keyword or its hashtags before that sound is crawled in depth. Higher = stricter, fewer sounds. Used only when the music pool is on.",
            "default": 0.3
          },
          "maxItemsPerKeyword": {
            "title": "Maximum items per keyword",
            "minimum": 1,
            "type": "integer",
            "description": "Optional cap of results per single keyword. Keywords are processed sequentially against the global <code>maxItems</code> budget."
          },
          "maxPostsPerAuthor": {
            "title": "Maximum posts per author",
            "minimum": 1,
            "type": "integer",
            "description": "Cap on items per creator in the classic search (relevance) results — the expansion pools always emit at most one item per creator regardless of this value (leave empty for no cap)."
          },
          "includeSearchKeywords": {
            "title": "Include Search Keywords",
            "type": "boolean",
            "description": "If enabled, each result includes the <code>keyword</code> and <code>inputSource</code> fields with the search keyword that found it.",
            "default": true
          },
          "location": {
            "title": "Location / Region",
            "type": "string",
            "description": "Cosmetic. Passed to TikTok as the <code>region</code> parameter (ISO 3166-1 alpha-2 code, e.g. <code>US</code>), but TikTok picks results by the request's IP address, so this does <strong>not</strong> return per-country results.",
            "default": "US"
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration (optional)",
            "type": "object",
            "description": "Leave empty — proxies are built in and included in the price. To route through your own proxies, enter their URLs here; the Apify Proxy option is not used on paid plans. Free-plan runs use Apify Proxy unless you enter your own URLs.",
            "default": {
              "useApifyProxy": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}