{
  "openapi": "3.0.1",
  "info": {
    "title": "TikTok Trends Scraper — Hashtags, Videos, Creators & Sounds",
    "description": "TikTok Trends Scraper: ranked Creative Center hashtags across 27 markets with posts, views and popularity curves, plus trending videos, creators and sounds from public Explore. Views, likes, comments and shares on every video row. No login, no cookies, no ad account. JSON or CSV out.",
    "version": "0.0",
    "x-build-id": "uSmuluHFcfXpnTVH7"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/memo23~tiktok-trends-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-memo23-tiktok-trends-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/memo23~tiktok-trends-scraper/runs": {
      "post": {
        "operationId": "runs-sync-memo23-tiktok-trends-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/memo23~tiktok-trends-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-memo23-tiktok-trends-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": [
          "trendTypes"
        ],
        "properties": {
          "trendTypes": {
            "title": "📊 Trend types",
            "type": "array",
            "description": "Which trend surfaces to scrape; pick any combination. 'hashtag' = ranked hashtags from TikTok Creative Center, with posts, views, a popularity curve and top creators. 'video' = videos trending right now on public TikTok Explore, with views, likes, comments, shares. 'creator' = creators derived from the top-creator lists inside trending hashtags and from the authors of trending videos, ranked by followers. 'sound' = sounds aggregated from trending Explore videos, ranked by how many use them. Example: [\"hashtag\",\"sound\"]. Default: [\"hashtag\"].",
            "items": {
              "type": "string",
              "enum": [
                "hashtag",
                "video",
                "creator",
                "sound"
              ],
              "enumTitles": [
                "Hashtags (Creative Center)",
                "Videos (Explore)",
                "Creators (derived)",
                "Sounds (Explore)"
              ]
            },
            "default": [
              "hashtag"
            ]
          },
          "countries": {
            "title": "🌍 Countries",
            "type": "array",
            "description": "ISO 3166-1 alpha-2 country codes for the hashtag ranking, e.g. [\"US\",\"GB\",\"DE\"]. Supported: US, GB, FR, DE, IT, ES, AR, AU, BR, CA, CO, EG, ID, IL, JP, KR, MY, MX, PH, SA, SG, ZA, TW, TH, TR, AE, VN. Leave the list EMPTY to sweep all 27 markets in one run. TikTok returns 3 hashtags per country per period, so more countries is how you get more rows. Videos and sounds come from Explore, which follows the exit IP rather than this list. Default: [\"US\"].",
            "default": [
              "US"
            ],
            "items": {
              "type": "string"
            }
          },
          "periods": {
            "title": "📅 Look-back windows (days)",
            "type": "array",
            "description": "Trend look-back windows for hashtags. Valid values: 7, 30, 120 — pick any combination, each one costs one extra request per country and returns its own 3 hashtags. Example: [7,30]. Ignored for videos and sounds, which are 'right now' surfaces. Default: [7].",
            "items": {
              "type": "string",
              "enum": [
                "7",
                "30",
                "120"
              ],
              "enumTitles": [
                "Last 7 days",
                "Last 30 days",
                "Last 120 days"
              ]
            },
            "default": [
              "7"
            ]
          },
          "maxResults": {
            "title": "🔢 Max results per type",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Upper bound on rows per trend type, per country. Hashtags are capped by TikTok itself at 3 per country per period regardless of this value — raising it does nothing for hashtags. It does control how many videos, creators and sounds are kept. Range 1–100. Example: 50. Default: 30.",
            "default": 30
          },
          "industry": {
            "title": "🏭 Industry filter (optional)",
            "type": "string",
            "description": "Keep only hashtags tagged with this Creative Center industry id (matched against each row's industryIds). Leave empty for all industries. Example: \"22001\" (Apparel & Accessories). Applied after scraping, so it never increases the row count. Default: empty."
          },
          "saveMedia": {
            "title": "🖼️ Save media to storage",
            "type": "boolean",
            "description": "Copy avatars and video covers into this run's key-value store and add a *Stored field next to each original URL (e.g. coverUrlStored). TikTok CDN links carry an expiry signature and rot within hours, so switch this on when the images must stay reachable. Slows the run and adds storage. Values: true or false. Default: false.",
            "default": false
          },
          "proxy": {
            "title": "🌐 Proxy configuration",
            "type": "object",
            "description": "Optional proxy override. Leave it alone to use the built-in residential proxy, which is what the Explore surface needs — TikTok blocks datacenter IPs there. Set useApifyProxy with RESIDENTIAL groups, or supply your own proxyUrls, only if you have a reason to. Default: built-in residential.",
            "default": {
              "useApifyProxy": 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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}