{
  "openapi": "3.0.1",
  "info": {
    "title": "TikTok Keyword Search Suggestion",
    "description": "Get the search suggestions TikTok shows for any keyword, with rank. Turn on A-Z expansion to uncover long-tail phrases people really search for. Add bulk keywords, set a location, see live results and a per keyword summary. Export to JSON, CSV or Excel. No login.",
    "version": "1.0",
    "x-build-id": "gpw2bNQqkWK19L8Zd"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/insights_data~tiktok-keyword-search-suggestion/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-insights_data-tiktok-keyword-search-suggestion",
        "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/insights_data~tiktok-keyword-search-suggestion/runs": {
      "post": {
        "operationId": "runs-sync-insights_data-tiktok-keyword-search-suggestion",
        "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/insights_data~tiktok-keyword-search-suggestion/run-sync": {
      "post": {
        "operationId": "run-sync-insights_data-tiktok-keyword-search-suggestion",
        "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": "🔎 Keywords",
            "type": "array",
            "description": "One keyword or phrase per line. You get the suggestions TikTok shows when someone starts typing it. You can also paste a TikTok search link.",
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "📊 Max suggestions per keyword",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Most suggestions kept for each keyword, best ranked first (across all countries and languages together). 0 = keep everything found.",
            "default": 20
          },
          "regions": {
            "title": "🗺️ Countries",
            "type": "array",
            "description": "TikTok shows different suggestions in each country. Pick one or more; each keyword is searched once per country. Leave empty for the automatic country.",
            "items": {
              "type": "string",
              "enum": [
                "AR",
                "AU",
                "AT",
                "BD",
                "BE",
                "BR",
                "CA",
                "CL",
                "CO",
                "CZ",
                "DK",
                "EG",
                "FI",
                "FR",
                "DE",
                "GR",
                "HK",
                "HU",
                "IN",
                "ID",
                "IE",
                "IL",
                "IT",
                "JP",
                "KZ",
                "KE",
                "MY",
                "MX",
                "MA",
                "NL",
                "NZ",
                "NG",
                "NO",
                "PK",
                "PE",
                "PH",
                "PL",
                "PT",
                "RO",
                "SA",
                "SG",
                "ZA",
                "KR",
                "ES",
                "SE",
                "CH",
                "TW",
                "TH",
                "TR",
                "UA",
                "AE",
                "GB",
                "US",
                "VN"
              ],
              "enumTitles": [
                "Argentina",
                "Australia",
                "Austria",
                "Bangladesh",
                "Belgium",
                "Brazil",
                "Canada",
                "Chile",
                "Colombia",
                "Czechia",
                "Denmark",
                "Egypt",
                "Finland",
                "France",
                "Germany",
                "Greece",
                "Hong Kong",
                "Hungary",
                "India",
                "Indonesia",
                "Ireland",
                "Israel",
                "Italy",
                "Japan",
                "Kazakhstan",
                "Kenya",
                "Malaysia",
                "Mexico",
                "Morocco",
                "Netherlands",
                "New Zealand",
                "Nigeria",
                "Norway",
                "Pakistan",
                "Peru",
                "Philippines",
                "Poland",
                "Portugal",
                "Romania",
                "Saudi Arabia",
                "Singapore",
                "South Africa",
                "South Korea",
                "Spain",
                "Sweden",
                "Switzerland",
                "Taiwan",
                "Thailand",
                "Turkey",
                "Ukraine",
                "United Arab Emirates",
                "United Kingdom",
                "United States",
                "Vietnam"
              ]
            },
            "default": []
          },
          "languages": {
            "title": "🗣️ Languages",
            "type": "array",
            "description": "Interface language of the search. Each keyword is searched once per language.",
            "items": {
              "type": "string",
              "enum": [
                "en",
                "es",
                "pt",
                "fr",
                "de",
                "it",
                "ru",
                "ja",
                "ko",
                "ar",
                "id",
                "th",
                "vi",
                "tr",
                "nl",
                "pl",
                "ms"
              ],
              "enumTitles": [
                "English",
                "Spanish",
                "Portuguese",
                "French",
                "German",
                "Italian",
                "Russian",
                "Japanese",
                "Korean",
                "Arabic",
                "Indonesian",
                "Thai",
                "Vietnamese",
                "Turkish",
                "Dutch",
                "Polish",
                "Malay"
              ]
            },
            "default": [
              "en"
            ]
          },
          "expandAlphabet": {
            "title": "🔤 Expand with A-Z",
            "type": "boolean",
            "description": "Also searches \"keyword a\" up to \"keyword z\" (26 extra searches per keyword and country/language) to reveal the long tail.",
            "default": false
          },
          "expandNumbers": {
            "title": "🔢 Expand with 0-9",
            "type": "boolean",
            "description": "Also searches \"keyword 0\" up to \"keyword 9\" (10 extra searches).",
            "default": false
          },
          "expansionDepth": {
            "title": "🪜 Follow-up rounds",
            "minimum": 0,
            "maximum": 3,
            "type": "integer",
            "description": "Searches every suggestion found as a new keyword, this many rounds deep (0 = off, 3 = deepest). Each round multiplies the number of searches.",
            "default": 0
          },
          "deduplicateSuggestions": {
            "title": "🧹 One row per phrase",
            "type": "boolean",
            "description": "Merges a phrase found by several searches into one row that lists every search that surfaced it. Switch off to get one row per search and phrase.",
            "default": true
          },
          "includeMetadata": {
            "title": "📦 Include ranking details",
            "type": "boolean",
            "description": "Adds volume proxy, TikTok position, round, the searches that surfaced the phrase, its source and group id to every row.",
            "default": true
          },
          "skipKnownSuggestions": {
            "title": "♻️ Skip suggestions from an earlier run",
            "type": "string",
            "description": "Pick the dataset of a previous run. Suggestions already in it (same keyword and phrase) are skipped and not charged."
          },
          "maxConcurrency": {
            "title": "⚡ Parallel searches",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many searches run at the same time.",
            "default": 8
          },
          "proxyConfiguration": {
            "title": "🛡️ Proxy",
            "type": "object",
            "description": "Runs without a proxy first. If TikTok does not answer, the Actor switches to a datacenter proxy, then to a residential proxy, and stays on it. A chosen country always uses a connection from that country.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}