{
  "openapi": "3.0.1",
  "info": {
    "title": "TikTok Sound & Music Scraper: TikTok Music Videos",
    "description": "TikTok sound scraper / API for TikTok music videos using a sound or song. Get captions, views, likes, shares, hashtags and creator profile data, plus the sound's title, artist, duration and total video count. Use a sound URL or ID. No login. Export JSON, CSV or Excel. Pay only per result.",
    "version": "0.1",
    "x-build-id": "6ro3XjSiawmMIS0jN"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/xmolodtsov~tiktok-sound-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-xmolodtsov-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/xmolodtsov~tiktok-sound-scraper/runs": {
      "post": {
        "operationId": "runs-sync-xmolodtsov-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/xmolodtsov~tiktok-sound-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-xmolodtsov-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",
        "required": [
          "musics"
        ],
        "properties": {
          "musics": {
            "title": "Sound URLs or IDs",
            "type": "array",
            "description": "Paste TikTok music URLs, /music/name-ID paths, name-ID slugs or numeric IDs. URLs accept TikTok subdomains, HTTP, HTTPS, no scheme, locales (en, pt-BR), queries and fragments. vm.tiktok.com, vt.tiktok.com and TikTok /t/CODE share links must lead directly to a music page. Share links that do not lead to music give a billed INVALID_MUSIC row; transient failures give no row. Repeated sounds are scraped once. Tap the sound name under a TikTok video to copy its link.",
            "items": {
              "type": "string"
            }
          },
          "resultsPerPage": {
            "title": "Maximum videos per sound",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of videos to scrape from each sound. Each video is one paid result. TikTok serves about 2,600–3,550 videos per sound at most (varies by sound), fewer for less popular sounds. On the Apify free plan a run stops at 100 results in total (error rows included), with 20 runs per calendar month.",
            "default": 100
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify Proxy is used by default. Change it only if you want to route through your own proxies.",
            "default": {
              "useApifyProxy": true
            }
          },
          "includeMusicDetails": {
            "title": "Music details (opt-in, free)",
            "type": "boolean",
            "description": "Opt-in, off by default. Add musicDetails from the existing feed: TikTok's commercial/copyright flags (not a licensing statement), covers, durations, raw streaming IDs and sound URL. Missing fields are null; no extra requests or charges.",
            "default": false
          },
          "maxItems": {
            "title": "Total results cap (opt-in, free)",
            "minimum": 0,
            "type": "integer",
            "description": "Opt-in run-wide cap across concurrent sounds. Unset, null or 0 keeps current behavior. Positive integers cap total rows, including error rows and restart-seeded rows. Add-ons run only for rows within the cap. The free-plan cap still applies when lower."
          },
          "includeSoundSummary": {
            "title": "Sound summaries (opt-in, free)",
            "type": "boolean",
            "description": "Opt-in, off by default. Write SOUND_SUMMARIES to the run key-value store, one entry per input. TikTok's total is separate from sample metrics over delivered video rows. No dataset rows, extra requests or charges. Creator IDs capped at 10,000 and hashtags at 1,000 per sound; sampleComplete is false on truncation, missing creator IDs or seeded video rows after restart. Seeded delivery counts remain included; sample metrics cover this process, plus creator IDs already read for the profile add-on.",
            "default": false
          },
          "commentsPerPost": {
            "title": "Comments per post (opt-in, paid add-on)",
            "minimum": 0,
            "maximum": 200,
            "type": "integer",
            "description": "Opt-in. Up to 200 top-level comments per video, attached as commentList. Off by default. Available on paid Apify plans only, and dormant until the comment event is priced. Each delivered comment and reply is one add-on unit.",
            "default": 0
          },
          "maxRepliesPerComment": {
            "title": "Replies per comment (opt-in)",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Opt-in. Up to 10 replies per fetched comment. Requires commentsPerPost above zero. Off by default. Each delivered reply uses the comment event.",
            "default": 0
          },
          "includeAuthorProfile": {
            "title": "Creator profile (opt-in, paid add-on)",
            "type": "boolean",
            "description": "Opt-in. Attach authorProfile from the public creator page, once per creator per run; subsequent videos reuse it. Off by default, paid plans only, dormant until author-profile is priced. Failed lookups are null and uncharged.",
            "default": false
          },
          "includeTranscript": {
            "title": "Native transcript (opt-in, paid add-on)",
            "type": "boolean",
            "description": "Opt-in. Attach one native caption track as transcript (lang, source, text). Off by default, paid plans only, dormant until transcript is priced. Missing or failed captions are null and uncharged. No speech recognition.",
            "default": false
          },
          "transcriptLanguage": {
            "title": "Preferred transcript language (opt-in)",
            "type": "string",
            "description": "Opt-in. Preferred caption language, for example en or en-US. Requires includeTranscript. Falls back to creator captions, automatic captions, then translations if the preferred track is absent.",
            "default": ""
          },
          "downloadVideos": {
            "title": "Download videos (opt-in, paid add-on)",
            "type": "boolean",
            "description": "Opt-in. Save validated MP4s to the run key-value store and attach videoFile. Off by default, paid plans only, dormant until the requested quality event is priced. Charged once per stored file at its delivered quality. Missing classes fall back to a lower priced class. Failed downloads are null and uncharged; slideshows are skipped. Native files, no transcoding; HEVC is possible. Maximum file size 64 MB.",
            "default": false
          },
          "videoQuality": {
            "title": "Video quality (opt-in)",
            "enum": [
              "540p",
              "720p",
              "1080p"
            ],
            "type": "string",
            "description": "Opt-in download quality; requires downloadVideos. Default 540p. Missing renditions can fall back to a lower priced class, charged at that class.",
            "default": "540p"
          },
          "minLikes": {
            "title": "Minimum likes (opt-in, paid add-on)",
            "minimum": 0,
            "maximum": 9007199254740991,
            "type": "integer",
            "description": "Inclusive minimum diggCount, opt-in and unset by default. Zero/null/unset: no bound. Paid plans only; all popularity bounds ignored until popularity-filter is priced. Each delivered passing video costs one filter unit plus its result. Scan cap per sound: 3x requested videos (minimum 90); past 450 continue only if at least 1 in 10 passes. Guards apply after full pages; strict bounds may return few/no videos. Rejects get no other add-ons. Dates and popularity share this cap."
          },
          "maxLikes": {
            "title": "Maximum likes (opt-in, paid add-on)",
            "minimum": 0,
            "maximum": 9007199254740991,
            "type": "integer",
            "description": "Opt-in, unset by default. Inclusive maximum diggCount; must be at least minLikes when positive. Zero, null or unset means no upper bound. Paid plans only; ignored until popularity-filter is priced. Uses the same popularity scan cap and delivered-video charge."
          },
          "minPlays": {
            "title": "Minimum plays (opt-in, paid add-on)",
            "minimum": 0,
            "maximum": 9007199254740991,
            "type": "integer",
            "description": "Opt-in, unset by default. Inclusive minimum playCount. Zero, null or unset means no bound. Paid plans only; ignored until popularity-filter is priced. Uses the same popularity scan cap and delivered-video charge."
          },
          "maxPlays": {
            "title": "Maximum plays (opt-in, paid add-on)",
            "minimum": 0,
            "maximum": 9007199254740991,
            "type": "integer",
            "description": "Opt-in, unset by default. Inclusive maximum playCount; must be at least minPlays when positive. Zero, null or unset means no upper bound. Paid plans only; ignored until popularity-filter is priced. Uses the same popularity scan cap and delivered-video charge."
          },
          "oldestPostDate": {
            "title": "Oldest post date (opt-in, free)",
            "type": "string",
            "description": "Opt-in, free. Inclusive lower bound on create time, as an ISO date or timestamp. No default. With popularity off, filters only the first Maximum videos per sound distinct candidates, without deeper paging to replace rejects. With popularity active, both predicates apply within its popularity scan and yield guards. No server-side date filter."
          },
          "newestPostDate": {
            "title": "Newest post date (opt-in, free)",
            "type": "string",
            "description": "Opt-in, free. Inclusive upper create-time bound. A date without time includes the whole UTC day. Uses the same candidate budget as oldestPostDate: Maximum videos per sound when popularity is off, the popularity scan cap when active. No default."
          },
          "includeSlideshowImages": {
            "title": "Slideshow image links (opt-in, free)",
            "type": "boolean",
            "description": "Opt-in, free. Add slideshowImages containing url, width and height from imagePost data already in the sound feed, or null for ordinary videos. No extra requests; does not download image files. Off by default. Existing slideshowImageLinks is unchanged.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}