{
  "openapi": "3.0.1",
  "info": {
    "title": "TikTok Search API & Scraper: Video Search by Keyword",
    "description": "TikTok search scraper and API: search TikTok videos by keyword; get views, likes, comments, shares, saves, caption, hashtags, music, date, video URL, creator followers. Sort: relevance, newest or most viewed. $0.24 per 1,000 videos on Starter, 12x cheaper than the most-used TikTok scraper. No login.",
    "version": "1.14",
    "x-build-id": "Pp9xYCTpflKL4JcOd"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/deepmine~tiktok-search-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-deepmine-tiktok-search-api",
        "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/deepmine~tiktok-search-api/runs": {
      "post": {
        "operationId": "runs-sync-deepmine-tiktok-search-api",
        "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/deepmine~tiktok-search-api/run-sync": {
      "post": {
        "operationId": "run-sync-deepmine-tiktok-search-api",
        "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": {
          "keywords": {
            "title": "🔍 Search keywords",
            "type": "array",
            "description": "What you'd type in TikTok's search, one per line, e.g. \"street food\", \"cosplay\", \"protein recipes\". Each keyword is its own search.",
            "items": {
              "type": "string"
            }
          },
          "hashtags": {
            "title": "#️⃣ Hashtags",
            "type": "array",
            "description": "Optional. Hashtags to search, with or without the #, e.g. \"streetfood\", \"#booktok\". Each hashtag is its own search and its rows carry it as the keyword, e.g. \"#streetfood\". This is TikTok's own search for the tag, ranked by relevance: it also returns related videos that don't carry the tag. Turn on Only videos with the exact hashtag to keep just the tagged ones.",
            "items": {
              "type": "string"
            }
          },
          "exactHashtagOnly": {
            "title": "🎯 Only videos with the exact hashtag",
            "type": "boolean",
            "description": "For hashtag searches. On: keep only videos that carry the hashtag in their hashtags or caption; the others are left out before saving and are not charged, so a hashtag can return fewer videos than your max. Off: TikTok's relevance results for the tag, as TikTok shows them.",
            "default": false
          },
          "expandRelatedSearches": {
            "title": "🔁 Expand with related searches",
            "type": "boolean",
            "description": "TikTok ends one search at about 140 videos. On: when a keyword runs out before your max, the run also searches TikTok's own related phrasings of it (e.g. \"street food india\", \"street food asia\") and adds their new videos, until the keyword reaches your max. Rows keep your keyword; each video is saved and charged once. Off: only your exact keyword.",
            "default": false
          },
          "maxVideosPerKeyword": {
            "title": "📊 Max videos per keyword",
            "minimum": 1,
            "type": "integer",
            "description": "Stop each keyword after this many videos. TikTok may have fewer for a narrow keyword. You pay per video.",
            "default": 100
          },
          "sortOrder": {
            "title": "🔃 Sort by",
            "enum": [
              "relevance",
              "mostRecent",
              "mostViews"
            ],
            "type": "string",
            "description": "Sort results by relevance (default), most recent upload, or most views.",
            "default": "relevance"
          },
          "datePosted": {
            "title": "📅 Posted within",
            "enum": [
              "allTime",
              "today",
              "thisWeek",
              "thisMonth",
              "3months",
              "6months"
            ],
            "type": "string",
            "description": "Applied after reading: a short window can return fewer videos than the max.",
            "default": "allTime"
          },
          "includePhotoPosts": {
            "title": "Include photo posts",
            "type": "boolean",
            "description": "Also return photo carousels (slideshows). Off: videos only.",
            "default": false
          },
          "uniqueAuthors": {
            "title": "One video per creator",
            "type": "boolean",
            "description": "Keep only the first video of each creator across the whole run: a list of distinct creators for outreach or research. Videos left out are not charged.",
            "default": false
          },
          "maxVideosPerAuthor": {
            "title": "Max videos per creator",
            "minimum": 1,
            "type": "integer",
            "description": "Keep at most this many videos of each creator across the whole run, so one prolific account can't fill your results. Empty: no limit. Videos left out are not charged."
          },
          "maxVideosTotal": {
            "title": "Max videos per run",
            "minimum": 1,
            "type": "integer",
            "description": "A cap across all keywords together.",
            "default": 1000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}