{
  "openapi": "3.0.1",
  "info": {
    "title": "TikTok Search Scraper: Keywords, Hashtags, Creators",
    "description": "Scrape TikTok search results by keyword — pay only per result. Views, likes, comments, shares, bookmarks, channel stats, music, subtitles, direct video URLs as JSON. Output compatible with popular TikTok scrapers. No proxies or login needed. Works via API, schedules and integrations.",
    "version": "0.1",
    "x-build-id": "SpIAG8iYOQjpLzekn"
  },
  "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": "Keywords/terms to search on TikTok. Each keyword is searched independently and results are combined into one dataset.<br><br><strong>Tip:</strong> You can batch many keywords in a single run for maximum 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)."
          },
          "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."
          },
          "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"
          },
          "location": {
            "title": "Location / Region",
            "type": "string",
            "description": "Preferred region for results (ISO 3166-1 alpha-2 country code, e.g. <code>US</code>). Passed to TikTok as the <code>region</code> parameter; TikTok search results are not strongly geo-partitioned, so this does not produce a per-country result set.",
            "default": "US"
          },
          "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
          },
          "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.",
            "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.",
            "default": 0.3
          },
          "uniqueAuthors": {
            "title": "Unique Authors Only",
            "type": "boolean",
            "description": "Emit at most one item per creator (<code>channel.id</code>) — creator-discovery mode instead of post collection.",
            "default": false
          },
          "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)."
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration (optional)",
            "type": "object",
            "description": "Leave empty — the Actor ships with its own proxies. Only set this if you want to route through your own.",
            "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}