{
  "openapi": "3.1.0",
  "info": {
    "title": "tikdataapi.com API",
    "version": "0.1.0",
    "description": "Read-only TikTok data API for public data. One credit is one profile, one video, one comment, one\nhashtag, one sound, one live room, one live state or one transcript returned: in video search one video, in account search and in a follower or following list one profile, in sound search one sound, in live search one live room, in the playlists of an account one playlist. Empty results and failed requests cost nothing. Every response carries\n`credits_charged`, `balance_remaining`, `cache` and `request_id`. Every object carries `collected_at`:\nthe time we read it from TikTok.\n\nNo TikTok login is used or needed: everything here is what a logged-out visitor of tiktok.com can see.\nThat includes video search (the general \"Top\" search of TikTok), account search (the \"Users\" tab\nof search) and the follower and following lists of an account (`/v1/search/videos`,\n`/v1/search/users`, `/v1/users/{user}/followers`, `/v1/users/{user}/following`, new on 2026-12-02;\ntheir limits at TikTok are not measured yet). New on 2026-12-03, with limits not measured yet either:\nsounds and their videos (`/v1/music/{id}`, `/v1/music/{id}/videos`), the videos an account reposted\n(`/v1/users/{user}/reposts`), the playlists of an account and their videos (`/v1/users/{user}/playlists`,\n`/v1/playlists/{id}/videos`), the videos related to a video (`/v1/videos/{id}/related`) and the trending\nvideos of the explore feed (`/v1/trending/videos`). Also new on 2026-12-03, limits not measured yet:\nsound search and live search (`/v1/search/music`, `/v1/search/live`, the \"Sounds\" and \"LIVE\" tabs of\nsearch), whether an account is live now (`/v1/users/{user}/live`), and the transcript of a video from\nits subtitles (`/v1/videos/{id}/transcript`). Hashtag search (`/v1/search/hashtags`) ranks the\nhashtags of the videos of the general search: TikTok gives a logged-out visitor no hashtag search of\nits own. It does not include the filters and sorting of the Videos tab of search (TikTok ignores them for a logged-out visitor),\nliked videos (private by default: TikTok gives a logged-out visitor none), video files, or the stream\nof a live room.\n\nBatch reads: `/v1/users/batch` and `/v1/videos/batch` take up to 100 usernames or video ids per call.\n`/v1/users/videos/batch` gives the newest videos of up to 20 accounts per call.\nMCP: the same data is served to agents at `https://api.tikdataapi.com/mcp` (Streamable HTTP, same key).\nDocs for agents: `https://tikdataapi.com/llms.txt`.\n\n## Versioning and deprecation\n\nThe major version is in the path: every endpoint begins `/v1/`. Inside a major\nversion we only add — new endpoints, new optional parameters, new fields on an\nobject. Adding a field is not a breaking change, so parse defensively and ignore\nwhat you do not know.\n\nA change that would break a caller opens `/v2/` instead. When that happens `/v1/`\nkeeps answering for **at least 12 months**, and every `/v1/` response carries the\nnotice for the whole of that period:\n\n- `Deprecation: <HTTP-date>` — when the version was declared deprecated (RFC 9745).\n- `Sunset: <HTTP-date>` — the earliest date it may stop answering (RFC 8594).\n- `Link: <https://tikdataapi.com/docs/versioning>; rel=\"deprecation\"` — what changed\n  and how to move.\n\nNo header, no sunset: absence of `Sunset` on a response is the promise that this\nversion is not going away inside the notice period. Nothing is ever removed from\n`/v1/` without it.\n\n## Rate limits\n\nEvery `/v1/` response carries `RateLimit` and `RateLimit-Policy` (header names from\nthe IETF draft draft-ietf-httpapi-ratelimit-headers), on a refusal as much as on a\nsuccess, so a client can throttle without first being refused. A `429` also carries\n`Retry-After` in whole seconds. The limit is per account, not per key, and rises with\nthe total paid: 1 request per second before the first pack, 20 from it, up to 200.\n\nOne account can have 16 reads of TikTok in progress at the same time. A further call\nwaits up to 5 seconds for a place, then gets `503` with the code `busy` and\n`Retry-After: 2`, free. A response served from cache does not count.\n\nThe keyless endpoints — `GET /`, `/status`, `/healthz` and `/openapi.yaml` — carry\nthe same two headers under a separate policy named `public`: 10 requests per second\nper address. That is far above any real caller and exists to stop a loop, not to\nration a public document.\n\n## Errors\n\nEvery failure is one shape, documented as `Error` below: an `error` object with a\nstable machine-readable `code`, a human-readable `message`, and the `request_id`\nto quote in support. The same body is served as `application/problem+json`\n(RFC 9457) to callers that ask for it, with `type`, `title`, `status` and\n`detail` alongside the same fields. Failed requests are never charged.\n",
    "termsOfService": "https://tikdataapi.com/terms",
    "contact": {
      "name": "tikdataapi.com",
      "url": "https://tikdataapi.com",
      "email": "hello@tikdataapi.com"
    }
  },
  "externalDocs": {
    "description": "Guides and quickstart",
    "url": "https://tikdataapi.com/docs"
  },
  "servers": [
    {
      "url": "https://api.tikdataapi.com"
    }
  ],
  "security": [
    {
      "ApiKey": []
    },
    {
      "OAuth2": [
        "read"
      ]
    }
  ],
  "components": {
    "securitySchemes": {
      "ApiKey": {
        "type": "apiKey",
        "in": "header",
        "name": "x-api-key",
        "description": "Your key from https://tikdataapi.com/dashboard. Grants the `read` scope and nothing else.\n"
      },
      "OAuth2": {
        "type": "oauth2",
        "description": "For a hosted client that cannot be handed a key: it registers itself (RFC 7591),\nsends the person through a consent screen, and exchanges a PKCE-bound code.\nDiscovery starts at https://api.tikdataapi.com/.well-known/oauth-protected-resource.\nThe credential it receives is an ordinary API key on the approving account.\n",
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://tikdataapi.com/oauth/authorize",
            "tokenUrl": "https://tikdataapi.com/api/oauth/token",
            "refreshUrl": "https://tikdataapi.com/api/oauth/token",
            "scopes": {
              "read": "Read public TikTok data: profiles, videos, the videos of an account, comments, replies,\nhashtags, sounds, playlists, reposts, related and trending videos, transcripts, live state, video,\naccount, sound, live and hashtag search, and the follower and following lists of an account. This is the only scope the API has, because there is no write path in the product:\nno posting, no direct messages, no mutation of anything on TikTok.\n"
            }
          }
        }
      }
    },
    "parameters": {
      "cursor": {
        "name": "cursor",
        "in": "query",
        "schema": {
          "type": "string"
        },
        "description": "Opaque cursor from `next_cursor` of the previous page. TikTok decides how many items one of its pages\nholds: about 30 videos of an account, 20 comments or replies, 30 videos of a hashtag,\n12 videos of a search, about 10 accounts of an account search, 30 accounts of a follower or\nfollowing list, 30 videos of a sound or of a playlist, 16 reposts, 20 playlists, 12 sounds of a sound\nsearch, up to 12 rooms of a live search.\nA smaller `count` cuts a TikTok page, and `next_cursor` continues from the cut with no gap, from cache at\nhalf price. A larger `count` fills the page from more TikTok pages in the same call: at most 6 reads of\nTikTok, and no new read after 8 seconds. A page can therefore hold fewer than `count` items while the\nlist goes on; `next_cursor` then continues with no gap. You pay for the items you receive. No\n`next_cursor` means the end.\n"
      },
      "fresh": {
        "name": "fresh",
        "in": "query",
        "schema": {
          "type": "boolean",
          "default": false
        },
        "description": "Read TikTok again and skip the cache. An item that has a cached copy costs 2x credits and is marked\n`\"cache\": \"bypass\"`. An item with no cached copy costs the normal price, as it would without `fresh`.\n"
      }
    },
    "schemas": {
      "User": {
        "type": "object",
        "description": "An account. The counts (`followers`, `following`, `likes`, `videos`) are exact in a profile that you\nread with `/v1/users/{user}` or `/v1/users/batch`. In the `author` of a video, TikTok sends them\nrounded, and in an entry of a follower or following list they may be rounded: read the profile for the\nexact counts.\n",
        "required": [
          "id",
          "username",
          "sec_uid",
          "nickname",
          "followers",
          "following",
          "likes",
          "videos",
          "collected_at"
        ],
        "properties": {
          "id": {
            "type": "string",
            "example": "107955",
            "description": "The numeric account id. It stays the same when the username changes."
          },
          "username": {
            "type": "string",
            "example": "tiktok",
            "description": "The name after the @ in the address of the profile."
          },
          "sec_uid": {
            "type": "string",
            "example": "MS4wLjABAAAAv7iSuuXDJGDvJkmH_vz1qkDZYo1apxgzaxdBSeIuPiM",
            "description": "The second, long account id of TikTok. It stays the same when the username changes. Every endpoint\nthat takes a username also takes this id, and then needs no lookup of the profile.\n"
          },
          "nickname": {
            "type": "string",
            "description": "The display name."
          },
          "bio": {
            "type": "string"
          },
          "bio_link": {
            "type": "string",
            "description": "The link on the profile, when the account has one."
          },
          "avatar_url": {
            "type": "string",
            "description": "An address on the TikTok image servers. It carries a signature and stops working after some days:\nstore the image, not the address.\n"
          },
          "verified": {
            "type": "boolean"
          },
          "private": {
            "type": "boolean",
            "description": "`true`: TikTok shows the profile, but not its videos, to a reader who does not follow the account.\nThe video list of a private account is empty and costs nothing.\n"
          },
          "language": {
            "type": "string",
            "description": "The language of the account, when TikTok sends it."
          },
          "followers": {
            "type": "integer"
          },
          "following": {
            "type": "integer"
          },
          "likes": {
            "type": "integer",
            "description": "The likes on all videos of the account."
          },
          "videos": {
            "type": "integer",
            "description": "The public videos of the account."
          },
          "friends": {
            "type": "integer",
            "description": "Accounts that follow this account and that it follows. Absent when TikTok does not send it."
          },
          "collected_at": {
            "type": "string",
            "format": "date-time",
            "example": "2026-12-02T08:55:12Z",
            "description": "When we read this profile from TikTok: UTC, whole seconds. The counts and the texts are those of that\nmoment. A profile from cache (`\"cache\": \"hit\"`) keeps the time of its own read; `fresh=true`\ngives a new read and a new time.\n"
          }
        }
      },
      "Music": {
        "type": "object",
        "required": [
          "id",
          "title"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "author": {
            "type": "string",
            "description": "The name of the artist or of the account that made the sound."
          },
          "original": {
            "type": "boolean",
            "description": "`true`: a sound that an account made, not a published track."
          },
          "duration": {
            "type": "integer",
            "description": "Seconds."
          },
          "cover_url": {
            "type": "string",
            "description": "Signed image address; it stops working after some days."
          }
        }
      },
      "Video": {
        "type": "object",
        "required": [
          "id",
          "url",
          "description",
          "created_at",
          "collected_at",
          "author"
        ],
        "properties": {
          "id": {
            "type": "string",
            "example": "7106594312292453675"
          },
          "url": {
            "type": "string",
            "example": "https://www.tiktok.com/@tiktok/video/7106594312292453675"
          },
          "type": {
            "type": "string",
            "enum": [
              "video",
              "photo"
            ],
            "description": "`photo`: a photo post (a set of images with a sound). Then `duration` is the length of the sound."
          },
          "description": {
            "type": "string",
            "description": "The caption as written, with its hashtags and mentions."
          },
          "lang": {
            "type": "string",
            "description": "The language of the caption, when TikTok sends it."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the video was posted."
          },
          "collected_at": {
            "type": "string",
            "format": "date-time",
            "example": "2026-12-02T08:55:12Z",
            "description": "When we read this video from TikTok: UTC, whole seconds. The counts (`plays`, `likes` ...) are those\nof that moment, and the video was there at that moment. A video from cache (`\"cache\": \"hit\"`) keeps\nthe time of its own read, so the videos of one page can have different times; `fresh=true` gives\na new read and a new time.\n"
          },
          "author": {
            "$ref": "#/components/schemas/User"
          },
          "duration": {
            "type": "integer",
            "description": "Seconds."
          },
          "width": {
            "type": "integer"
          },
          "height": {
            "type": "integer"
          },
          "cover_url": {
            "type": "string",
            "description": "The still image. Signed address; it stops working after some days."
          },
          "plays": {
            "type": "integer",
            "description": "TikTok rounds a count of 10,000 or more to hundreds. The same is true for `likes`, `comments` and `shares`."
          },
          "likes": {
            "type": "integer",
            "description": "Rounded to hundreds from 10,000, as `plays`."
          },
          "comments": {
            "type": "integer",
            "description": "Rounded to hundreds from 10,000, as `plays`."
          },
          "shares": {
            "type": "integer",
            "description": "Rounded to hundreds from 10,000, as `plays`."
          },
          "saves": {
            "type": "integer",
            "description": "How many times the video was added to favorites. Exact: TikTok does not round it."
          },
          "music": {
            "$ref": "#/components/schemas/Music"
          },
          "hashtags": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Hashtag names without `#`."
          },
          "mentions": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Usernames without `@`."
          },
          "location": {
            "type": "string",
            "description": "The country where the video was posted, a two-letter code such as `US`, when TikTok sends it."
          },
          "is_ad": {
            "type": "boolean"
          },
          "is_pinned": {
            "type": "boolean",
            "description": "On a video list of an account: `true` for a video the account pinned on top. TikTok puts pinned videos first."
          }
        }
      },
      "CommentAuthor": {
        "type": "object",
        "required": [
          "id",
          "username",
          "nickname"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "username": {
            "type": "string"
          },
          "sec_uid": {
            "type": "string"
          },
          "nickname": {
            "type": "string"
          },
          "avatar_url": {
            "type": "string",
            "description": "Signed address; it stops working after some days."
          }
        }
      },
      "Comment": {
        "type": "object",
        "required": [
          "id",
          "video_id",
          "text",
          "created_at",
          "likes",
          "replies",
          "author",
          "collected_at"
        ],
        "properties": {
          "id": {
            "type": "string",
            "example": "7444093498376454914"
          },
          "video_id": {
            "type": "string"
          },
          "reply_to_id": {
            "type": "string",
            "description": "On a reply: the id of the comment that it answers. Absent on a comment of the video."
          },
          "text": {
            "type": "string"
          },
          "lang": {
            "type": "string",
            "description": "The language of the text, when TikTok sends it."
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "likes": {
            "type": "integer"
          },
          "replies": {
            "type": "integer",
            "description": "Replies to this comment. 0 on a reply."
          },
          "liked_by_author": {
            "type": "boolean",
            "description": "`true`: the author of the video liked this comment."
          },
          "pinned": {
            "type": "boolean",
            "description": "`true`: the author of the video pinned this comment on top."
          },
          "author": {
            "$ref": "#/components/schemas/CommentAuthor"
          },
          "collected_at": {
            "type": "string",
            "format": "date-time",
            "example": "2026-12-02T08:55:12Z",
            "description": "When we read this comment from TikTok. A comment from cache keeps the time of its own read."
          }
        }
      },
      "Hashtag": {
        "type": "object",
        "required": [
          "id",
          "name",
          "videos",
          "views",
          "collected_at"
        ],
        "properties": {
          "id": {
            "type": "string",
            "example": "1636"
          },
          "name": {
            "type": "string",
            "example": "fyp",
            "description": "Without `#`."
          },
          "url": {
            "type": "string",
            "example": "https://www.tiktok.com/tag/fyp"
          },
          "description": {
            "type": "string"
          },
          "cover_url": {
            "type": "string",
            "description": "Signed address; it stops working after some days."
          },
          "videos": {
            "type": "integer",
            "description": "Videos with this hashtag."
          },
          "views": {
            "type": "integer",
            "description": "Plays of all videos with this hashtag."
          },
          "collected_at": {
            "type": "string",
            "format": "date-time",
            "example": "2026-12-02T08:55:12Z",
            "description": "When we read this hashtag from TikTok. A hashtag from cache keeps the time of its own read."
          }
        }
      },
      "MusicDetail": {
        "type": "object",
        "description": "A sound (music) read by its id: the fields of `Music`, the sound of a video, and more. A sound is a\npublished track (with an artist) or an original sound that an account made.\n",
        "required": [
          "id",
          "title",
          "copyrighted",
          "videos",
          "collected_at"
        ],
        "properties": {
          "id": {
            "type": "string",
            "example": "6696419263248336898"
          },
          "title": {
            "type": "string",
            "example": "Halo"
          },
          "author": {
            "type": "string",
            "example": "Beyoncé",
            "description": "The name of the artist or of the account that made the sound."
          },
          "original": {
            "type": "boolean",
            "description": "`true`: a sound that an account made, not a published track."
          },
          "duration": {
            "type": "integer",
            "description": "Seconds."
          },
          "cover_url": {
            "type": "string",
            "description": "Signed image address; it stops working after some days."
          },
          "album": {
            "type": "string",
            "description": "The album of a published track, when TikTok sends it."
          },
          "copyrighted": {
            "type": "boolean",
            "description": "`true`: TikTok marks the sound as a licensed, copyrighted track."
          },
          "play_url": {
            "type": "string",
            "description": "The audio file, when TikTok sends it. Signed address; it stops working after some days."
          },
          "videos": {
            "type": "integer",
            "format": "int64",
            "example": 73900,
            "description": "Videos that use the sound. Rounded by TikTok (for example 73900)."
          },
          "artist_username": {
            "type": "string",
            "example": "beyonce",
            "description": "The username of the official account of the artist of a published track, when TikTok links one."
          },
          "author_username": {
            "type": "string",
            "description": "The username of the account that made an original sound, when TikTok sends it."
          },
          "collected_at": {
            "type": "string",
            "format": "date-time",
            "example": "2026-12-03T19:30:00Z",
            "description": "When we read this sound from TikTok. A sound from cache keeps the time of its own read."
          }
        }
      },
      "PlaylistAuthor": {
        "type": "object",
        "description": "The account that made a playlist.",
        "required": [
          "id",
          "username",
          "sec_uid",
          "nickname"
        ],
        "properties": {
          "id": {
            "type": "string",
            "example": "107955"
          },
          "username": {
            "type": "string",
            "example": "tiktok"
          },
          "sec_uid": {
            "type": "string",
            "example": "MS4wLjABAAAAv7iSuuXDJGDvJkmH_vz1qkDZYo1apxgzaxdBSeIuPiM"
          },
          "nickname": {
            "type": "string",
            "example": "TikTok"
          }
        }
      },
      "Playlist": {
        "type": "object",
        "description": "A playlist that an account made (TikTok calls it a \"mix\"). Read its videos with\n`/v1/playlists/{id}/videos`.\n",
        "required": [
          "id",
          "name",
          "videos",
          "author",
          "collected_at"
        ],
        "properties": {
          "id": {
            "type": "string",
            "example": "7681171537575824159"
          },
          "name": {
            "type": "string",
            "example": "Songs Of The Summer 2026"
          },
          "videos": {
            "type": "integer",
            "format": "int64",
            "example": 3,
            "description": "Videos in the playlist."
          },
          "cover_url": {
            "type": "string",
            "description": "Signed image address; it stops working after some days."
          },
          "author": {
            "$ref": "#/components/schemas/PlaylistAuthor"
          },
          "collected_at": {
            "type": "string",
            "format": "date-time",
            "example": "2026-12-03T19:30:00Z",
            "description": "When we read this entry from TikTok. An entry from cache keeps the time of its own read."
          }
        }
      },
      "MusicSummary": {
        "type": "object",
        "description": "A sound in the results of a sound search: a short sound, what the sound search of TikTok sends. For\nthe full sound, read `/v1/music/{id}`; for its videos, `/v1/music/{id}/videos`.\n",
        "required": [
          "id",
          "title",
          "author",
          "collected_at"
        ],
        "properties": {
          "id": {
            "type": "string",
            "example": "6696419263248336898",
            "description": "The id of the sound, as for `/v1/music/{id}`."
          },
          "title": {
            "type": "string",
            "example": "Halo"
          },
          "author": {
            "type": "string",
            "example": "Beyoncé",
            "description": "The name of the artist or of the account that made the sound."
          },
          "album": {
            "type": "string",
            "description": "The album of a published track, when TikTok sends it."
          },
          "duration": {
            "type": "integer",
            "description": "Seconds, when TikTok sends it."
          },
          "cover_url": {
            "type": "string",
            "description": "Signed image address; it stops working after some days."
          },
          "original": {
            "type": "boolean",
            "description": "`true`: a sound that an account made, not a published track. Absent when TikTok does not say."
          },
          "videos": {
            "type": "integer",
            "format": "int64",
            "description": "Videos that use the sound, when the search result carries the count. Rounded by TikTok."
          },
          "collected_at": {
            "type": "string",
            "format": "date-time",
            "example": "2026-12-03T19:45:00Z",
            "description": "When we read this entry from TikTok. An entry from cache keeps the time of its own read."
          }
        }
      },
      "LiveRoomAuthor": {
        "type": "object",
        "description": "The account that hosts a live room.",
        "required": [
          "id",
          "username",
          "nickname"
        ],
        "properties": {
          "id": {
            "type": "string",
            "example": "107955"
          },
          "username": {
            "type": "string",
            "example": "tiktok"
          },
          "sec_uid": {
            "type": "string",
            "example": "MS4wLjABAAAAv7iSuuXDJGDvJkmH_vz1qkDZYo1apxgzaxdBSeIuPiM",
            "description": "Absent when TikTok does not send it."
          },
          "nickname": {
            "type": "string",
            "example": "TikTok"
          }
        }
      },
      "LiveRoom": {
        "type": "object",
        "description": "A live room of TikTok: an entry of a live search, or the live state of an account. No stream\naddresses. For an account that is not live, `live` is `false` and the room fields (`room_id`,\n`title`, `viewers`, `started_at`, `cover_url`) are absent.\n",
        "required": [
          "live",
          "author",
          "collected_at"
        ],
        "properties": {
          "room_id": {
            "type": "string",
            "example": "7578012345678901234",
            "description": "The id of the room. Absent when the account is not live."
          },
          "live": {
            "type": "boolean",
            "description": "`true`: the room is live now."
          },
          "title": {
            "type": "string",
            "example": "Cooking dinner"
          },
          "viewers": {
            "type": "integer",
            "format": "int64",
            "example": 1250,
            "description": "Viewers in the room now."
          },
          "started_at": {
            "type": "string",
            "format": "date-time",
            "example": "2026-12-03T19:02:11Z",
            "description": "When the live began."
          },
          "cover_url": {
            "type": "string",
            "description": "Signed image address; it stops working after some days."
          },
          "author": {
            "$ref": "#/components/schemas/LiveRoomAuthor"
          },
          "collected_at": {
            "type": "string",
            "format": "date-time",
            "example": "2026-12-03T19:45:00Z",
            "description": "When we read this room from TikTok. A room from cache keeps the time of its own read."
          }
        }
      },
      "TranscriptSegment": {
        "type": "object",
        "required": [
          "start",
          "end",
          "text"
        ],
        "properties": {
          "start": {
            "type": "number",
            "format": "double",
            "example": 0.12,
            "description": "Seconds from the start of the video."
          },
          "end": {
            "type": "number",
            "format": "double",
            "example": 1.5,
            "description": "Seconds from the start of the video."
          },
          "text": {
            "type": "string",
            "example": "hello everyone"
          }
        }
      },
      "Transcript": {
        "type": "object",
        "description": "The transcript of a video, from the subtitles of TikTok. Most are made by its speech recognition\n(`source` `ASR`); they can have errors.\n",
        "required": [
          "video_id",
          "language",
          "source",
          "languages",
          "segments",
          "text",
          "collected_at"
        ],
        "properties": {
          "video_id": {
            "type": "string",
            "example": "7708543740230536461"
          },
          "language": {
            "type": "string",
            "example": "eng-US",
            "description": "The language of this transcript, as TikTok names it."
          },
          "source": {
            "type": "string",
            "example": "ASR",
            "description": "Where the subtitles come from, as TikTok names it: `ASR` is speech recognition."
          },
          "languages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "example": [
              "eng-US",
              "deu-DE"
            ],
            "description": "Every language that the video has subtitles in. Pick one with `lang`."
          },
          "segments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TranscriptSegment"
            }
          },
          "text": {
            "type": "string",
            "example": "hello everyone welcome back",
            "description": "The text of the segments",
            "joined with spaces.": null
          },
          "collected_at": {
            "type": "string",
            "format": "date-time",
            "example": "2026-12-03T19:45:00Z",
            "description": "When we read this transcript from TikTok. A transcript from cache keeps the time of its own read."
          }
        }
      },
      "Meta": {
        "type": "object",
        "required": [
          "items",
          "credits_charged",
          "balance_remaining",
          "cache",
          "request_id"
        ],
        "properties": {
          "items": {
            "type": "integer",
            "description": "Objects returned."
          },
          "credits_charged": {
            "type": "number",
            "example": 16
          },
          "balance_remaining": {
            "type": "number",
            "example": 79984
          },
          "cache": {
            "type": "string",
            "enum": [
              "miss",
              "hit",
              "bypass"
            ],
            "description": "`miss`: read from TikTok, normal price. `hit`: from cache, half price. `bypass`: `fresh=true` skipped a cached copy, 2x. A page that has cached and new items is `miss` (or `bypass`), and each item costs the price of its own source; `hit` means all of it came from cache."
          },
          "request_id": {
            "type": "string",
            "format": "uuid"
          },
          "next_cursor": {
            "type": "string"
          }
        }
      },
      "VideoPage": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Meta"
          },
          {
            "type": "object",
            "required": [
              "data"
            ],
            "properties": {
              "data": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Video"
                }
              }
            }
          }
        ]
      },
      "CommentPage": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Meta"
          },
          {
            "type": "object",
            "required": [
              "data"
            ],
            "properties": {
              "data": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Comment"
                }
              }
            }
          }
        ]
      },
      "UserPage": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Meta"
          },
          {
            "type": "object",
            "required": [
              "data"
            ],
            "properties": {
              "data": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/User"
                }
              }
            }
          }
        ]
      },
      "UserSummary": {
        "type": "object",
        "description": "An account in the results of an account search: a short profile, what the account search of TikTok\nsends. It is not a `User`: it has no `following`, `videos`, `private`, `bio_link` or `language`. For\nthe full profile with exact counts, read `/v1/users/{user}`, or `/v1/users/batch` for up to 100\naccounts in one call.\n",
        "required": [
          "id",
          "username",
          "sec_uid",
          "nickname",
          "bio",
          "verified",
          "followers",
          "likes",
          "collected_at"
        ],
        "properties": {
          "id": {
            "type": "string",
            "example": "107955",
            "description": "The numeric account id. It stays the same when the username changes."
          },
          "username": {
            "type": "string",
            "example": "tiktok",
            "description": "The name after the @ in the address of the profile."
          },
          "sec_uid": {
            "type": "string",
            "example": "MS4wLjABAAAAv7iSuuXDJGDvJkmH_vz1qkDZYo1apxgzaxdBSeIuPiM",
            "description": "The second, long account id of TikTok. It stays the same when the username changes. Every endpoint\nthat takes a username also takes this id, and then needs no lookup of the profile.\n"
          },
          "nickname": {
            "type": "string",
            "example": "TikTok",
            "description": "The display name."
          },
          "bio": {
            "type": "string",
            "example": "Your next discovery is waiting on TikTok."
          },
          "avatar_url": {
            "type": "string",
            "description": "The small avatar (100x100), on the TikTok image servers. The address carries a signature and stops\nworking after some days: store the image, not the address. Absent when TikTok sends none.\n"
          },
          "verified": {
            "type": "boolean",
            "description": "`true` when TikTok marks the account as verified. This includes its \"Popular creator\" mark and the\nmarks of institutions.\n"
          },
          "followers": {
            "type": "integer",
            "example": 97400000,
            "description": "Rounded by TikTok (for example 1100000). `/v1/users/{user}` gives the exact count."
          },
          "likes": {
            "type": "integer",
            "example": 470139938,
            "description": "The likes on all videos of the account. Not rounded."
          },
          "collected_at": {
            "type": "string",
            "format": "date-time",
            "example": "2026-12-02T21:42:29Z",
            "description": "When we read this entry from TikTok: UTC, whole seconds. An entry from cache (`\"cache\": \"hit\"`)\nkeeps the time of its own read.\n"
          }
        }
      },
      "UserSummaryPage": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Meta"
          },
          {
            "type": "object",
            "required": [
              "data"
            ],
            "properties": {
              "data": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/UserSummary"
                }
              }
            }
          }
        ]
      },
      "PlaylistPage": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Meta"
          },
          {
            "type": "object",
            "required": [
              "data"
            ],
            "properties": {
              "data": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Playlist"
                }
              }
            }
          }
        ]
      },
      "MusicSummaryPage": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Meta"
          },
          {
            "type": "object",
            "required": [
              "data"
            ],
            "properties": {
              "data": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/MusicSummary"
                }
              }
            }
          }
        ]
      },
      "HashtagSummary": {
        "type": "object",
        "description": "A hashtag found by hashtag search. TikTok gives a logged-out visitor no hashtag search, so the\ncounts are of the videos of the general search for the query, not of all of TikTok. For the totals of\nTikTok (all videos, all views), read `/v1/hashtags/{name}`.\n",
        "required": [
          "name",
          "url",
          "result_videos",
          "result_plays",
          "collected_at"
        ],
        "properties": {
          "name": {
            "type": "string",
            "example": "recipe",
            "description": "Without `#`, in lower case: the name that `/v1/hashtags/{name}` takes."
          },
          "url": {
            "type": "string",
            "example": "https://www.tiktok.com/tag/recipe"
          },
          "result_videos": {
            "type": "integer",
            "example": 6,
            "description": "The videos of the search results that use this hashtag."
          },
          "result_plays": {
            "type": "integer",
            "format": "int64",
            "example": 18400000,
            "description": "The sum of the plays of those videos."
          },
          "collected_at": {
            "type": "string",
            "format": "date-time",
            "example": "2026-12-03T20:00:00Z",
            "description": "When we read the newest of those videos from TikTok."
          }
        }
      },
      "HashtagSummaryPage": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Meta"
          },
          {
            "type": "object",
            "required": [
              "data"
            ],
            "properties": {
              "data": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/HashtagSummary"
                }
              }
            }
          }
        ]
      },
      "LiveRoomPage": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Meta"
          },
          {
            "type": "object",
            "required": [
              "data"
            ],
            "properties": {
              "data": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/LiveRoom"
                }
              }
            }
          }
        ]
      },
      "LiveRoomResponse": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Meta"
          },
          {
            "type": "object",
            "required": [
              "data"
            ],
            "properties": {
              "data": {
                "$ref": "#/components/schemas/LiveRoom"
              }
            }
          }
        ]
      },
      "TranscriptResponse": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Meta"
          },
          {
            "type": "object",
            "required": [
              "data"
            ],
            "properties": {
              "data": {
                "$ref": "#/components/schemas/Transcript"
              }
            }
          }
        ]
      },
      "MusicResponse": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Meta"
          },
          {
            "type": "object",
            "required": [
              "data"
            ],
            "properties": {
              "data": {
                "$ref": "#/components/schemas/MusicDetail"
              }
            }
          }
        ]
      },
      "UserResponse": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Meta"
          },
          {
            "type": "object",
            "required": [
              "data"
            ],
            "properties": {
              "data": {
                "$ref": "#/components/schemas/User"
              }
            }
          }
        ]
      },
      "VideoResponse": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Meta"
          },
          {
            "type": "object",
            "required": [
              "data"
            ],
            "properties": {
              "data": {
                "$ref": "#/components/schemas/Video"
              }
            }
          }
        ]
      },
      "HashtagResponse": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Meta"
          },
          {
            "type": "object",
            "required": [
              "data"
            ],
            "properties": {
              "data": {
                "$ref": "#/components/schemas/Hashtag"
              }
            }
          }
        ]
      },
      "BatchError": {
        "type": "object",
        "required": [
          "input",
          "code",
          "message"
        ],
        "properties": {
          "input": {
            "type": "string",
            "description": "The username or id: a username without `@` and in lower case, an id as sent."
          },
          "code": {
            "type": "string",
            "enum": [
              "not_found",
              "no_credits",
              "access_denied",
              "upstream_rate_limited",
              "upstream_error",
              "request_rejected",
              "bad_request",
              "busy"
            ]
          },
          "message": {
            "type": "string"
          },
          "reason": {
            "$ref": "#/components/schemas/NotFoundReason"
          }
        }
      },
      "BatchMeta": {
        "type": "object",
        "required": [
          "errors",
          "items",
          "credits_charged",
          "balance_remaining",
          "cache",
          "cache_hits",
          "request_id"
        ],
        "properties": {
          "errors": {
            "type": "array",
            "description": "Inputs that returned nothing, with the reason. Never charged.",
            "items": {
              "$ref": "#/components/schemas/BatchError"
            }
          },
          "items": {
            "type": "integer",
            "description": "Objects returned. In the video lists batch: videos returned, for all accounts together."
          },
          "credits_charged": {
            "type": "number"
          },
          "balance_remaining": {
            "type": "number"
          },
          "cache": {
            "type": "string",
            "enum": [
              "miss",
              "hit",
              "mixed",
              "bypass"
            ],
            "description": "The mode of the found items when they all agree, else `mixed`."
          },
          "cache_hits": {
            "type": "integer",
            "description": "Objects served from cache, at half price. In the video lists batch: accounts served from cache."
          },
          "request_id": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "UserBatch": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BatchMeta"
          },
          {
            "type": "object",
            "required": [
              "data"
            ],
            "properties": {
              "data": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/User"
                },
                "description": "Found profiles, in input order."
              }
            }
          }
        ]
      },
      "VideoBatch": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BatchMeta"
          },
          {
            "type": "object",
            "required": [
              "data"
            ],
            "properties": {
              "data": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Video"
                },
                "description": "Found videos, in input order."
              }
            }
          }
        ]
      },
      "UserVideos": {
        "type": "object",
        "required": [
          "user",
          "videos"
        ],
        "properties": {
          "user": {
            "type": "string",
            "description": "The username (without `@`, in lower case) or the sec_uid from the request."
          },
          "videos": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Video"
            },
            "description": "Pinned videos first, then newest first. Empty when the account has no public videos or is private."
          },
          "next_cursor": {
            "type": "string",
            "description": "Send it to `/v1/users/{user}/videos` as `cursor` to read on. Not there on the last page."
          }
        }
      },
      "UserVideosBatch": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BatchMeta"
          },
          {
            "type": "object",
            "required": [
              "data"
            ],
            "properties": {
              "data": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/UserVideos"
                },
                "description": "One entry for each account that was read, in input order."
              }
            }
          }
        ]
      },
      "NotFoundReason": {
        "type": "string",
        "enum": [
          "nonexistent",
          "banned",
          "private",
          "removed",
          "unavailable"
        ],
        "description": "On each `not_found`, and only there: why the object is not there. `nonexistent`: no such account,\nvideo, comment, hashtag or sound, or it was deleted; TikTok does not tell those two apart. `banned`: TikTok\nbanned the account. `private`: a video that only some accounts may see. `removed`: TikTok removed\nthe video for a rule of TikTok. `unavailable`: any other reason, for example a video that TikTok does\nnot show in the country of our reader, or a video with no transcript. A private account is not a `not_found`: its profile comes back\nwith `private: true`.\n"
      },
      "ErrorBody": {
        "description": "The failure itself. `code` is stable; match on it, never on `message`.",
        "type": "object",
        "required": [
          "code",
          "message"
        ],
        "properties": {
          "code": {
            "type": "string",
            "enum": [
              "missing_key",
              "invalid_key",
              "rate_limited",
              "no_credits",
              "email_not_allowed",
              "owner_only",
              "bad_request",
              "not_found",
              "access_denied",
              "billing_disabled",
              "upstream_rate_limited",
              "upstream_error",
              "request_rejected",
              "busy",
              "internal"
            ]
          },
          "message": {
            "type": "string"
          },
          "top_up_url": {
            "type": "string",
            "format": "uri",
            "description": "Only on `no_credits`. The page where a pack is bought.",
            "example": "https://tikdataapi.com/dashboard/billing"
          },
          "reason": {
            "$ref": "#/components/schemas/NotFoundReason"
          }
        }
      },
      "Error": {
        "description": "Every failure from this API, in one shape. Charged nothing, always carries a\n`request_id`. The same failure is available as RFC 9457 `application/problem+json`\nto callers that ask for it.\n",
        "type": "object",
        "required": [
          "error",
          "request_id"
        ],
        "properties": {
          "error": {
            "$ref": "#/components/schemas/ErrorBody"
          },
          "request_id": {
            "type": "string"
          }
        }
      },
      "Problem": {
        "description": "RFC 9457 view of the same failure, served when the caller sends\n`Accept: application/problem+json`. Nothing new is reported — `type`, `title`,\n`status` and `detail` are the registered names for what `error.code` and\n`error.message` already said, so a generic client can read a failure it has no\nspecific handling for.\n",
        "type": "object",
        "required": [
          "type",
          "title",
          "status",
          "code",
          "request_id"
        ],
        "properties": {
          "type": {
            "type": "string",
            "format": "uri",
            "description": "A page describing this error code.",
            "example": "https://tikdataapi.com/docs/errors#no_credits"
          },
          "title": {
            "type": "string",
            "example": "Balance is zero"
          },
          "status": {
            "type": "integer",
            "example": 402
          },
          "detail": {
            "type": "string",
            "description": "The same text as `error.message`."
          },
          "code": {
            "type": "string",
            "description": "The same value as `error.code`. Stable; match on this, not on the text."
          },
          "request_id": {
            "type": "string"
          },
          "error": {
            "description": "The native error object, repeated so one parser reads both shapes.",
            "$ref": "#/components/schemas/ErrorBody"
          }
        }
      }
    },
    "headers": {
      "RateLimit": {
        "description": "Quota state for the account: `limit=<qps>, remaining=<whole requests>,\nreset=<seconds until full>`. Present on every `/v1/` response that resolved a key.\nThe header name is from the IETF draft draft-ietf-httpapi-ratelimit-headers.\n",
        "schema": {
          "type": "string",
          "example": "limit=20, remaining=19, reset=1"
        }
      },
      "RateLimitPolicy": {
        "description": "Statement of the rule itself, independent of the moment. Present on every `/v1/`\nresponse, including a 401, where it quotes the rate a new account starts on. The\nheader name is from the IETF draft draft-ietf-httpapi-ratelimit-headers.\n",
        "schema": {
          "type": "string",
          "example": "\"per-second\"; q=20; w=1"
        }
      },
      "RetryAfter": {
        "description": "Whole seconds to wait before retrying. Sent with 429 and 503.",
        "schema": {
          "type": "integer",
          "example": 1
        }
      }
    },
    "responses": {
      "Unauthorized": {
        "description": "Missing or invalid key. Free.",
        "headers": {
          "RateLimit-Policy": {
            "$ref": "#/components/headers/RateLimitPolicy"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          },
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/Problem"
            }
          }
        }
      },
      "PaymentRequired": {
        "description": "Balance is zero. Buy a pack. Free.",
        "headers": {
          "RateLimit": {
            "$ref": "#/components/headers/RateLimit"
          },
          "RateLimit-Policy": {
            "$ref": "#/components/headers/RateLimitPolicy"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          },
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/Problem"
            }
          }
        }
      },
      "NotFound": {
        "description": "No such object, or TikTok does not show it. Free.",
        "headers": {
          "RateLimit": {
            "$ref": "#/components/headers/RateLimit"
          },
          "RateLimit-Policy": {
            "$ref": "#/components/headers/RateLimitPolicy"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          },
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/Problem"
            }
          }
        }
      },
      "BadRequest": {
        "description": "The request itself is wrong: a bad parameter, cursor or body. Free.",
        "headers": {
          "RateLimit": {
            "$ref": "#/components/headers/RateLimit"
          },
          "RateLimit-Policy": {
            "$ref": "#/components/headers/RateLimitPolicy"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          },
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/Problem"
            }
          }
        }
      },
      "TooMany": {
        "description": "Per-account rate limit. Free. Retry after `Retry-After` seconds.",
        "headers": {
          "RateLimit": {
            "$ref": "#/components/headers/RateLimit"
          },
          "RateLimit-Policy": {
            "$ref": "#/components/headers/RateLimitPolicy"
          },
          "Retry-After": {
            "$ref": "#/components/headers/RetryAfter"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          },
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/Problem"
            }
          }
        }
      },
      "Upstream": {
        "description": "Upstream failure, or all our readers are busy. Free. Retry after `Retry-After` seconds.",
        "headers": {
          "RateLimit": {
            "$ref": "#/components/headers/RateLimit"
          },
          "RateLimit-Policy": {
            "$ref": "#/components/headers/RateLimitPolicy"
          },
          "Retry-After": {
            "$ref": "#/components/headers/RetryAfter"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          },
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/Problem"
            }
          }
        }
      },
      "ServerError": {
        "description": "A fault on our side. Free. Quote `request_id` if it persists.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          },
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/Problem"
            }
          }
        }
      }
    }
  },
  "tags": [
    {
      "name": "users",
      "description": "Profiles, the videos of an account, its reposts and playlists, its followers and following, and whether it is live."
    },
    {
      "name": "videos",
      "description": "Videos, comments and replies, transcripts, related videos, and trending videos."
    },
    {
      "name": "hashtags",
      "description": "Hashtags and their videos."
    },
    {
      "name": "music",
      "description": "Sounds (music) and their videos."
    },
    {
      "name": "playlists",
      "description": "The videos of a playlist. The playlists of an account are under users."
    },
    {
      "name": "search",
      "description": "Video search (the general \"Top\" search of TikTok, videos only), account search (the \"Users\" tab), sound search (\"Sounds\"), live search (\"LIVE\") and hashtag search (made from the videos of the general search)."
    },
    {
      "name": "account",
      "description": "Your key and balance."
    },
    {
      "name": "billing",
      "description": "Credit packs and checkout."
    }
  ],
  "paths": {
    "/v1/me": {
      "get": {
        "operationId": "getMe",
        "tags": [
          "account"
        ],
        "summary": "Key, balance and rate limit",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "customer_id": {
                      "type": "string"
                    },
                    "key_prefix": {
                      "type": "string"
                    },
                    "balance": {
                      "type": "number"
                    },
                    "rate_limit_qps": {
                      "type": "integer"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooMany"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/v1/billing/packs": {
      "get": {
        "operationId": "listPacks",
        "tags": [
          "billing"
        ],
        "summary": "Credit packs on sale",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "example": "starter"
                          },
                          "usd": {
                            "type": "integer",
                            "example": 10
                          },
                          "credits": {
                            "type": "integer",
                            "example": 80000
                          },
                          "buyable": {
                            "type": "boolean"
                          }
                        }
                      }
                    },
                    "rate_limits": {
                      "description": "Requests per second by the total paid over the account's life. The limit only goes up.\n",
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "paid_usd": {
                            "type": "integer",
                            "example": 10
                          },
                          "requests_per_second": {
                            "type": "integer",
                            "example": 20
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooMany"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/v1/billing/checkout": {
      "post": {
        "operationId": "createCheckout",
        "tags": [
          "billing"
        ],
        "summary": "Buy a credit pack",
        "description": "Returns a Stripe Checkout URL. Open it in a browser; after payment the credits land in the wallet of the\nkey's account within seconds. The rate limit follows the total paid over the account's life and only\ngoes up (see `rate_limits` on `/v1/billing/packs`). Credits never expire. Only the account owner\nbuys: a key that a team member made gets `403 owner_only`.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "pack"
                ],
                "properties": {
                  "pack": {
                    "type": "string",
                    "enum": [
                      "starter",
                      "builder",
                      "growth",
                      "scale"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Checkout URL",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "url": {
                      "type": "string",
                      "format": "uri"
                    },
                    "pack": {
                      "type": "string"
                    },
                    "usd": {
                      "type": "integer"
                    },
                    "credits": {
                      "type": "integer"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "Unknown pack."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "A team member made this key, and only the account owner buys (`owner_only`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooMany"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "503": {
            "description": "Card checkout not open yet.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              },
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/v1/users/batch": {
      "post": {
        "operationId": "getUsers",
        "tags": [
          "users"
        ],
        "summary": "Profiles by username, batch",
        "description": "Up to 100 profiles in one call, by username. 1 credit per profile found; inputs that do not exist are\nlisted in `errors` and cost nothing. A banned account is a `not_found` with `reason: banned`, a deleted\none with `reason: nonexistent`. Duplicates are folded, with no regard to case and to a leading `@`.\nResults in input order.\nAlso `GET /v1/users/batch?usernames=tiktok,nba,espn`.\nWhen the balance covers only part of the list, the tail comes back as `no_credits` and is not fetched.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/fresh"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "usernames"
                ],
                "properties": {
                  "usernames": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 100,
                    "items": {
                      "type": "string"
                    },
                    "example": [
                      "tiktok",
                      "nba",
                      "espn"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserBatch"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "Bad list."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "429": {
            "$ref": "#/components/responses/TooMany"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "503": {
            "$ref": "#/components/responses/Upstream"
          }
        }
      }
    },
    "/v1/users/videos/batch": {
      "post": {
        "operationId": "getUsersVideos",
        "tags": [
          "users"
        ],
        "summary": "Latest videos of many accounts, batch",
        "description": "The newest videos of up to 20 accounts in one call, by username or sec_uid: `count` videos for each\naccount (1 to 16, default 3). Pinned videos first, then newest first, as on `/v1/users/{user}/videos`.\n1 credit per video returned. An account with no public videos, or a private one, is an entry with an\nempty `videos` list and costs nothing. An account that could not be read is in `errors` and costs\nnothing. Duplicates are folded. Results in input order.\nThe `next_cursor` of an entry continues that list on `/v1/users/{user}/videos`.\nAlso `GET /v1/users/videos/batch?users=tiktok,nba&count=3`.\nWhen the balance covers only part of the list, the tail comes back as `no_credits` and is not fetched.\nThe limit counts `count` videos for each account.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/fresh"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "users"
                ],
                "properties": {
                  "users": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 20,
                    "items": {
                      "type": "string"
                    },
                    "description": "Usernames or sec_uids.",
                    "example": [
                      "tiktok",
                      "nba"
                    ]
                  },
                  "count": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 16,
                    "default": 3,
                    "description": "Videos for each account."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserVideosBatch"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "Bad list or bad count."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "429": {
            "$ref": "#/components/responses/TooMany"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "503": {
            "$ref": "#/components/responses/Upstream"
          }
        }
      }
    },
    "/v1/users/{user}": {
      "get": {
        "operationId": "getUser",
        "tags": [
          "users"
        ],
        "summary": "Profile by username",
        "description": "1 credit per profile. `user` is a username (with or without `@`) or a sec_uid. The account whose\nusername is `batch` is at `/v1/users/@batch`.\n",
        "parameters": [
          {
            "name": "user",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "tiktok"
          },
          {
            "$ref": "#/components/parameters/fresh"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "Not a username or a sec_uid."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooMany"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "503": {
            "$ref": "#/components/responses/Upstream"
          }
        }
      }
    },
    "/v1/users/{user}/videos": {
      "get": {
        "operationId": "getUserVideos",
        "tags": [
          "users"
        ],
        "summary": "Videos of an account",
        "description": "Pinned videos first, then newest first. 1 credit per video. `user` is a username or a sec_uid; a\nusername is changed to the sec_uid through the profile, free. A private account gives an empty list,\nfree.\n",
        "parameters": [
          {
            "name": "user",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "tiktok"
          },
          {
            "name": "count",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 16,
              "minimum": 1,
              "maximum": 50
            }
          },
          {
            "$ref": "#/components/parameters/cursor"
          },
          {
            "$ref": "#/components/parameters/fresh"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VideoPage"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "Bad count or cursor."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooMany"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "503": {
            "$ref": "#/components/responses/Upstream"
          }
        }
      }
    },
    "/v1/users/{user}/followers": {
      "get": {
        "operationId": "getUserFollowers",
        "tags": [
          "users"
        ],
        "summary": "Followers of an account",
        "description": "The accounts that follow an account, newest first, as TikTok gives them. 1 credit per profile. Each\nentry is a profile with its counts; these counts may be rounded, `/v1/users/{user}` gives the exact\nones. `user` is a username or a sec_uid; a username is changed to the sec_uid through the profile,\nfree. An empty list is free.\nNew on 2026-12-02. Not known yet: how deep TikTok lets a list be read, and what it gives for a\nprivate account.\n",
        "parameters": [
          {
            "name": "user",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "tiktok"
          },
          {
            "name": "count",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 30,
              "minimum": 1,
              "maximum": 50
            }
          },
          {
            "$ref": "#/components/parameters/cursor"
          },
          {
            "$ref": "#/components/parameters/fresh"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserPage"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "Bad count or cursor."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooMany"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "503": {
            "$ref": "#/components/responses/Upstream"
          }
        }
      }
    },
    "/v1/users/{user}/following": {
      "get": {
        "operationId": "getUserFollowing",
        "tags": [
          "users"
        ],
        "summary": "Accounts an account follows",
        "description": "The accounts that an account follows, newest first, as TikTok gives them. 1 credit per profile. Each\nentry is a profile with its counts; these counts may be rounded, `/v1/users/{user}` gives the exact\nones. `user` is a username or a sec_uid; a username is changed to the sec_uid through the profile,\nfree. An empty list is free.\nNew on 2026-12-02. Not known yet: how deep TikTok lets a list be read, and what it gives for a\nprivate account or for an account that hides the accounts it follows.\n",
        "parameters": [
          {
            "name": "user",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "tiktok"
          },
          {
            "name": "count",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 30,
              "minimum": 1,
              "maximum": 50
            }
          },
          {
            "$ref": "#/components/parameters/cursor"
          },
          {
            "$ref": "#/components/parameters/fresh"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserPage"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "Bad count or cursor."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooMany"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "503": {
            "$ref": "#/components/responses/Upstream"
          }
        }
      }
    },
    "/v1/users/{user}/reposts": {
      "get": {
        "operationId": "getUserReposts",
        "tags": [
          "users"
        ],
        "summary": "Reposts of an account",
        "description": "The videos that an account reposted, in the order of TikTok. 1 credit per video. `user` is a username\nor a sec_uid; a username is changed to the sec_uid through the profile, free. A private account, or an\naccount with no repost, gives an empty list, free.\nNew on 2026-12-03; its limits at TikTok are not measured yet.\n",
        "parameters": [
          {
            "name": "user",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "tiktok"
          },
          {
            "name": "count",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 16,
              "minimum": 1,
              "maximum": 50
            }
          },
          {
            "$ref": "#/components/parameters/cursor"
          },
          {
            "$ref": "#/components/parameters/fresh"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VideoPage"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "Bad user",
            "count or cursor.": null
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooMany"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "503": {
            "$ref": "#/components/responses/Upstream"
          }
        }
      }
    },
    "/v1/users/{user}/playlists": {
      "get": {
        "operationId": "getUserPlaylists",
        "tags": [
          "users"
        ],
        "summary": "Playlists of an account",
        "description": "The playlists that an account made, in the order of its profile. 1 credit per playlist. Read the videos\nof a playlist with `/v1/playlists/{id}/videos`. `user` is a username or a sec_uid; a username is changed\nto the sec_uid through the profile, free. An account with no playlist, or a private one, gives an empty\nlist, free.\nNew on 2026-12-03; its limits at TikTok are not measured yet.\n",
        "parameters": [
          {
            "name": "user",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "tiktok"
          },
          {
            "name": "count",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 20,
              "minimum": 1,
              "maximum": 50
            }
          },
          {
            "$ref": "#/components/parameters/cursor"
          },
          {
            "$ref": "#/components/parameters/fresh"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlaylistPage"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "Bad user",
            "count or cursor.": null
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooMany"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "503": {
            "$ref": "#/components/responses/Upstream"
          }
        }
      }
    },
    "/v1/users/{user}/live": {
      "get": {
        "operationId": "getUserLive",
        "tags": [
          "users"
        ],
        "summary": "Live state of an account",
        "description": "Whether an account is live now, with its room when it is. 1 credit, live or not: the answer is a\n`LiveRoom` with `live: false` and no room fields when the account is not live. `user` is a username\nor a sec_uid; a sec_uid is changed to the username through the profile, free. No stream addresses.\nThe answer is cached for 1 minute.\nNew on 2026-12-03; its limits at TikTok are not measured yet.\n",
        "parameters": [
          {
            "name": "user",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "tiktok"
          },
          {
            "$ref": "#/components/parameters/fresh"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LiveRoomResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "Bad user."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooMany"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "503": {
            "$ref": "#/components/responses/Upstream"
          }
        }
      }
    },
    "/v1/videos/batch": {
      "post": {
        "operationId": "getVideos",
        "tags": [
          "videos"
        ],
        "summary": "Videos by id, batch",
        "description": "Up to 100 videos in one call. 1 credit per video found; deleted, private or removed videos are listed in\n`errors` with a `reason` and cost nothing. Results in input order. Also `GET /v1/videos/batch?ids=1,2`.\nWhen the balance covers only part of the list, the tail comes back as `no_credits` and is not fetched.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/fresh"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "ids"
                ],
                "properties": {
                  "ids": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 100,
                    "items": {
                      "type": "string",
                      "pattern": "^[0-9]{1,20}$"
                    },
                    "example": [
                      "7106594312292453675"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VideoBatch"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "Bad list."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "429": {
            "$ref": "#/components/responses/TooMany"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "503": {
            "$ref": "#/components/responses/Upstream"
          }
        }
      }
    },
    "/v1/videos/{id}": {
      "get": {
        "operationId": "getVideo",
        "tags": [
          "videos"
        ],
        "summary": "Video by id",
        "description": "1 credit. The id is the number at the end of the address of the video.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]{1,20}$"
            },
            "example": "7106594312292453675"
          },
          {
            "$ref": "#/components/parameters/fresh"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VideoResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "The id is not a video id."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooMany"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "503": {
            "$ref": "#/components/responses/Upstream"
          }
        }
      }
    },
    "/v1/videos/{id}/related": {
      "get": {
        "operationId": "getRelatedVideos",
        "tags": [
          "videos"
        ],
        "summary": "Related videos",
        "description": "The videos that TikTok shows next to a video (\"You may like\"), in the order of TikTok. 1 credit per\nvideo. One page of at most 16 videos and no next page: there is no `cursor`, and the answer never has\na `next_cursor`.\nNew on 2026-12-03; its limits at TikTok are not measured yet.\n",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]{1,20}$"
            },
            "example": "7708543740230536461"
          },
          {
            "name": "count",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 16,
              "minimum": 1,
              "maximum": 16
            },
            "description": "Videos to return, 1 to 16. A larger number gives 16."
          },
          {
            "$ref": "#/components/parameters/fresh"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VideoPage"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "Bad id or count."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooMany"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "503": {
            "$ref": "#/components/responses/Upstream"
          }
        }
      }
    },
    "/v1/videos/{id}/transcript": {
      "get": {
        "operationId": "getVideoTranscript",
        "tags": [
          "videos"
        ],
        "summary": "Transcript of a video",
        "description": "The transcript of a video, from its subtitles on TikTok (most are made by the speech recognition of\nTikTok): timed segments and the whole text. 1 credit. A video with no subtitles gives\n`404 not_found` with reason `unavailable`, free.\nNew on 2026-12-03; its limits at TikTok are not measured yet.\n",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]{1,20}$"
            },
            "example": "7708543740230536461"
          },
          {
            "name": "lang",
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9-]{2,20}$"
            },
            "example": "eng-US",
            "description": "The language of the transcript, as TikTok names it (`eng-US`) or its first part (`eng`). Default:\nthe first transcript made by speech recognition, else the first one. `languages` in the answer\nlists the languages of the video.\n"
          },
          {
            "$ref": "#/components/parameters/fresh"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TranscriptResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "Bad id or lang."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooMany"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "503": {
            "$ref": "#/components/responses/Upstream"
          }
        }
      }
    },
    "/v1/videos/{id}/comments": {
      "get": {
        "operationId": "getComments",
        "tags": [
          "videos"
        ],
        "summary": "Comments of a video",
        "description": "1 credit per comment, in the order of TikTok (pinned first, then the most relevant). Only the comments\nof the video; their replies are at `/v1/videos/{id}/comments/{comment_id}/replies`. A video with\ncomments turned off gives an empty list, free.\n",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]{1,20}$"
            }
          },
          {
            "name": "count",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 20,
              "minimum": 1,
              "maximum": 50
            }
          },
          {
            "$ref": "#/components/parameters/cursor"
          },
          {
            "$ref": "#/components/parameters/fresh"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CommentPage"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "Bad id, count or cursor."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooMany"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "503": {
            "$ref": "#/components/responses/Upstream"
          }
        }
      }
    },
    "/v1/videos/{id}/comments/{comment_id}/replies": {
      "get": {
        "operationId": "getCommentReplies",
        "tags": [
          "videos"
        ],
        "summary": "Replies to a comment",
        "description": "1 credit per reply, oldest first, as TikTok shows them under the comment.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]{1,20}$"
            },
            "description": "The video id."
          },
          {
            "name": "comment_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]{1,20}$"
            }
          },
          {
            "name": "count",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 20,
              "minimum": 1,
              "maximum": 50
            }
          },
          {
            "$ref": "#/components/parameters/cursor"
          },
          {
            "$ref": "#/components/parameters/fresh"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CommentPage"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "Bad id, count or cursor."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooMany"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "503": {
            "$ref": "#/components/responses/Upstream"
          }
        }
      }
    },
    "/v1/hashtags/{name}": {
      "get": {
        "operationId": "getHashtag",
        "tags": [
          "hashtags"
        ],
        "summary": "Hashtag by name",
        "description": "1 credit. `name` is the hashtag with or without `#`, in any case.",
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "fyp"
          },
          {
            "$ref": "#/components/parameters/fresh"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HashtagResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "Not a hashtag name."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooMany"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "503": {
            "$ref": "#/components/responses/Upstream"
          }
        }
      }
    },
    "/v1/hashtags/{name}/videos": {
      "get": {
        "operationId": "getHashtagVideos",
        "tags": [
          "hashtags"
        ],
        "summary": "Videos of a hashtag",
        "description": "1 credit per video, in the order of TikTok for the hashtag page (popular videos, not newest first).\nThe hashtag is changed to its id through the hashtag lookup, free.\n",
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "fyp"
          },
          {
            "name": "count",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 30,
              "minimum": 1,
              "maximum": 50
            }
          },
          {
            "$ref": "#/components/parameters/cursor"
          },
          {
            "$ref": "#/components/parameters/fresh"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VideoPage"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "Bad count or cursor."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooMany"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "503": {
            "$ref": "#/components/responses/Upstream"
          }
        }
      }
    },
    "/v1/search/videos": {
      "get": {
        "operationId": "searchVideos",
        "tags": [
          "search"
        ],
        "summary": "Search videos",
        "description": "The videos that the general search of TikTok (the \"Top\" tab) finds for a query, in the order of\nTikTok. 1 credit per video. A query with no result gives an empty list, free.\nVideos only: for accounts, use `/v1/search/users`; for sounds, `/v1/search/music`; for live rooms,\n`/v1/search/live`; for hashtags, `/v1/search/hashtags`. None of the filters or the sorting of the\nVideos tab of search (TikTok ignores them for a logged-out visitor).\nNew on 2026-12-02. Not known yet: how many pages of one search TikTok gives.\n",
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            },
            "example": "street food",
            "description": "The words to search for. Trimmed, in Unicode NFC, with one space for each run of white space; then\n1 to 100 characters with no control character, else `400 bad_request`. The case is kept.\n"
          },
          {
            "name": "count",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 12,
              "minimum": 1,
              "maximum": 50
            }
          },
          {
            "$ref": "#/components/parameters/cursor"
          },
          {
            "$ref": "#/components/parameters/fresh"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VideoPage"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "Bad query, count or cursor."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "429": {
            "$ref": "#/components/responses/TooMany"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "503": {
            "$ref": "#/components/responses/Upstream"
          }
        }
      }
    },
    "/v1/search/users": {
      "get": {
        "operationId": "searchUsers",
        "tags": [
          "search"
        ],
        "summary": "Search accounts",
        "description": "The accounts that the account search of TikTok (the \"Users\" tab of search) finds for a query, in the\norder of TikTok. 1 credit per account. A query with no result gives an empty list, free.\nEach entry is a short profile (`UserSummary`), what the account search of TikTok sends:\n`followers` is rounded, and there is no following count, video count or private flag. For the\nfull, exact profile, read `/v1/users/{user}`, or `/v1/users/batch` for up to 100 accounts in one\ncall.\nOne TikTok page has about 10 accounts, so the default `count` is 10. Two reads of one search can\ngive a slightly different list.\nNew on 2026-12-02. Not known yet: how many pages of one search TikTok gives.\n",
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            },
            "example": "cooking",
            "description": "The words to search for. Trimmed, in Unicode NFC, with one space for each run of white space; then\n1 to 100 characters with no control character, else `400 bad_request`. The case is kept.\n"
          },
          {
            "name": "count",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 10,
              "minimum": 1,
              "maximum": 50
            },
            "description": "Accounts on this page, 1 to 50. The default, 10, is the size of one TikTok page of the account\nsearch, so a call with the default is one read of TikTok.\n"
          },
          {
            "$ref": "#/components/parameters/cursor"
          },
          {
            "$ref": "#/components/parameters/fresh"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserSummaryPage"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "Bad query, count or cursor."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "429": {
            "$ref": "#/components/responses/TooMany"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "503": {
            "$ref": "#/components/responses/Upstream"
          }
        }
      }
    },
    "/v1/search/music": {
      "get": {
        "operationId": "searchMusic",
        "tags": [
          "search"
        ],
        "summary": "Search sounds",
        "description": "The sounds that the sound search of TikTok (the \"Sounds\" tab of search) finds for a query, in the\norder of TikTok. 1 credit per sound. A query with no result gives an empty list, free.\nEach entry is a short sound (`MusicSummary`). For the full sound, read `/v1/music/{id}`; for the\nvideos that use it, `/v1/music/{id}/videos`.\nNew on 2026-12-03; its limits at TikTok are not measured yet.\n",
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            },
            "example": "lofi",
            "description": "The words to search for. Trimmed, in Unicode NFC, with one space for each run of white space; then\n1 to 100 characters with no control character, else `400 bad_request`. The case is kept.\n"
          },
          {
            "name": "count",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 12,
              "minimum": 1,
              "maximum": 50
            },
            "description": "Sounds on this page, 1 to 50. The default, 12, is the size of one TikTok page of the sound\nsearch, so a call with the default is one read of TikTok.\n"
          },
          {
            "$ref": "#/components/parameters/cursor"
          },
          {
            "$ref": "#/components/parameters/fresh"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MusicSummaryPage"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "Bad query, count or cursor."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "429": {
            "$ref": "#/components/responses/TooMany"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "503": {
            "$ref": "#/components/responses/Upstream"
          }
        }
      }
    },
    "/v1/search/hashtags": {
      "get": {
        "operationId": "searchHashtags",
        "tags": [
          "search"
        ],
        "summary": "Search hashtags",
        "description": "The hashtags for a query, most used first. TikTok gives a logged-out visitor no hashtag search of its\nown, so this reads about 24 videos of the general search (two TikTok pages, as `/v1/search/videos`)\nand ranks the hashtags of those videos: by the number of those videos that use the hashtag, then by\nthe sum of their plays. The counts are of those videos only, not the totals of TikTok; for those,\nread `/v1/hashtags/{name}`. There is no next page.\n1 credit per hashtag. A query with no result gives an empty list, free. The answer is cached for\n5 minutes, apart from the cache of `/v1/search/videos`.\nNew on 2026-12-03.\n",
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            },
            "example": "street food",
            "description": "The words to search for. Trimmed, in Unicode NFC, with one space for each run of white space; then\n1 to 100 characters with no control character, else `400 bad_request`. The case is kept.\n"
          },
          {
            "name": "count",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 10,
              "minimum": 1,
              "maximum": 30
            },
            "description": "Hashtags to return, 1 to 30. A larger number gives 30. There is no next page."
          },
          {
            "$ref": "#/components/parameters/fresh"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HashtagSummaryPage"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "Bad query or count."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "429": {
            "$ref": "#/components/responses/TooMany"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "503": {
            "$ref": "#/components/responses/Upstream"
          }
        }
      }
    },
    "/v1/search/live": {
      "get": {
        "operationId": "searchLive",
        "tags": [
          "search"
        ],
        "summary": "Search live rooms",
        "description": "The live rooms that the live search of TikTok (the \"LIVE\" tab of search) finds for a query, in the\norder of TikTok. 1 credit per room. A query with no result gives an empty list, free. Live search\noften finds few rooms. No stream addresses. The answer is cached for 1 minute: the number of viewers\nchanges fast.\nNew on 2026-12-03; its limits at TikTok are not measured yet.\n",
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            },
            "example": "cooking",
            "description": "The words to search for. Trimmed, in Unicode NFC, with one space for each run of white space; then\n1 to 100 characters with no control character, else `400 bad_request`. The case is kept.\n"
          },
          {
            "name": "count",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 12,
              "minimum": 1,
              "maximum": 50
            },
            "description": "Rooms on this page, 1 to 50. One TikTok page has at most 12 rooms, often fewer.\n"
          },
          {
            "$ref": "#/components/parameters/cursor"
          },
          {
            "$ref": "#/components/parameters/fresh"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LiveRoomPage"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "Bad query, count or cursor."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "429": {
            "$ref": "#/components/responses/TooMany"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "503": {
            "$ref": "#/components/responses/Upstream"
          }
        }
      }
    },
    "/v1/music/{id}": {
      "get": {
        "operationId": "getMusic",
        "tags": [
          "music"
        ],
        "summary": "Sound by id",
        "description": "1 credit. The id is the number at the end of the address of the sound\n(`https://www.tiktok.com/music/<name>-<id>`), or `music.id` of a video. `videos`, the number of videos\nwith the sound, is rounded by TikTok.\nNew on 2026-12-03; its limits at TikTok are not measured yet.\n",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]{1,25}$"
            },
            "example": "6696419263248336898"
          },
          {
            "$ref": "#/components/parameters/fresh"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MusicResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "The id is not a sound id."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooMany"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "503": {
            "$ref": "#/components/responses/Upstream"
          }
        }
      }
    },
    "/v1/music/{id}/videos": {
      "get": {
        "operationId": "getMusicVideos",
        "tags": [
          "music"
        ],
        "summary": "Videos of a sound",
        "description": "The videos that use a sound, in the order of the sound page of TikTok (popular videos, not newest\nfirst). 1 credit per video. A sound with no public video gives an empty list, free.\nNew on 2026-12-03; its limits at TikTok are not measured yet.\n",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]{1,25}$"
            },
            "example": "6696419263248336898"
          },
          {
            "name": "count",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 30,
              "minimum": 1,
              "maximum": 50
            }
          },
          {
            "$ref": "#/components/parameters/cursor"
          },
          {
            "$ref": "#/components/parameters/fresh"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VideoPage"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "Bad id",
            "count or cursor.": null
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooMany"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "503": {
            "$ref": "#/components/responses/Upstream"
          }
        }
      }
    },
    "/v1/playlists/{id}/videos": {
      "get": {
        "operationId": "getPlaylistVideos",
        "tags": [
          "playlists"
        ],
        "summary": "Videos of a playlist",
        "description": "The videos of a playlist, in the order of the playlist. 1 credit per video. The id is the `id` of an\nentry of `/v1/users/{user}/playlists`, or the number at the end of the address of the playlist. An\nempty playlist gives an empty list, free.\nNew on 2026-12-03; its limits at TikTok are not measured yet.\n",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]{1,25}$"
            },
            "example": "7681171537575824159"
          },
          {
            "name": "count",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 30,
              "minimum": 1,
              "maximum": 50
            }
          },
          {
            "$ref": "#/components/parameters/cursor"
          },
          {
            "$ref": "#/components/parameters/fresh"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VideoPage"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "Bad id",
            "count or cursor.": null
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooMany"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "503": {
            "$ref": "#/components/responses/Upstream"
          }
        }
      }
    },
    "/v1/trending/videos": {
      "get": {
        "operationId": "getTrendingVideos",
        "tags": [
          "videos"
        ],
        "summary": "Trending videos",
        "description": "The videos of the explore feed that TikTok shows a logged-out visitor, in the order of TikTok. 1 credit\nper video. There is no `cursor` and no `next_cursor`: TikTok gives the feed in batches of about 16 with\nno position, so one call reads as many batches as `count` needs and drops repeated videos. The answer is\ncached for 2 minutes; a call after that gives a new set, which can repeat videos of an earlier one.\nNew on 2026-12-03; its limits at TikTok are not measured yet.\n",
        "parameters": [
          {
            "name": "count",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 16,
              "minimum": 1,
              "maximum": 50
            },
            "description": "Videos to return, 1 to 50. A larger number gives 50. A batch can hold 15 videos, so a page can be one or two short."
          },
          {
            "$ref": "#/components/parameters/fresh"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VideoPage"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "Bad count."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "429": {
            "$ref": "#/components/responses/TooMany"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "503": {
            "$ref": "#/components/responses/Upstream"
          }
        }
      }
    }
  }
}
