{
  "openapi": "3.0.1",
  "info": {
    "title": "TikTok Trending Videos Scraper",
    "description": "Get the videos TikTok is pushing right now: 21 Explore categories, views per hour, engagement and age filters, only-new mode, any country. No login. MCP-ready.",
    "version": "2.0",
    "x-build-id": "zd3hA8M8QRnDmuHv7"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/khadinakbar~tiktok-trending-videos-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-khadinakbar-tiktok-trending-videos-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/khadinakbar~tiktok-trending-videos-scraper/runs": {
      "post": {
        "operationId": "runs-sync-khadinakbar-tiktok-trending-videos-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/khadinakbar~tiktok-trending-videos-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-khadinakbar-tiktok-trending-videos-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": {
          "feed": {
            "title": "Feed",
            "enum": [
              "explore",
              "foryou"
            ],
            "type": "string",
            "description": "Which TikTok feed to read. 'explore' is TikTok's curated trending feed (default, split into 21 categories). 'foryou' is the general For You feed, which is mixed and less repeatable. This is not one profile's videos; for that use the TikTok profile scraper.",
            "default": "explore"
          },
          "categories": {
            "title": "Categories",
            "type": "array",
            "description": "Explore categories to collect, for example Food, Comedy, Technology. Leave empty or choose All for the general feed. Categories apply to the default US feed; other countries use the general feed. Ignored for the For You feed. Several categories can be combined and results are de-duplicated.",
            "items": {
              "type": "string",
              "enum": [
                "All",
                "Singing & Dancing",
                "Comedy",
                "Sports",
                "Anime & Comics",
                "Relationship",
                "Shows",
                "Lipsync",
                "Daily Life",
                "Beauty Care",
                "Games",
                "Society",
                "Outfit",
                "Cars",
                "Food",
                "Animals",
                "Family",
                "Drama",
                "Fitness & Health",
                "Education",
                "Technology"
              ]
            },
            "default": [
              "All"
            ]
          },
          "maxResults": {
            "title": "Max videos per country",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum videos to return for each country (1–500). Runs usually finish in seconds. Each returned video is one billed result. Free Apify plan runs return up to 50 videos per run.",
            "default": 50
          },
          "region": {
            "title": "Country (single)",
            "enum": [
              "",
              "US",
              "GB",
              "IN",
              "BR",
              "MX",
              "ID",
              "JP",
              "KR",
              "DE",
              "FR",
              "TR",
              "RU",
              "ES",
              "IT",
              "CA",
              "AU",
              "AR",
              "CO",
              "TH",
              "VN",
              "NL",
              "PL",
              "SA",
              "AE",
              "SG",
              "PH",
              "MY",
              "NG",
              "ZA",
              "CL",
              "PE",
              "TW",
              "PK",
              "BD",
              "EG",
              "AT",
              "BE",
              "BG",
              "BY",
              "CZ",
              "DK",
              "FI",
              "GR",
              "HU",
              "IE",
              "IL",
              "IQ",
              "IS",
              "KH",
              "KW",
              "LB",
              "LT",
              "LV",
              "MA",
              "MM",
              "NO",
              "NZ",
              "OM",
              "PT",
              "QA",
              "RO",
              "SK",
              "SE",
              "CH",
              "UA",
              "UZ"
            ],
            "type": "string",
            "description": "Two-letter country code, for example US, GB, DE. Leave empty for the default US-centered feed. Other countries return the general trending feed for that country (no categories, caption-language filter or outlier sort). If a country is not supported the run says so. Use 'Countries' to collect several in one run.",
            "default": ""
          },
          "regions": {
            "title": "Countries (several)",
            "type": "array",
            "description": "Several two-letter country codes in one run, for example [\"US\",\"GB\",\"DE\"] (up to 5). Overrides the single Country field. Max videos applies to each country.",
            "items": {
              "type": "string"
            }
          },
          "minPlays": {
            "title": "Minimum views",
            "minimum": 0,
            "type": "integer",
            "description": "Only keep videos with at least this many views. 0 = no minimum.",
            "default": 0
          },
          "minLikes": {
            "title": "Minimum likes",
            "minimum": 0,
            "type": "integer",
            "description": "Only keep videos with at least this many likes. 0 = no minimum.",
            "default": 0
          },
          "minEngagementRate": {
            "title": "Minimum engagement (%)",
            "minimum": 0,
            "maximum": 100,
            "type": "number",
            "description": "Only keep videos where (likes + comments + shares) / views is at least this percent. Example: 5 keeps videos with 5% or higher. 0 = no minimum.",
            "default": 0
          },
          "postedWithinDays": {
            "title": "Posted within (days)",
            "minimum": 0,
            "maximum": 365,
            "type": "number",
            "description": "Only keep videos published in the last N days. Example: 2 keeps videos from the last 48 hours. 0 = any age.",
            "default": 0
          },
          "language": {
            "title": "Caption language",
            "type": "string",
            "description": "Only keep videos whose caption language matches this code, for example en, es, pt. Leave empty for all languages."
          },
          "excludeAds": {
            "title": "Exclude ads",
            "type": "boolean",
            "description": "Drop videos TikTok marks as ads.",
            "default": false
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "feed",
              "plays",
              "engagement",
              "playsPerHour",
              "newest",
              "outlier"
            ],
            "type": "string",
            "description": "Order of the results. 'feed' keeps TikTok's own order. 'playsPerHour' finds videos taking off right now. 'outlier' finds videos that reached far more people than the creator's follower count.",
            "default": "feed"
          },
          "onlyNew": {
            "title": "Only new videos",
            "type": "boolean",
            "description": "Skip videos already returned by an earlier run with the same monitor name. Use with a schedule to get only fresh trending videos each time. The seen list is kept for 30 days.",
            "default": false
          },
          "monitorName": {
            "title": "Monitor name",
            "type": "string",
            "description": "Name of the seen-videos list used by \"Only new videos\". Use a different name per schedule or project. Letters, numbers and dashes only.",
            "default": "default"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}