{
  "openapi": "3.0.1",
  "info": {
    "title": "TikTok Sound Scraper & Monitor - Video Count & Audio Growth",
    "description": "Track TikTok sounds: how many videos use a sound, its title, artist, length and original-sound flag, and the top videos using it. Monitoring mode returns a sound only when its video count changes, with the growth. Unavailable sounds come back free with the reason.",
    "version": "0.1",
    "x-build-id": "lFIobUKU0jfsKGTgN"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/neverempty~tiktok-sound-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-neverempty-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/neverempty~tiktok-sound-scraper/runs": {
      "post": {
        "operationId": "runs-sync-neverempty-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/neverempty~tiktok-sound-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-neverempty-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": {
          "sounds": {
            "title": "TikTok sound URLs or ids",
            "type": "array",
            "description": "Sounds to read: https://www.tiktok.com/music/SugarCrash-6920125567752734722 (with or without the scheme), https://www.tiktok.com/embed/music/6920125567752734722, or the numeric sound id. One per line (commas also separate entries, and so do spaces between entries that are all sound URLs or ids). Short links (vm.tiktok.com) are not followed: open one in a browser and paste the full sound URL. A repeated sound is read and charged once and the repeat gets a free 'duplicate' row. If you leave this field out with monitoring off, two example sounds are read; with monitoring on it is required. An empty list is rejected.",
            "items": {
              "type": "string"
            }
          },
          "maxResults": {
            "title": "Maximum rows to return",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "With monitoring off, reading stops once this many charged rows have been returned, and a free row says how many entries at the end of the list were not read. Sounds TikTok does not return and unreadable entries do not count. In monitoring mode it does not limit the changes returned: every sound in the list is checked, as far as the run's maximum total charge allows. Up to 1,000 entries are read per run.",
            "default": 100
          },
          "includeSoundDetails": {
            "title": "Read the sound's title, author, length and original flag",
            "type": "boolean",
            "description": "TikTok's sound card has the video count, the artist name and the top videos, but not the title. On = for each row that is returned, the Actor also opens the page of one public video on the card (a second one if the first fails) and takes the title, author name, length, album and TikTok's original-sound flag from it, but only if that video's sound id is the sound you asked for. Off = one request per sound, and those columns stay empty. It does not change the price.",
            "default": true
          },
          "monitoringMode": {
            "title": "Monitoring mode: return a sound only when its video count changes",
            "type": "boolean",
            "description": "Off = every sound comes back with its current counts, charged per row. On = the Actor remembers each sound's video count and, on later runs, returns a sound only when the video count TikTok shows changed since the row last returned for it, with the change, the videos per hour and the range the change could be in given TikTok's rounding. The first run returns every sound once to set the baseline. **In monitoring mode every sound whose video count is read costs $0.30 per 1,000 checks, changed or not** (sounds TikTok does not return, unreadable entries and bot checks are free), plus the row price for the rows returned. Example: 50 sounds every hour = 36,000 checks a month = $10.80. The Actor reads only as many sounds as the run's maximum total charge can pay for with a check and a change row each. Counts are remembered per sound; do not put the same sound in two schedules that can run at the same time.",
            "default": false
          },
          "resetMonitoringState": {
            "title": "Forget what was remembered and start over",
            "type": "boolean",
            "description": "Clears every remembered count for this Actor, so the next monitoring run returns each sound once again as a first check. This affects all your monitoring runs, because counts are stored per sound rather than per list. Turn it off again after one run: left on in a schedule, every run returns every sound as a first check and charges the row price for it.",
            "default": false
          },
          "useProxy": {
            "title": "Use a proxy if TikTok answers with a bot check",
            "type": "boolean",
            "description": "Every page is requested directly first. Only if TikTok answers a page with a bot check, an empty response or no response is that page retried through a proxy session located in the United States (TikTok shows different video counts in different countries, and requests from Apify are answered by TikTok's US servers); the next page is requested directly again. With it off, that answer is retried directly and then returned as a free 'blocked' row, and no proxy is paid for.",
            "default": true
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}