{
  "openapi": "3.0.1",
  "info": {
    "title": "TikTok Posts Search Scraper",
    "description": "Search TikTok posts by keyword/hashtag. Multiple keywords, date-range filter, auto-pagination. Returns caption, author, likes, comments, shares, views and video URLs. No login needed — uses a real browser so TikTok signs its own API requests.",
    "version": "0.0",
    "x-build-id": "NhIzqdysHSj3XYZLu"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/outspoken_strategy~tiktok-post-search-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-outspoken_strategy-tiktok-post-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/outspoken_strategy~tiktok-post-search-scraper/runs": {
      "post": {
        "operationId": "runs-sync-outspoken_strategy-tiktok-post-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/outspoken_strategy~tiktok-post-search-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-outspoken_strategy-tiktok-post-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": {
          "query": {
            "title": "Search Query (single keyword/hashtag)",
            "type": "string",
            "description": "Keyword or #hashtag, e.g. \"econet\" or \"#zimbabwe\". In hashtag mode (default, no login needed) spaces are removed, so \"econet zimbabwe\" searches the #econetzimbabwe feed. Paste several keywords one per line, or use the queries list."
          },
          "queries": {
            "title": "Search Queries (multiple keywords/hashtags)",
            "type": "array",
            "description": "Multiple keywords/hashtags to search — each is searched separately and results are combined and de-duplicated by video. Takes precedence over/adds to \"query\". numberOfPosts applies PER keyword.",
            "items": {
              "type": "string"
            }
          },
          "numberOfPosts": {
            "title": "Number of posts",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Maximum number of videos to fetch per keyword.",
            "default": 100
          },
          "searchMode": {
            "title": "Search mode",
            "enum": [
              "hashtag",
              "search",
              "auto"
            ],
            "type": "string",
            "description": "Hashtag feed scrapes /tag/<keyword>, which TikTok serves without login. Full-text search (/search?q=) requires TikTok session cookies. \"Auto\" is kept for older saved inputs and behaves like hashtag feed.",
            "default": "hashtag"
          },
          "scrapeAll": {
            "title": "Scrape all (auto-paginate)",
            "type": "boolean",
            "description": "Keep scrolling until numberOfPosts is reached or the feed runs dry. When unchecked only the first page of results is returned.",
            "default": true
          },
          "timeSince": {
            "title": "Since date",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Only return videos published on or after this date (format: yyyy-mm-dd)."
          },
          "timeUntil": {
            "title": "Until date",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Only return videos published before this date (format: yyyy-mm-dd)."
          },
          "region": {
            "title": "Region",
            "type": "string",
            "description": "Two-letter country code for the proxy exit region (e.g. US, GB, ZW). TikTok tailors results by region; keep it stable. In full-text search mode with saved environment cookies, the session country overrides this.",
            "default": "US"
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxy to route traffic through. Apify Proxy with automatic selection works on every Apify plan and is the default. If TikTok starts serving empty responses, switch to the RESIDENTIAL group (requires residential proxy access on your plan). The actor preflights exit IPs and retries on fresh ones.",
            "default": {
              "useApifyProxy": true
            }
          },
          "headless": {
            "title": "Run browser headless",
            "type": "boolean",
            "description": "Leave unchecked. TikTok shows a captcha to headless browsers, so the actor runs a regular (headed) Chrome on a virtual display by default.",
            "default": false
          },
          "cookies": {
            "title": "TikTok session cookies (JSON)",
            "type": "string",
            "description": "Only needed for full-text search mode. JSON array of cookies exported from a logged-in TikTok browser session. Ignored in hashtag mode. Values are stored as a secret input and are never logged."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}