{
  "openapi": "3.0.1",
  "info": {
    "title": "TikTok Sound Scraper - Music & Audio",
    "description": "Scrape TikTok sounds and music: title, artist, album, usage count, audio and cover URLs, commercial-use flags, plus every video using the sound with views, likes and creator. Use sound URLs, clip IDs or search.",
    "version": "1.0",
    "x-build-id": "Off7vyPGRLt3rNuIr"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/parsebird~tiktok-sound-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-parsebird-tiktok-sound-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/parsebird~tiktok-sound-scraper/runs": {
      "post": {
        "operationId": "runs-sync-parsebird-tiktok-sound-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/parsebird~tiktok-sound-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-parsebird-tiktok-sound-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": {
          "soundUrls": {
            "title": "TikTok sound URLs",
            "type": "array",
            "description": "Add TikTok sound pages (https://www.tiktok.com/music/name-1234567890123456789), one per line. Short links (vm.tiktok.com) are followed to the sound page they redirect to.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "Same as TikTok sound URLs, in Apify request-list format. Useful when another Actor or integration passes URLs in. Leave empty if you used the field above.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "clipIds": {
            "title": "Sound clip IDs",
            "type": "array",
            "description": "Add raw TikTok sound IDs, the 15-21 digit number at the end of a sound URL (for example 7439295283975702544).",
            "items": {
              "type": "string"
            }
          },
          "searchQueries": {
            "title": "Search sounds",
            "type": "array",
            "description": "Enter keywords such as a song title, artist or meme, one per line. Each query finds sounds through TikTok's sound search, then scrapes them like a sound URL.",
            "items": {
              "type": "string"
            }
          },
          "outputMode": {
            "title": "What to save",
            "enum": [
              "sounds_and_videos",
              "sounds",
              "videos"
            ],
            "type": "string",
            "description": "Save sound details, the videos that use each sound, or both. Sound and video rows are charged as separate events.",
            "default": "sounds_and_videos"
          },
          "maxSounds": {
            "title": "Max sounds",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Stop after this many unique sounds across all URLs, clip IDs and searches.",
            "default": 50
          },
          "maxVideosPerSound": {
            "title": "Max videos per sound",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Save at most this many videos for each sound. Set 0 to skip videos.",
            "default": 30
          },
          "maxSearchResultsPerQuery": {
            "title": "Max sounds per search",
            "minimum": 1,
            "maximum": 300,
            "type": "integer",
            "description": "Take at most this many sounds from each search query.",
            "default": 10
          },
          "maxPagesPerSound": {
            "title": "Max video pages per sound",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Safety cap on how many pages of videos are loaded for each sound. One page holds about 10-13 videos.",
            "default": 10
          },
          "filterBy": {
            "title": "Search in",
            "enum": [
              "all",
              "title",
              "creators"
            ],
            "type": "string",
            "description": "Match search keywords against everything, the sound title only, or the sound creator only. Same as the filter in TikTok's sound search.",
            "default": "all"
          },
          "sortType": {
            "title": "Sort search results",
            "enum": [
              "relevance",
              "most_used",
              "most_recent",
              "shortest",
              "longest"
            ],
            "type": "string",
            "description": "Keep TikTok's relevance order, or re-sort the sounds a search returned by usage, recency or length before the per-search limit is applied. For any sort other than relevance, up to 3 times the per-search limit is loaded first, so the order covers that wider pool and not TikTok's full catalog.",
            "default": "relevance"
          },
          "region": {
            "title": "Region",
            "pattern": "^[A-Za-z]{2}$",
            "type": "string",
            "description": "Two-letter country code (US, GB, DE, JP...) sent to TikTok as the region of the request.",
            "default": "US"
          },
          "providerOrder": {
            "title": "Data source order",
            "enum": [
              "app_first",
              "web_first",
              "app_only",
              "web_only"
            ],
            "type": "string",
            "description": "Where sound details come from first. <b>TikTok app</b> reads the sound from its video feed; <b>TikTok web</b> reads it from sound search, which also reports the usage count. Missing fields are filled from the other source unless you choose an 'only' option. Videos always come from the TikTok app feed.",
            "default": "app_first"
          },
          "includeRawData": {
            "title": "Include raw TikTok data",
            "type": "boolean",
            "description": "Add the full TikTok payload for each row in a rawData field. Makes video rows much larger.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}