{
  "openapi": "3.0.1",
  "info": {
    "title": "TikTok Ultimate Scraper | Videos, Hashtags & Analytics",
    "description": "Scrape TikTok videos, profiles, hashtags, search, followers, Creative Center analytics and trends. Export views, likes, comments, music and author stats to JSON/CSV via Apify API.",
    "version": "0.9",
    "x-build-id": "JZ0E5rd9cVtOq3TKu"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/rp_openpro.ai~tiktok-ultimate-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-rp_openpro.ai-tiktok-ultimate-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/rp_openpro.ai~tiktok-ultimate-scraper/runs": {
      "post": {
        "operationId": "runs-sync-rp_openpro.ai-tiktok-ultimate-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/rp_openpro.ai~tiktok-ultimate-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-rp_openpro.ai-tiktok-ultimate-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": {
          "mode": {
            "title": "Scraping mode",
            "enum": [
              "scrape",
              "hashtagAnalytics",
              "trendDiscovery"
            ],
            "type": "string",
            "description": "Choose what to scrape: standard TikTok content, hashtag analytics, or Creative Center trends.",
            "default": "scrape"
          },
          "hashtags": {
            "title": "Hashtags",
            "type": "array",
            "description": "Hashtags to scrape (without #). Used in scrape and hashtagAnalytics modes.",
            "items": {
              "type": "string"
            }
          },
          "profiles": {
            "title": "Profiles",
            "type": "array",
            "description": "TikTok usernames to scrape (with or without @).",
            "items": {
              "type": "string"
            }
          },
          "search": {
            "title": "Search queries",
            "type": "array",
            "description": "Keywords to search on TikTok.",
            "items": {
              "type": "string"
            }
          },
          "searchQueries": {
            "title": "Search queries (alias)",
            "type": "array",
            "description": "Alias for search — both fields are merged.",
            "items": {
              "type": "string"
            }
          },
          "videoUrls": {
            "title": "Video URLs",
            "type": "array",
            "description": "Direct TikTok video URLs to extract.",
            "items": {
              "type": "string"
            }
          },
          "postURLs": {
            "title": "Video URLs (alias)",
            "type": "array",
            "description": "Alias for videoUrls — both fields are merged.",
            "items": {
              "type": "string"
            }
          },
          "resultsPerPage": {
            "title": "Results per query",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum items to fetch per hashtag, profile, search, or URL.",
            "default": 20
          },
          "maxProfilesPerQuery": {
            "title": "Max profiles",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum number of profile usernames to process.",
            "default": 10
          },
          "excludePinnedPosts": {
            "title": "Exclude pinned posts",
            "type": "boolean",
            "description": "Skip pinned videos from profile results.",
            "default": false
          },
          "scrapeRelatedVideos": {
            "title": "Scrape related videos",
            "type": "boolean",
            "description": "When scraping video URLs, also fetch related/recommended videos.",
            "default": false
          },
          "profileScrapeSections": {
            "title": "Profile sections",
            "type": "array",
            "description": "Which profile data to collect: videos, reposts, followers, following.",
            "default": [
              "videos"
            ],
            "items": {
              "type": "string"
            }
          },
          "profileSorting": {
            "title": "Profile sort order",
            "enum": [
              "latest",
              "popular",
              "oldest"
            ],
            "type": "string",
            "description": "Sort order for profile video lists.",
            "default": "latest"
          },
          "oldestPostDateUnified": {
            "title": "Oldest post date",
            "type": "string",
            "description": "Only include posts on or after this date. Use YYYY-MM-DD or number of days (e.g. 7 = last week)."
          },
          "newestPostDate": {
            "title": "Newest post date",
            "type": "string",
            "description": "Only include posts on or before this date. Use YYYY-MM-DD."
          },
          "searchSection": {
            "title": "Search section",
            "enum": [
              "",
              "video",
              "user"
            ],
            "type": "string",
            "description": "Filter search results by type.",
            "default": ""
          },
          "adsCountryCode": {
            "title": "Analytics country",
            "type": "string",
            "description": "Country code for hashtag analytics and trend discovery (ISO 2-letter, e.g. US, FR, GB).",
            "default": "US"
          },
          "adsTimeRange": {
            "title": "Analytics time range (days)",
            "enum": [
              "7",
              "30",
              "120"
            ],
            "type": "string",
            "description": "Lookback window for Creative Center analytics and trends.",
            "default": "7"
          },
          "adsScrapeHashtags": {
            "title": "Trend: hashtags",
            "type": "boolean",
            "description": "Fetch trending hashtags from Creative Center.",
            "default": true
          },
          "adsScrapeSounds": {
            "title": "Trend: sounds",
            "type": "boolean",
            "description": "Fetch trending sounds from Creative Center.",
            "default": false
          },
          "adsScrapeCreators": {
            "title": "Trend: creators",
            "type": "boolean",
            "description": "Fetch trending creators from Creative Center.",
            "default": false
          },
          "adsScrapeVideos": {
            "title": "Trend: videos",
            "type": "boolean",
            "description": "Fetch trending videos from Creative Center.",
            "default": false
          },
          "adsHashtagIndustry": {
            "title": "Hashtag industry filter",
            "type": "string",
            "description": "Filter trending hashtags by industry (e.g. Beauty & Personal Care)."
          },
          "adsNewOnBoard": {
            "title": "New on board only",
            "type": "boolean",
            "description": "Only hashtags newly entered the trending board.",
            "default": false
          },
          "adsRankType": {
            "title": "Sound rank type",
            "enum": [
              "popular",
              "surging"
            ],
            "type": "string",
            "description": "Popular or surging sound ranking.",
            "default": "popular"
          },
          "adsApprovedForBusinessUse": {
            "title": "Business-approved sounds only",
            "type": "boolean",
            "description": "Only include sounds approved for commercial use.",
            "default": false
          },
          "adsSortCreatorsBy": {
            "title": "Sort creators by",
            "enum": [
              "follower",
              "engagement",
              "avg_views"
            ],
            "type": "string",
            "description": "Ranking metric for trending creators.",
            "default": "follower"
          },
          "adsFollowers": {
            "title": "Creator follower bucket",
            "type": "string",
            "description": "Filter creators by follower count bucket (1–4)."
          },
          "adsAudienceCountry": {
            "title": "Creator audience country",
            "type": "string",
            "description": "Filter trending creators by primary audience country."
          },
          "adsSortVideosBy": {
            "title": "Sort trending videos by",
            "enum": [
              "vv",
              "like",
              "comment",
              "repost"
            ],
            "type": "string",
            "description": "Ranking metric for trending videos.",
            "default": "vv"
          },
          "adsSoundsCountryCode": {
            "title": "Sounds country",
            "type": "string",
            "description": "Country code for trending sounds.",
            "default": "US"
          },
          "adsCreatorsCountryCode": {
            "title": "Creators country",
            "type": "string",
            "description": "Country code for trending creators.",
            "default": "US"
          },
          "adsVideosCountryCode": {
            "title": "Videos country",
            "type": "string",
            "description": "Country code for trending videos.",
            "default": "US"
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify Proxy is strongly recommended for reliable TikTok scraping at scale."
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Reserved for future parallel processing. Currently processed sequentially for stability.",
            "default": 1
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}