# Get TikTok live stream links (HLS and FLV)

**Use case:** 

Find live TikTok music streams and get their playback links in both HLS and FLV, with each room's title, viewers, host and link expiry. Use the links to record or monitor a stream with ffmpeg or VLC. Change the keyword to the streams you want.

## Input

```json
{
  "keywords": [
    "music"
  ],
  "maxRoomsPerKeyword": 10,
  "streamFormats": [
    "hls",
    "flv"
  ]
}
```

## Output

```json
{
  "source": {
    "label": "Found via"
  },
  "keyword": {
    "label": "Keyword"
  },
  "roomId": {
    "label": "Room ID"
  },
  "title": {
    "label": "Stream title"
  },
  "viewers": {
    "label": "Viewers"
  },
  "isLive": {
    "label": "Live"
  },
  "ownerUsername": {
    "label": "@handle"
  },
  "ownerNickname": {
    "label": "Host"
  },
  "recommendedHlsUrl": {
    "label": "HLS (playable)"
  },
  "flvOriginUrl": {
    "label": "FLV original"
  },
  "qualities": {
    "label": "Qualities"
  },
  "expiresAt": {
    "label": "Links expire"
  },
  "note": {
    "label": "Note"
  }
}
```

## How it works

### 1. Sign up on Apify or log in

The TikTok Live Scraper — rooms, viewers, streams Actor is ready to run with the inputs already set for "Get TikTok live stream links (HLS and FLV)". [Sign up or log in](https://console.apify.com/create-task-from-example/aHfL30fwFV4SoNjKm) and you'll land in Apify Console with a copy of this exact task.

### 2. Start the "Get TikTok live stream links (HLS and FLV)" task

The TikTok Live Scraper — rooms, viewers, streams Actor will start running based on the input automatically. You can also change all the input fields, like search live rooms by keyword, rooms per keyword, and more, to match your specific use case.

### 3. Receive the "Get TikTok live stream links (HLS and FLV)" output

Monitor the progress in real time. You will be notified as soon as your dataset is complete and ready for review. Each result includes data such as found via, keyword, room id, and more.

### 4. Integrate into your workflow

The final output is delivered in JSON, CSV, or Excel format, ready to be plugged into your workflow. You can also [run the "Get TikTok live stream links (HLS and FLV)" task via API](https://apify.com/mu0i/tiktok-live-scraper.md).

## FAQ

### How do I record a TikTok live stream?

Pass a link from the TikTok live stream links task to ffmpeg or VLC while the room is still live. The task gives the links; the stream itself comes straight from TikTok to your player.

### Why is the HLS link empty on some rooms?

TikTok offers HLS for only some rooms: about half in the TikTok live stream links task's example run. FLV was present on every room, so request both formats, as this task does.

### How long do the stream links work?

Each row of the TikTok live stream links task has an expiresAt time. The signature lasts about two weeks, but a link stops working as soon as the live room ends.

## About this Actor

This example demonstrates how to use [TikTok Live Scraper — rooms, viewers, streams](https://apify.com/mu0i/tiktok-live-scraper.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/mu0i/tiktok-live-scraper.md) to learn more, explore other use cases, and run it yourself.


## How to integrate an Actor?

This Task's input is already configured above. Use it as-is rather than inventing a new one.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For full API examples (JavaScript, Python, CLI, MCP, OpenAPI), see this Task's Actor page: https://apify.com/mu0i/tiktok-live-scraper.md

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).
