{
  "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": "tGxQtTjVBocI8OKQf"
  },
  "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 candidates processed per profile or keyword; filters and duplicates can reduce saved rows. Profile posts exposes up to 22 candidates through TikTok's public embed endpoint. Detail modes return one row. Use 0 for every HTTP-accessible candidate.",
            "default": 20
          },
          "maxTotalResults": {
            "title": "Maximum results for the run",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Stop collecting after this many unique eligible records; ordering applies to that collected sample. Date and engagement filters apply before selection. 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": "Order of collected results",
            "enum": [
              "relevance",
              "latest",
              "popular",
              "oldest"
            ],
            "type": "string",
            "description": "Keep the order received from TikTok, or reorder only the collected sample by publication time or popularity. Newest and most popular do not search extra pages beyond the result limit.",
            "default": "relevance"
          },
          "publishedAfter": {
            "title": "Published after",
            "type": "string",
            "description": "Optional ISO date or timestamp. A date starts at midnight UTC. A timestamp sets the exact inclusive lower limit. Undated media is excluded while a date filter is active."
          },
          "publishedBefore": {
            "title": "Published before",
            "type": "string",
            "description": "Optional ISO date or timestamp. A date includes the whole day in UTC. A timestamp sets the exact inclusive upper limit. Undated media is excluded while a date filter is active."
          },
          "minLikes": {
            "title": "Minimum likes",
            "minimum": 0,
            "type": "integer",
            "description": "Only media with at least this many likes qualifies for the collected sample.",
            "default": 0
          },
          "minComments": {
            "title": "Minimum comments",
            "minimum": 0,
            "type": "integer",
            "description": "Only media with at least this many comments qualifies for the collected sample.",
            "default": 0
          },
          "minViews": {
            "title": "Minimum views",
            "minimum": 0,
            "type": "integer",
            "description": "Only media with at least this many public plays or views qualifies for the collected sample.",
            "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": "Request complete public video or photo data for partial posts. Enrichment is included unless its separate event is active in your run's pricing. When active: $1.50 per 1,000 attempts on every plan, charged once per post per run when its first extra detail request starts; retries are included. Failed attempts and posts later removed by filters are still charged. No additional Dataset row is created.",
            "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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}