{
  "openapi": "3.0.1",
  "info": {
    "title": "Tiktok Super",
    "version": "0.1",
    "x-build-id": "vNHbDH2SsNefNUwpi"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/s-r~tiktok-super/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-s-r-tiktok-super",
        "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/s-r~tiktok-super/runs": {
      "post": {
        "operationId": "runs-sync-s-r-tiktok-super",
        "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/s-r~tiktok-super/run-sync": {
      "post": {
        "operationId": "run-sync-s-r-tiktok-super",
        "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": "Query (auto mode)",
            "type": "string",
            "description": "One term to fan out across every term-driven source at once: it is used as the account handle, the search keyword, the advertiser name, the shop keyword and the hashtag. Leave empty to use the per-source fields below (flexible mode). Any per-source field you also fill overrides the query for that source."
          },
          "profiles": {
            "title": "Accounts",
            "type": "array",
            "description": "TikTok handles or profile links. Returns the account plus its recent videos.",
            "items": {
              "type": "string"
            }
          },
          "keywords": {
            "title": "Search keywords",
            "type": "array",
            "description": "Keywords to search. Returns matching videos per keyword.",
            "items": {
              "type": "string"
            }
          },
          "comment_videos": {
            "title": "Videos to read comments from",
            "type": "array",
            "description": "Video links or ids. Returns one row per comment (and reply, if enabled).",
            "items": {
              "type": "string"
            }
          },
          "download_videos": {
            "title": "Videos to download",
            "type": "array",
            "description": "Video links or ids. Returns the media file/URL and quality ladder per video.",
            "items": {
              "type": "string"
            }
          },
          "advertisers": {
            "title": "Ad-library advertisers",
            "type": "array",
            "description": "Advertiser names to look up in the TikTok Ad Library. One row per ad.",
            "items": {
              "type": "string"
            }
          },
          "shop_keywords": {
            "title": "Shop keywords",
            "type": "array",
            "description": "Keywords to search TikTok Shop. One row per product.",
            "items": {
              "type": "string"
            }
          },
          "hashtags": {
            "title": "Hashtags",
            "type": "array",
            "description": "Hashtags to look up. Returns reach figures (TikTok does not serve the tag's video list).",
            "items": {
              "type": "string"
            }
          },
          "related_to": {
            "title": "Related to videos",
            "type": "array",
            "description": "Seed video links or ids. Returns the videos TikTok lists as related to each, ~16 per seed.",
            "items": {
              "type": "string"
            }
          },
          "explore": {
            "title": "Explore feed videos",
            "minimum": 0,
            "maximum": 30,
            "type": "integer",
            "description": "How many videos to pull from TikTok's public Explore feed. 0 disables it. May require the signed path; the run reports the reason if it refuses.",
            "default": 0
          },
          "explore_category": {
            "title": "Explore category",
            "type": "string",
            "description": "Optional Explore category id. Leave as 0 for the default mixed feed.",
            "default": "0"
          },
          "sources": {
            "title": "Sources to run",
            "type": "array",
            "description": "Limit the run to these sources: profile, search, comments, downloads, ads, shop. Leave empty to run every source that has input.",
            "items": {
              "type": "string"
            }
          },
          "region": {
            "title": "Region / country",
            "type": "string",
            "description": "Two-letter country code for the proxy exit and market (e.g. US, NL). Applied to every source that supports it.",
            "default": "US"
          },
          "max_per_source": {
            "title": "Maximum results per source call",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Cap on rows fetched per sub-actor call (videos per account, comments per video, products per keyword, etc.).",
            "default": 50
          },
          "include_replies": {
            "title": "Include comment replies",
            "type": "boolean",
            "description": "When reading comments, also fetch replies.",
            "default": false
          },
          "quality": {
            "title": "Download quality",
            "type": "string",
            "description": "Preferred quality for video downloads (passed to the downloader). Leave empty for its default."
          },
          "concurrency": {
            "title": "Concurrent sub-actor calls",
            "minimum": 1,
            "maximum": 6,
            "type": "integer",
            "description": "How many sub-actor calls to run at once.",
            "default": 3
          },
          "actor_ids": {
            "title": "Sub-actor id overrides (advanced)",
            "type": "object",
            "description": "Override the sub-actor called per source, e.g. {\"profile\": \"me/my-fork\"}. For forks and testing."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}