{
  "openapi": "3.0.1",
  "info": {
    "title": "TikTok Scraper — Profiles, Posts & Video Details",
    "description": "Extract TikTok profiles, recent posts, video and photo details, photo search results, playlists, and LIVE status with low-traffic HTTP requests.",
    "version": "0.0",
    "x-build-id": "jW89zmKtaWcGNaHvi"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapingmonkey~tiktok-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapingmonkey-tiktok-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/scrapingmonkey~tiktok-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapingmonkey-tiktok-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/scrapingmonkey~tiktok-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapingmonkey-tiktok-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",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Scraping mode",
            "enum": [
              "auto",
              "profile",
              "profilePosts",
              "video",
              "photo",
              "searchPhotos",
              "playlist",
              "liveStatus"
            ],
            "type": "string",
            "description": "Choose a public TikTok surface supported by the low-traffic HTTP engine. Auto detects supported URL types.",
            "default": "profilePosts"
          },
          "startUrls": {
            "title": "TikTok URLs",
            "type": "array",
            "description": "Public TikTok profile, video, photo, playlist or LIVE URLs. Auto mode detects each supported URL type.",
            "default": [],
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "targets": {
            "title": "Targets",
            "type": "array",
            "description": "Usernames, TikTok URLs, video/photo IDs or LIVE room IDs accepted by the selected mode.",
            "items": {
              "type": "string"
            },
            "default": [
              "tiktok"
            ]
          },
          "searchTerms": {
            "title": "Search terms",
            "type": "array",
            "description": "Keywords for the public Photo Search mode.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "maxResults": {
            "title": "Maximum results per input",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum media records per profile or keyword. Profile posts exposes up to 22 recent items through TikTok's public embed endpoint. Detail modes return one row. Use 0 for every HTTP-accessible result.",
            "default": 20
          },
          "maxTotalResults": {
            "title": "Maximum results for the run",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Optional hard cap after all inputs are combined and deduplicated. 0 means no additional run-wide cap.",
            "default": 0
          },
          "country": {
            "title": "Country",
            "minLength": 2,
            "maxLength": 2,
            "type": "string",
            "description": "ISO 3166-1 alpha-2 country used for the residential proxy session and TikTok locale, for example US, GB or DE.",
            "default": "US"
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Interface and Accept-Language locale, for example en, de or pt-BR.",
            "default": "en"
          },
          "sort": {
            "title": "Local result order",
            "enum": [
              "relevance",
              "latest",
              "popular",
              "oldest"
            ],
            "type": "string",
            "description": "Keep TikTok relevance order or locally reorder extracted media by publication time or popularity.",
            "default": "relevance"
          },
          "publishedAfter": {
            "title": "Published after",
            "type": "string",
            "description": "Optional ISO date or timestamp. Media older than this value is removed after extraction."
          },
          "publishedBefore": {
            "title": "Published before",
            "type": "string",
            "description": "Optional ISO date or timestamp. Media newer than this value is removed after extraction."
          },
          "minLikes": {
            "title": "Minimum likes",
            "minimum": 0,
            "type": "integer",
            "description": "Keep media with at least this many likes.",
            "default": 0
          },
          "minComments": {
            "title": "Minimum comments",
            "minimum": 0,
            "type": "integer",
            "description": "Keep media with at least this many comments.",
            "default": 0
          },
          "minViews": {
            "title": "Minimum views",
            "minimum": 0,
            "type": "integer",
            "description": "Keep media with at least this many public plays or views.",
            "default": 0
          },
          "includeRaw": {
            "title": "Include redacted raw objects",
            "type": "boolean",
            "description": "Keep the underlying public TikTok object after session, token, cookie and signature fields are removed. This can substantially increase dataset size.",
            "default": false
          },
          "enrichPartialResults": {
            "title": "Enrich partial result cards",
            "type": "boolean",
            "description": "Enrich lightweight recent-post records with complete public video or photo data using extra HTTP requests. No browser is started.",
            "default": true
          },
          "maxConcurrency": {
            "title": "Maximum HTTP concurrency",
            "minimum": 1,
            "maximum": 25,
            "type": "integer",
            "description": "Maximum TikTok targets or enrichment requests processed in parallel. Start with 5 for reliable residential proxy sessions.",
            "default": 5
          },
          "maxSessionRotations": {
            "title": "Maximum session rotations",
            "minimum": 1,
            "maximum": 6,
            "type": "integer",
            "description": "Fresh HTTP session, residential proxy IP and cookies tried after a rate limit, login redirect or empty challenge response.",
            "default": 3
          },
          "navigationTimeoutSecs": {
            "title": "HTTP request timeout",
            "minimum": 15,
            "maximum": 120,
            "type": "integer",
            "description": "Maximum time allowed for one TikTok HTTP request.",
            "default": 45
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}