{
  "openapi": "3.0.1",
  "info": {
    "title": "TikTok Trending Sounds Scraper: Songs by Country & Category",
    "description": "Get the TikTok sounds and songs trending now in the countries and Explore categories you pick, ranked by how many trending videos use them. Each row has plays, likes, freshness, commercial-use flag and the change since your last run (NEW, UP, DOWN, DROPPED). No login. Not affiliated with TikTok.",
    "version": "0.0",
    "x-build-id": "EVYs1CVjFyTU9fGLd"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/kizukidata~tiktok-trending-sounds-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-kizukidata-tiktok-trending-sounds-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/kizukidata~tiktok-trending-sounds-scraper/runs": {
      "post": {
        "operationId": "runs-sync-kizukidata-tiktok-trending-sounds-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/kizukidata~tiktok-trending-sounds-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-kizukidata-tiktok-trending-sounds-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": {
          "countries": {
            "title": "Countries",
            "type": "array",
            "description": "Two-letter country codes, one per line (e.g. US, GB, BR, DE, JP), up to 25. Leaving empty defaults to US; each fresh sample (sampled-videos) and returned sound row is charged (same-day reuse is free). Unreachable countries are listed in OUTPUT for free.",
            "default": [
              "US"
            ],
            "items": {
              "type": "string"
            }
          },
          "categories": {
            "title": "Explore categories",
            "type": "array",
            "description": "Explore feed categories to sample. All is the main feed (every topic). Pick a category to get the sounds trending in a niche, for example Singing & Dancing, Comedy, Food or Beauty Care. Each country and category pair is one sample and one ranked list.",
            "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"
            ]
          },
          "sampleVideos": {
            "title": "Videos to sample per country and category",
            "minimum": 100,
            "maximum": 3000,
            "type": "integer",
            "description": "How many different Explore videos to read for each country and category, from 100 to 3,000. A larger sample finds more sounds and gives a steadier ranking. The sample is charged per 100 videos read, once a day: once a run has paid for it, later runs of the same day reuse it for free when Reuse today's sample is on.",
            "default": 1000
          },
          "maxSoundsPerSample": {
            "title": "Sounds per country and category",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "How many sounds to keep from each ranked list (the top of the list), from 1 to 1,000.",
            "default": 100
          },
          "minVideosPerSound": {
            "title": "Minimum videos per sound",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Keep only sounds used by at least this many of the sampled videos. 2 or more keeps the sounds that repeat across the feed, which is the strongest trend signal.",
            "default": 1
          },
          "soundType": {
            "title": "Sound type",
            "enum": [
              "all",
              "music",
              "original"
            ],
            "type": "string",
            "description": "all keeps every sound. music keeps released tracks (TikTok marks them as not original). original keeps sounds made by creators.",
            "default": "all"
          },
          "onlyCommercial": {
            "title": "Only sounds cleared for commercial use",
            "type": "boolean",
            "description": "Keep only sounds TikTok marks as usable in business and branded content (commercialUse: true).",
            "default": false
          },
          "onlyNewSounds": {
            "title": "Only new sounds",
            "type": "boolean",
            "description": "Return and charge only sounds this input never returned before (lifecycle NEW). Use it with a schedule to get an alert list of sounds entering the trend.",
            "default": false
          },
          "onlyChanges": {
            "title": "Only changes",
            "type": "boolean",
            "description": "Return only sounds whose place changed since the last run of this input (NEW, BACK, UP, DOWN) and the sounds that left the list (DROPPED, never charged). Sounds in the same place are skipped and not charged.",
            "default": false
          },
          "reuseTodaysSample": {
            "title": "Reuse today's sample",
            "type": "boolean",
            "description": "When on, a country and category already sampled today (UTC) by your account is ranked again from the stored sample: no request is sent, and no sample fee is charged once a run has paid for that sample. Turn it off to read a fresh sample on every run.",
            "default": true
          },
          "maxItems": {
            "title": "Maximum rows",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum rows written in one run, all countries and categories together, from 1 to 10,000. Raise it to get more of each list: for example 100 for the top 100 sounds of one country.",
            "default": 20
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}