tik-down
API
POST

/tiktok

Streams video metadata from a TikTok profile as NDJSON.

Request Body

urequiredUsername, @username, or full profile URL
tt_session_idoptionalTikTok sessionid cookie value. Recommended to avoid captchas or rate limits.
limitoptionalMax videos to return (Recommended max: 50)

Example Request

POST /tiktok
Content-Type: application/json

{
  "u": "charlidamelio",
  "limit": 20
}

Consuming the Stream

const res = await fetch('/tiktok', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({ u: 'username', limit: 20 })
});

const reader = res.body.getReader();
const decoder = new TextDecoder();
let buf = '';

while (true) {
  const { done, value } = await reader.read();
  if (done) break;
  buf += decoder.decode(value, { stream: true });
  const lines = buf.split('\n');
  buf = lines.pop();
  for (const line of lines) {
    if (line) console.log(JSON.parse(line));
  }
}
POST

/tiktok/download

Fetches full metadata and download URLs for a single TikTok video.

Example Request

POST /tiktok/download
Content-Type: application/json

{
  "u": "https://www.tiktok.com/@user/video/123456789"
}