{
  "openapi": "3.0.1",
  "info": {
    "title": "TikTok Keywords Discovery Tool",
    "description": "Discover public TikTok autocomplete suggestions and hashtag results from keywords, hashtags, or tag-page URLs. Export ranked keyword phrases with source context, language, and region, or hashtag rows with available public view and video counts through the Apify dataset or API.",
    "version": "2.1",
    "x-build-id": "P5egFS6Q28cVm4fYF"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/maximedupre~tiktok-keywords-discovery-tool/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-maximedupre-tiktok-keywords-discovery-tool",
        "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/maximedupre~tiktok-keywords-discovery-tool/runs": {
      "post": {
        "operationId": "runs-sync-maximedupre-tiktok-keywords-discovery-tool",
        "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/maximedupre~tiktok-keywords-discovery-tool/run-sync": {
      "post": {
        "operationId": "run-sync-maximedupre-tiktok-keywords-discovery-tool",
        "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": [
          "resultType"
        ],
        "properties": {
          "resultType": {
            "title": "Result type",
            "enum": [
              "keywordSuggestions",
              "hashtagDiscovery"
            ],
            "type": "string",
            "description": "Choose the row family to collect. The Keyword suggestions option returns public autocomplete phrases. The Hashtag discovery option returns public hashtag results."
          },
          "resultOrder": {
            "title": "Suggestion order",
            "enum": [
              "source",
              "alphabetical"
            ],
            "type": "string",
            "description": "For Keyword suggestions, keep TikTok source order or sort each keyword's suggestions alphabetically. This choice is ignored for Hashtag discovery.",
            "default": "source"
          },
          "includeSeedEcho": {
            "title": "Keep seed echoes",
            "type": "boolean",
            "description": "For Keyword suggestions, keep or omit a suggestion that exactly matches its submitted keyword. This choice is ignored for Hashtag discovery.",
            "default": true
          },
          "language": {
            "title": "Language",
            "enum": [
              "en",
              "es",
              "fr",
              "de",
              "it",
              "pt",
              "tr",
              "id",
              "ja",
              "ko"
            ],
            "type": "string",
            "description": "Choose the preferred TikTok language context for Keyword suggestions. It is a source hint, not a hard result filter, and is ignored for Hashtag discovery.",
            "default": "en"
          },
          "region": {
            "title": "Region",
            "minLength": 2,
            "maxLength": 2,
            "type": "string",
            "description": "Choose the preferred two-letter TikTok region context for Keyword suggestions. It is a source hint, not a hard result filter, and is ignored for Hashtag discovery. Use a code such as US, GB, DE, or JP.",
            "default": "US"
          },
          "hashtagDiscoveryMethod": {
            "title": "Find hashtags by",
            "enum": [
              "keywordTargets",
              "hashtagTargets",
              "tagPages"
            ],
            "type": "string",
            "description": "For Hashtag discovery, choose whether to start from keywords, hashtags, or public TikTok tag-page URLs. Fields for the other choices are ignored."
          },
          "hashtags": {
            "title": "Hashtag targets",
            "minItems": 1,
            "maxItems": 500,
            "type": "array",
            "description": "Enter one or more hashtags, such as #travel or #fitness. Use this field when Find hashtags by is set to Hashtags. Each hashtag is processed separately.",
            "items": {
              "type": "string",
              "minLength": 1
            }
          },
          "tagPageUrls": {
            "title": "TikTok tag-page URLs",
            "minItems": 1,
            "maxItems": 500,
            "type": "array",
            "description": "Add one or more public TikTok tag-page URLs, such as https://www.tiktok.com/tag/travel. Use this field when Find hashtags by is set to TikTok tag pages. Each URL is processed separately.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "keywords": {
            "title": "Keyword targets",
            "minItems": 1,
            "maxItems": 500,
            "type": "array",
            "description": "Enter one or more keyword phrases, such as gift ideas or skincare routine. Use this field for Keyword suggestions, or for Hashtag discovery when Find hashtags by is set to Keywords. Each keyword is processed separately.",
            "items": {
              "type": "string",
              "minLength": 1
            }
          },
          "maxSuggestionsPerKeyword": {
            "title": "Results per target",
            "minimum": 1,
            "type": "integer",
            "description": "Optional positive limit for results from each submitted target. For Keyword suggestions, it limits suggestions per keyword. For Hashtag discovery, it limits hashtags per target. Leave it empty to collect all available results until the public source is exhausted."
          },
          "maxTotalResults": {
            "title": "Total results",
            "minimum": 1,
            "type": "integer",
            "description": "Optional positive limit for results across the run. Leave it empty to collect all available results from submitted targets until the public source is exhausted."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}