{
  "openapi": "3.0.1",
  "info": {
    "title": "TikTok Trending Sounds & Music Charts: Top 50, Viral 50, Search",
    "description": "Get TikTok's trending sounds from the Top 50 and Viral 50 music charts, or search sounds by keyword. Each sound has its title, artist, album, duration, cover and a direct audio URL. Add the videos using a sound, with plays, likes and creator follower counts. No login or cookies needed.",
    "version": "1.0",
    "x-build-id": "6oVFR3Iu1DheHhfcT"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/memo23~tiktok-music-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-memo23-tiktok-music-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-music-scraper/runs": {
      "post": {
        "operationId": "runs-sync-memo23-tiktok-music-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-music-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-memo23-tiktok-music-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": {
          "keywords": {
            "title": "Sound keywords",
            "type": "array",
            "description": "Words to search TikTok sounds for, such as a track name, an artist, or a mood like \"lofi\". Each keyword returns matching sounds with their title, artist, duration, cover and audio URL.",
            "items": {
              "type": "string"
            }
          },
          "soundUrls": {
            "title": "Direct sound URLs or IDs",
            "type": "array",
            "description": "Paste TikTok sound URLs (https://www.tiktok.com/music/original-sound-7709194927938325278) or bare numeric sound IDs to look up exact metadata, copyright/commercial-use status, video count, audio download, and videos using that sound.",
            "items": {
              "type": "string"
            }
          },
          "charts": {
            "title": "Music charts",
            "type": "array",
            "description": "TikTok's own music charts for the country in Region, 50 ranked sounds each. Top 50 is what is used most right now, Viral 50 what is rising fastest. Works with or without keywords.",
            "items": {
              "type": "string",
              "enum": [
                "top",
                "viral"
              ],
              "enumTitles": [
                "Top 50",
                "Viral 50"
              ]
            }
          },
          "maxSoundsPerKeyword": {
            "title": "Maximum sounds per keyword",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Stop after this many sounds for each keyword. Sounds arrive about 20 per page.",
            "default": 40
          },
          "maxItems": {
            "title": "Maximum total items",
            "minimum": 1,
            "type": "integer",
            "description": "Optional global cap on total rows (sounds, chart sounds, and videos) emitted across the entire run. Stops before audio download, video fetching, and billing once reached."
          },
          "downloadAudio": {
            "title": "Download each sound's audio file",
            "type": "boolean",
            "description": "Off by default. When on, each sound's full audio track is saved to this run's key-value store as an M4A file, and the sound row gets a downloadedAudioUrl link to it. Each file costs $0.002. A sound returned by several keywords is downloaded and charged once. Paid Apify plans only.",
            "default": false
          },
          "includeVideos": {
            "title": "Also collect videos using each sound",
            "type": "boolean",
            "description": "Off by default. When on, every sound is followed by rows for the videos using it, which is how you measure a sound's reach. Runs take longer.",
            "default": false
          },
          "maxVideosPerSound": {
            "title": "Maximum videos per sound",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Applies only when videos are being collected. Videos arrive a page at a time, often fewer than this limit.",
            "default": 30
          },
          "region": {
            "title": "Region",
            "type": "string",
            "description": "Two-letter country code, for example US, GB, DE. Picks the country of the music charts and shapes which sounds a keyword search returns. Defaults to US.",
            "default": "US"
          },
          "onlyOriginal": {
            "title": "Only original sounds",
            "type": "boolean",
            "description": "Keep only creator-recorded original sounds (isOriginal === true).",
            "default": false
          },
          "excludeOriginal": {
            "title": "Exclude original sounds",
            "type": "boolean",
            "description": "Skip creator-recorded original sounds and keep only catalog/licensed tracks (isOriginal === false).",
            "default": false
          },
          "onlyCommercial": {
            "title": "Only commercial-use sounds",
            "type": "boolean",
            "description": "Keep only TikTok sounds marked commercial-use cleared (isCommercialMusic === true).",
            "default": false
          },
          "minDurationSeconds": {
            "title": "Minimum duration (seconds)",
            "minimum": 0,
            "type": "integer",
            "description": "Skip sounds shorter than this duration in seconds."
          },
          "maxDurationSeconds": {
            "title": "Maximum duration (seconds)",
            "minimum": 1,
            "type": "integer",
            "description": "Skip sounds longer than this duration in seconds."
          },
          "minVideosCount": {
            "title": "Minimum video usage count",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only sounds used by at least this many TikTok videos (videoCount)."
          },
          "includeKeywords": {
            "title": "Include keywords (title / artist / album)",
            "type": "array",
            "description": "Case-insensitive substrings. Keep only sounds whose title, artist, or album matches at least one keyword.",
            "items": {
              "type": "string"
            }
          },
          "excludeKeywords": {
            "title": "Exclude keywords (title / artist / album)",
            "type": "array",
            "description": "Case-insensitive substrings. Skip any sound whose title, artist, or album matches any keyword.",
            "items": {
              "type": "string"
            }
          },
          "excludeAuthors": {
            "title": "Exclude artists / authors",
            "type": "array",
            "description": "Case-insensitive artist or creator names to exclude from results (leading @ optional).",
            "items": {
              "type": "string"
            }
          },
          "onlyNewSounds": {
            "title": "Only new sounds (monitor mode)",
            "type": "boolean",
            "description": "Skip sounds whose soundId was already delivered in an earlier run using the same monitorStoreName. Checked before audio download, video collection, dataset push, and billing.",
            "default": false
          },
          "monitorStoreName": {
            "title": "Monitor Key-Value Store name",
            "type": "string",
            "description": "Named Apify Key-Value Store used to persist seen sound IDs across runs when onlyNewSounds (or monitorMode) is enabled. Defaults to \"tiktok-music-monitor\"."
          },
          "resetMonitor": {
            "title": "Reset monitor state",
            "type": "boolean",
            "description": "Clear previously stored seen sound IDs in monitorStoreName at the start of this run.",
            "default": false
          },
          "compact": {
            "title": "Compact output rows",
            "type": "boolean",
            "description": "Emit concise sound/chart/video rows keeping core fields (soundId, soundUrl, soundTitle, soundAuthor, album, durationSeconds, videoCount, isOriginal, isCommercialMusic, playUrl, coverUrl, chart rank, and core video metrics) while omitting secondary metadata fields.",
            "default": false
          },
          "excludeEmptyFields": {
            "title": "Exclude empty fields",
            "type": "boolean",
            "description": "Recursively strip null, undefined, empty strings, empty arrays, and empty objects from output rows while strictly preserving 0 and false.",
            "default": false
          },
          "searchQueries": {
            "title": "Search queries (alias for keywords)",
            "type": "array",
            "description": "Drop-in alias for keywords.",
            "items": {
              "type": "string"
            }
          },
          "query": {
            "title": "Single query (alias for keywords)",
            "type": "string",
            "description": "Single-keyword drop-in alias for keywords."
          },
          "startUrls": {
            "title": "Start URLs (alias for soundUrls)",
            "type": "array",
            "description": "Drop-in alias for soundUrls. Accepts TikTok music URL strings, { url } request objects, or numeric sound IDs."
          },
          "urls": {
            "title": "URLs (alias for soundUrls)",
            "type": "array",
            "description": "Drop-in alias for soundUrls. Accepts TikTok music URL strings, { url } request objects, or numeric sound IDs."
          },
          "musicUrls": {
            "title": "Music URLs (alias for soundUrls)",
            "type": "array",
            "description": "Drop-in alias for soundUrls. Accepts TikTok music URL strings, { url } request objects, or numeric sound IDs."
          },
          "maxResults": {
            "title": "Maximum results (alias for maxItems)",
            "minimum": 1,
            "type": "integer",
            "description": "Drop-in alias for maxItems (global cap on total rows emitted across the run)."
          },
          "resultsPerPage": {
            "title": "Results per page (alias for maxSoundsPerKeyword)",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Drop-in alias for maxSoundsPerKeyword."
          },
          "limit": {
            "title": "Limit (alias for maxSoundsPerKeyword)",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Drop-in alias for maxSoundsPerKeyword."
          },
          "country": {
            "title": "Country (alias for region)",
            "type": "string",
            "description": "Drop-in alias for region (two-letter country code such as US, GB, DE)."
          },
          "minUsageCount": {
            "title": "Minimum usage count (alias for minVideosCount)",
            "minimum": 0,
            "type": "integer",
            "description": "Drop-in alias for minVideosCount."
          },
          "monitorMode": {
            "title": "Monitor mode (alias for onlyNewSounds)",
            "type": "boolean",
            "description": "Drop-in alias for onlyNewSounds."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}