{
  "openapi": "3.0.1",
  "info": {
    "title": "TikTok Scraper",
    "description": "TikTok scraper API for TikTok videos, profiles and hashtags, by handle, hashtag, keyword or link. Video rows carry the TikTok analytics: plays, likes, comments, shares, saves, plus caption, sound and author. A profile gives its newest videos, and older ones too on paid plans. $0.25 per 1,000 rows.",
    "version": "0.1",
    "x-build-id": "z5NEWERb7gJ8nWYxx"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/dami_studio~tiktok-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-dami_studio-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/dami_studio~tiktok-scraper/runs": {
      "post": {
        "operationId": "runs-sync-dami_studio-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/dami_studio~tiktok-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-dami_studio-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",
        "properties": {
          "profiles": {
            "title": "Profiles",
            "type": "array",
            "description": "TikTok usernames (with or without @) to scrape. Each one returns a profile row (followers, likes, bio, verified) plus that creator's ~10 newest videos, or as many as your limits allow with Read older videos too turned on.",
            "items": {
              "type": "string"
            }
          },
          "hashtags": {
            "title": "Hashtags",
            "type": "array",
            "description": "Hashtags (with or without #) to scrape videos from.",
            "items": {
              "type": "string"
            }
          },
          "searchQueries": {
            "title": "Search queries",
            "type": "array",
            "description": "Keywords to search TikTok for.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "Paste TikTok URLs directly, a profile URL, a /video/ URL (single video), a /tag/ URL (hashtag), or a share link copied from the TikTok app (vm.tiktok.com, vt.tiktok.com or tiktok.com/t/).",
            "items": {
              "type": "string"
            }
          },
          "resultsPerPage": {
            "title": "Max results per run",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Most rows the whole run returns, counted across all your profiles, hashtags, searches and links together, so the first input can use it up. You are charged per result returned. A single profile gives about 11 rows (1 profile + ~10 videos) however high this is set, unless Read older videos too is on; hashtag and search page much deeper. Not used when Results per input is set.",
            "default": 50
          },
          "resultsPerInput": {
            "title": "Results per input",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Optional. When set, each profile, hashtag, search and video link stops at this many rows, so every input gets its share, and Max results per run is not used. A run can then return up to this many rows for each input you list. Leave it empty to keep one limit for the whole run."
          },
          "maxRunSeconds": {
            "title": "Max run seconds (cost guard)",
            "minimum": 10,
            "maximum": 3600,
            "type": "integer",
            "description": "Safety cap on total scrape time. If a slow query (e.g. a search/feed that keeps paginating with few results) hits this, the run stops and returns what it has so far. Prevents runaway cost on pathological queries.",
            "default": 90
          },
          "minLikes": {
            "title": "Minimum likes (optional add-on)",
            "minimum": 0,
            "type": "integer",
            "description": "Optional add-on, off unless you set a value. Keeps only videos with at least this many likes. A video whose like count could not be read is left out. Leave it empty to keep every video."
          },
          "maxLikes": {
            "title": "Maximum likes (optional add-on)",
            "minimum": 0,
            "type": "integer",
            "description": "Optional add-on, off unless you set a value. Keeps only videos with at most this many likes. Leave it empty to keep every video."
          },
          "postedAfter": {
            "title": "Posted on or after (optional add-on)",
            "type": "string",
            "description": "Optional add-on, off unless you set a date. Keeps only videos posted on or after this day, counted in UTC, for example 2026-10-01. Leave it empty for no date limit."
          },
          "postedBefore": {
            "title": "Posted before (optional add-on)",
            "type": "string",
            "description": "Optional add-on, off unless you set a date. Keeps only videos posted before this day, counted in UTC: 2026-10-15 keeps videos up to the end of 14 October. Leave it empty for no date limit."
          },
          "excludePinned": {
            "title": "Leave out pinned videos (paid option)",
            "type": "boolean",
            "description": "Profiles only. Leaves out the videos a creator pinned to the top of their profile, so you get just their newest ones. Each video it leaves out is billed as \"Pinned video left out\", see the Pricing tab. A pinned video that is also the creator's newest stays in.",
            "default": false
          },
          "includeSubtitles": {
            "title": "Add TikTok's subtitles",
            "type": "boolean",
            "description": "Adds the subtitles TikTok itself publishes for each video, as plain text, with their language. Empty when TikTok has none for that video. Nothing is generated: no transcript is made from the audio. Hashtag and search videos need one more page read each, so those runs take longer.",
            "default": false
          },
          "trackChanges": {
            "title": "Mark what changed since the last run (paid option)",
            "type": "boolean",
            "description": "For inputs you run again and again. Each video and profile row gets more fields at its end: changeType (new, changed or unchanged since the last run of the same input), changedFields, the counts the last run saw (lastRunPlayCount, lastRunFollowerCount and the like), firstSeenAt and lastSeenAt. The first run of an input has nothing to compare with, so changeType is empty and tracking is not charged. Each row it compares is billed at the change-tracking price on the Pricing tab; until that price is listed there, tracking costs nothing extra.",
            "default": false
          },
          "trackingKey": {
            "title": "Tracking name (optional)",
            "type": "string",
            "description": "Optional, with change tracking on. Runs that share a name share one history, whatever their inputs. Letters, digits, dots, dashes and underscores, up to 60. Leave it empty and each input keeps its own history."
          },
          "notionConnector": {
            "title": "Notion connector ID (optional)",
            "type": "string",
            "description": "Optional. Deliver the results to your connected Notion via Apify MCP connectors."
          },
          "notionParentId": {
            "title": "Notion data-source ID (optional)",
            "type": "string",
            "description": "Optional Notion database/data-source id to create the pages in."
          },
          "sessionCookies": {
            "title": "Account cookies (not needed)",
            "minItems": 0,
            "maxItems": 10,
            "type": "array",
            "description": "Optional: your own session, used only for your run. You are responsible for using it within the site's terms. Runs work without it.",
            "items": {
              "type": "string"
            }
          },
          "proxyConfiguration": {
            "title": "Proxy (optional)",
            "type": "object",
            "description": "Optional, and not needed for a normal run.",
            "default": {
              "useApifyProxy": false
            }
          },
          "allVideos": {
            "title": "Read older videos too",
            "type": "boolean",
            "description": "Off by default, and a run reads exactly as it always has. On: profiles, hashtags and searches keep going page after page, back to a creator's first videos, until Results per input or Max results per run is reached, or Max run seconds runs out. Each video is one result at the usual price, nothing added. Paid Apify plans only: on the free plan a run reads as it does with this off.",
            "default": false
          },
          "searchSort": {
            "title": "Search order",
            "enum": [
              "relevance",
              "date",
              "likes"
            ],
            "type": "string",
            "description": "The order search videos come back in. Most relevant is how searches have always come back. Newest first and Most liked first need Read older videos too turned on and a paid Apify plan; a video out of the order asked for is left out and not charged.",
            "default": "relevance"
          },
          "searchPostedWithin": {
            "title": "Search posted within",
            "enum": [
              "all",
              "day",
              "week",
              "month",
              "3months",
              "6months"
            ],
            "type": "string",
            "description": "Only search videos posted in this window: all time, the last day, week, month, 3 months or 6 months. Needs Read older videos too turned on and a paid Apify plan. A video posted before the window is left out and not charged.",
            "default": "all"
          },
          "includeVideoExtras": {
            "title": "Add pinned, photo and file size fields",
            "type": "boolean",
            "description": "Adds four fields at the end of every row: isPinned (the creator pinned it), isSlideshow and imageUrls (a photo post and its pictures), fileSizeBytes (the video file's size). Empty where a row doesn't carry them. No extra cost.",
            "default": false
          },
          "includeCreatorStats": {
            "title": "Add the creator's stats to each video",
            "type": "boolean",
            "description": "Adds eight fields at the end of every row about the posting account: creatorFollowerCount, creatorFollowingCount, creatorHeartCount (total likes), creatorVideoCount, creatorVerified, creatorSignature (bio), creatorBioLink, creatorPrivateAccount. Hashtag and search videos look each new creator up once, which slows the run; on the free plan only profiles' own videos get them. Paid option: each row with them is billed at the creator stats price on the Pricing tab once it starts, free until then.",
            "default": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}