{
  "openapi": "3.0.1",
  "info": {
    "title": "TikTok Sound Lookup: Metadata & Videos Using It",
    "description": "Look up any TikTok sound by URL or ID and get back its title, creator, duration, cover art, and streaming links, plus every video currently using that sound with captions, hashtags, and engagement counts.",
    "version": "1.1",
    "x-build-id": "LmWHGTW7L3zReLZ3O"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/vexaloom-labs~tiktok-sound-lookup-metadata-and-videos-using-it/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-vexaloom-labs-tiktok-sound-lookup-metadata-and-videos-using-it",
        "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/vexaloom-labs~tiktok-sound-lookup-metadata-and-videos-using-it/runs": {
      "post": {
        "operationId": "runs-sync-vexaloom-labs-tiktok-sound-lookup-metadata-and-videos-using-it",
        "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/vexaloom-labs~tiktok-sound-lookup-metadata-and-videos-using-it/run-sync": {
      "post": {
        "operationId": "run-sync-vexaloom-labs-tiktok-sound-lookup-metadata-and-videos-using-it",
        "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": {
          "mode": {
            "title": "Mode",
            "enum": [
              "bySound",
              "searchSounds"
            ],
            "type": "string",
            "description": "Choose how to find sounds: by sound URL/ID, or by keyword search.",
            "default": "bySound"
          },
          "musicUrls": {
            "title": "Sound URLs",
            "type": "array",
            "description": "(mode=bySound) TikTok sound page URLs. Example: https://www.tiktok.com/music/original-sound-7595604258835401494",
            "items": {
              "type": "string"
            }
          },
          "musicIds": {
            "title": "Sound IDs",
            "type": "array",
            "description": "(mode=bySound) Numeric TikTok sound IDs, 15-20 digits, as an alternative to full URLs.",
            "items": {
              "type": "string"
            }
          },
          "searchQueries": {
            "title": "Sound Search Queries",
            "type": "array",
            "description": "(mode=searchSounds) Keywords to search in TikTok's sound catalogue, e.g. lofi, phonk, afrobeats. Each query returns up to 30 sounds; duplicates are removed across queries.",
            "items": {
              "type": "string"
            }
          },
          "maxSoundsPerQuery": {
            "title": "Max Sounds Per Query",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "(mode=searchSounds) Keep at most this many sounds per keyword. TikTok returns a maximum of 30.",
            "default": 10
          },
          "maxPostsPerSound": {
            "title": "Max Videos Per Sound",
            "minimum": 0,
            "maximum": 500,
            "type": "integer",
            "description": "Videos to collect per sound (0-500). Set 0 for sound metadata only. TikTok can cap the public feed per run, so fewer rows may be returned and the run status reports any shortfall.",
            "default": 30
          },
          "includeMusicMetadata": {
            "title": "Include Sound Metadata",
            "type": "boolean",
            "description": "Emit a metadata row per sound with title, creator/artist, duration, covers, DSP IDs, tags and video count.",
            "default": true
          },
          "includePosts": {
            "title": "Include Videos Using The Sound",
            "type": "boolean",
            "description": "Emit one row per video that uses the sound, with author, caption, hashtags, mentions, POI, effects, slideshow images and engagement counts.",
            "default": true
          },
          "includeErrorRows": {
            "title": "Include Error Rows",
            "type": "boolean",
            "description": "Emit a row with rowType='error' when an input cannot be read, instead of only logging it. Off by default.",
            "default": false
          },
          "publishedWithin": {
            "title": "Published Within",
            "enum": [
              "all",
              "day",
              "week",
              "month",
              "year"
            ],
            "type": "string",
            "description": "Keep only videos published inside this window. Applied after collection, to video rows.",
            "default": "all"
          },
          "minPlayCount": {
            "title": "Minimum Play Count",
            "minimum": 0,
            "maximum": 1000000000000,
            "type": "integer",
            "description": "Drop videos below this play count. 0 keeps everything. Videos without a play count are kept only when this is 0.",
            "default": 0
          },
          "minLikeCount": {
            "title": "Minimum Like Count",
            "minimum": 0,
            "maximum": 1000000000000,
            "type": "integer",
            "description": "Drop videos below this like count. 0 keeps everything. Videos without a like count are kept only when this is 0.",
            "default": 0
          },
          "uniqueCreatorsOnly": {
            "title": "One Video Per Creator",
            "type": "boolean",
            "description": "Keep only the highest-play video per author across the run. Useful for audience and creator discovery.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}