{
  "openapi": "3.0.1",
  "info": {
    "title": "TikTok Search Scraper: Videos by Keyword, Sort and Date",
    "description": "Get the TikTok videos listed for a keyword as one row each: plays, likes, comments, shares, saves, creator followers, music, hashtags and links. Most liked and latest sort, date filters, search suggestions. No login, no browser.",
    "version": "0.2",
    "x-build-id": "NSsj2AmSfBiU4YfzV"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/themineworks~tiktok-search-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-themineworks-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/themineworks~tiktok-search-scraper/runs": {
      "post": {
        "operationId": "runs-sync-themineworks-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/themineworks~tiktok-search-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-themineworks-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",
        "properties": {
          "searchQueries": {
            "title": "Keywords",
            "type": "array",
            "description": "What to look up, one keyword or phrase per line, as you would type it in the TikTok search box. Example: skincare routine, lab grown diamond, air fryer recipes. The actor reads TikTok's public topic page for each phrase. Broad, popular phrases work best. Up to 100 keywords per run.",
            "items": {
              "type": "string"
            }
          },
          "contentType": {
            "title": "What to return",
            "enum": [
              "videos",
              "suggestions"
            ],
            "type": "string",
            "description": "Videos (default), or only the search suggestions TikTok shows for each keyword. TikTok's topic pages list videos; photo posts (slideshows) are not available.",
            "default": "videos"
          },
          "maxItems": {
            "title": "Max results per keyword",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "The most videos (or photo posts) to return for each keyword, 1 to 1,000. One TikTok topic page lists about 85 to 100 posts; with Deep search on, TikTok's related topics add more for popular keywords. Example: 200.",
            "default": 50
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "relevance",
              "most_liked",
              "latest"
            ],
            "type": "string",
            "description": "Relevance keeps TikTok's own order. Most liked puts the best performing posts first and Latest the newest first, applied to the posts found for the keyword.",
            "default": "relevance"
          },
          "datePosted": {
            "title": "Date posted",
            "enum": [
              "any",
              "last_24_hours",
              "last_week",
              "last_month",
              "last_3_months",
              "last_6_months"
            ],
            "type": "string",
            "description": "Only posts from this period. Combine with Most liked to find the best posts of the week. Posts outside the period are skipped and not charged.",
            "default": "any"
          },
          "deepSearch": {
            "title": "Deep search (go past one query's limit)",
            "type": "boolean",
            "description": "One TikTok topic page lists about 85 to 100 posts. With this on, a keyword that ends before your maximum also reads TikTok's related topic pages (about 14 of them), and the new posts are added. Posts are never delivered or charged twice. Off: only the page for your own phrase.",
            "default": true
          },
          "uniqueAuthors": {
            "title": "One post per creator",
            "type": "boolean",
            "description": "Keep only the first (highest ranked) post of each creator across the whole run. Useful to build a list of creators who post about a topic.",
            "default": false
          },
          "minPlays": {
            "title": "Minimum plays",
            "minimum": 1,
            "type": "integer",
            "description": "Skip posts with fewer plays than this. Skipped posts are not charged. Leave empty for no minimum. Example: 10000."
          },
          "minLikes": {
            "title": "Minimum likes",
            "minimum": 1,
            "type": "integer",
            "description": "Skip posts with fewer likes than this. Skipped posts are not charged. Leave empty for no minimum. Example: 500."
          },
          "includeSuggestions": {
            "title": "Also return search suggestions",
            "type": "boolean",
            "description": "Adds TikTok's autocomplete suggestions and related questions for each keyword as extra rows (result_type suggestion). Each suggestion row is charged as its own small event.",
            "default": false
          },
          "suggestionDepth": {
            "title": "Suggestion depth",
            "minimum": 1,
            "maximum": 2,
            "type": "integer",
            "description": "1: the suggestions for your keyword (about 12). 2: also the suggestions for each of its first 10 autocomplete suggestions, about 55 rows per keyword for keyword research.",
            "default": 1
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}