# TikTok LIVE Scraper (`easyapi/tiktok-live-scraper`) Actor

Extract real-time data from TikTok live streams based on search keywords. Get comprehensive information including viewer counts, stream URLs, and broadcaster details. Perfect for market research, content analysis, and monitoring live streaming trends. 🎥

- **URL**: https://apify.com/easyapi/tiktok-live-scraper.md
- **Developed by:** [EasyApi](https://apify.com/easyapi) (community)
- **Categories:** Social media
- **Stats:** 685 total users, 35 monthly users, 99.6% runs succeeded, 4 bookmarks
- **User rating**: 4.85 out of 5 stars

## Pricing

from $4.99 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

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 examples already wired to this Actor's own input schema, see the [API](#api) section below.

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`).

# README

## TikTok Live Search Scraper 🎥

Scrape TikTok live streams by search keywords or live categories. Extract comprehensive information about ongoing live streams including viewer counts, likes, stream URLs, and broadcaster details.

### Features ✨

- 🔍 Search live streams by keywords
- 📂 Scrape all live streams from a category page (e.g. `tiktok.com/live/category/lifestyle`)
- 📊 Get detailed stream statistics (viewers, likes)
- 👤 Extract broadcaster information
- 🔗 Obtain stream URLs in multiple qualities
- 🎯 Configurable maximum items to scrape
- 🚀 Fast and efficient scraping
- 🛡️ Built-in anti-detection mechanisms

### Usage 💡

Provide either:

1. Search keywords for live streams, **or**
2. Live category slugs / full category URLs\
   Plus optionally:
3. Maximum number of items to scrape

The actor will automatically:

- Search TikTok for live streams matching your keywords, **or** open each category page and collect listed lives
- Extract comprehensive data about each stream
- Save results in structured format

**Mode rules:**

- If `keywords` is non-empty → keyword search mode (categories are ignored)
- Else if `categories` is non-empty → category mode
- Provide at least one of `keywords` or `categories`

### Output 📦

For each live stream, you'll get detailed information including:

- Stream ID and status
- Viewer count and like count
- Stream URLs (multiple quality options)
- Broadcaster details (nickname, avatar, follower count)
- Stream start time
- Cover images
- Source tag: `keyword` (keyword mode) or `category` (category mode)

### Input Parameters 📝

| Field | Type | Description |
|-------|------|-------------|
| `keywords` | Array | List of keywords to search for live streams. Takes priority if both `keywords` and `categories` are set. |
| `categories` | Array | Live category slugs or full URLs, e.g. `lifestyle` or `https://www.tiktok.com/live/category/lifestyle`. Used when `keywords` is empty. |
| `maxItems` | Integer | Maximum number of items to scrape per keyword or category (optional) |

#### Input Example

**Keyword search:**

```
{
    "keywords": [
        "ronaldo"
    ],
    "maxItems": 20
}
```

**Category scrape:**

```
{
    "categories": [
        "lifestyle",
        "https://www.tiktok.com/live/category/gaming"
    ],
    "maxItems": 30
}
```

#### Output sample

The results will be wrapped into a dataset which you can always find in the **Storage** tab. Here's an excerpt from the data you'd get if you apply the input parameters above:

And here is the same data but in JSON. You can choose in which format to download your data: JSON, JSONL, Excel spreadsheet, HTML table, CSV, or XML.

```
[
	{
		"id": 7431210864149057000,
		"id_str": "7431210864149056262",
		"status": 2,
		"owner_user_id": 6803805279089001000,
		"user_count": 6,
		"client_version": 360900,
		"cover": {
			"url_list": [
				"https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0068/d0e44db2e9a3f3470327cfb88a901a84~c5_720x720.webp?lk3s=a5d48078&nonce=14452&refresh_token=fdbd38532f09fec833692bd94b9568f7&x-expires=1730386800&x-signature=V3akHDdKjpEsxek%2FtUNOhyAQEoY%3D&shp=a5d48078&shcp=fdd36af4",
				"https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0068/d0e44db2e9a3f3470327cfb88a901a84~c5_720x720.jpeg?lk3s=a5d48078&nonce=73839&refresh_token=9c5d50f6156cb16ea0156b6ad012c34c&x-expires=1730386800&x-signature=bg5zH7xer%2F7ApRfdoxqXJYnBuR8%3D&shp=a5d48078&shcp=fdd36af4"
			],
			"uri": "720x720/tos-maliva-avt-0068/d0e44db2e9a3f3470327cfb88a901a84"
		},
		"stream_url": {
			"rtmp_pull_url": "https://pull-w5-va01.tiktokcdn-us.com/stage/stream-2998416432169484338_or4.flv?expire=1731424642&sign=dcac127678c80e62b0914a532e47cb9d",
			"flv_pull_url": {
				"FULL_HD1": "https://pull-w5-va01.tiktokcdn-us.com/stage/stream-2998416432169484338_uhd.flv?expire=1731424642&sign=a4fc7361aef6acf921d550bfd94248de",
				"HD1": "https://pull-w5-va01.tiktokcdn-us.com/stage/stream-2998416432169484338_hd.flv?expire=1731424642&sign=c64f09308148cde6eff4d70735658ede",
				"SD1": "https://pull-w5-va01.tiktokcdn-us.com/stage/stream-2998416432169484338_ld.flv?expire=1731424642&sign=fb728197a7ed8f96b2760293964a248f",
				"SD2": "https://pull-w5-va01.tiktokcdn-us.com/stage/stream-2998416432169484338_sd.flv?expire=1731424642&sign=54943e606cc12df524572b9597c7a47f"
			},
			"candidate_resolution": [
				"SD1",
				"SD2",
				"HD1",
				"FULL_HD1"
			],
			"flv_pull_url_params": {
				"FULL_HD1": "{\"VCodec\":\"h264\"}",
				"HD1": "{\"VCodec\":\"h264\"}",
				"SD1": "{\"VCodec\":\"h264\"}",
				"SD2": "{\"VCodec\":\"h264\"}"
			},
			"live_core_sdk_data": {
				"pull_data": {
					"stream_data": "{\"common\":{\"session_id\":\"052-20241029151721CAB4FC610076060BD8D4\",\"rule_ids\":\"{\\\"ab_version_trace\\\":null,\\\"sched\\\":\\\"{\\\\\\\"ids\\\\\\\":[\\\\\\\"ex_39349(Weight:100)\\\\\\\"],\\\\\\\"result\\\\\\\":{\\\\\\\"hit\\\\\\\":\\\\\\\"exclusive\\\\\\\",\\\\\\\"cdn\\\\\\\":1889}}\\\"}\",\"peer_anchor_level\":2},\"data\":{\"uhd\":{\"main\":{\"flv\":\"https://pull-w5-va01.tiktokcdn-us.com/stage/stream-2998416432169484338_uhd.flv?expire=1731424642\\u0026sign=a4fc7361aef6acf921d550bfd94248de\",\"hls\":\"\",\"cmaf\":\"\",\"dash\":\"\",\"lls\":\"\",\"tsl\":\"\",\"tile\":\"\",\"sdk_params\":\"{\\\"vbitrate\\\":1000000,\\\"VCodec\\\":\\\"h264\\\",\\\"resolution\\\":\\\"720x1280\\\",\\\"gop\\\":0,\\\"stream_suffix\\\":\\\"uhd\\\"}\"}},\"ao\":{\"main\":{\"flv\":\"https://pull-w5-va01.tiktokcdn-us.com/stage/stream-2998416432169484338.flv?expire=1731424642\\u0026sign=2c697db6161527420ec51998551ffe43\\u0026only_audio=1\",\"hls\":\"\",\"cmaf\":\"\",\"dash\":\"\",\"lls\":\"\",\"tsl\":\"\",\"tile\":\"\",\"sdk_params\":\"{\\\"VCodec\\\":\\\"h264\\\",\\\"vbitrate\\\":0,\\\"resolution\\\":\\\"\\\",\\\"gop\\\":4}\"}},\"origin\":{\"main\":{\"flv\":\"https://pull-w5-va01.tiktokcdn-us.com/stage/stream-2998416432169484338_or4.flv?expire=1731424642\\u0026sign=dcac127678c80e62b0914a532e47cb9d\",\"hls\":\"\",\"cmaf\":\"\",\"dash\":\"\",\"lls\":\"\",\"tsl\":\"\",\"tile\":\"\",\"sdk_params\":\"{\\\"gop\\\":4,\\\"stream_suffix\\\":\\\"or4\\\",\\\"VCodec\\\":\\\"h264\\\",\\\"vbitrate\\\":1000000,\\\"resolution\\\":\\\"720x1280\\\"}\"}},\"sd\":{\"main\":{\"flv\":\"https://pull-w5-va01.tiktokcdn-us.com/stage/stream-2998416432169484338_sd.flv?expire=1731424642\\u0026sign=54943e606cc12df524572b9597c7a47f\",\"hls\":\"\",\"cmaf\":\"\",\"dash\":\"\",\"lls\":\"\",\"tsl\":\"\",\"tile\":\"\",\"sdk_params\":\"{\\\"vbitrate\\\":800000,\\\"resolution\\\":\\\"480x853\\\",\\\"gop\\\":0,\\\"stream_suffix\\\":\\\"sd\\\",\\\"VCodec\\\":\\\"h264\\\"}\"}},\"ld\":{\"main\":{\"flv\":\"https://pull-w5-va01.tiktokcdn-us.com/stage/stream-2998416432169484338_ld.flv?expire=1731424642\\u0026sign=fb728197a7ed8f96b2760293964a248f\",\"hls\":\"\",\"cmaf\":\"\",\"dash\":\"\",\"lls\":\"\",\"tsl\":\"\",\"tile\":\"\",\"sdk_params\":\"{\\\"v_rtbitrate_timestamp\\\":1730215026129,\\\"stream_suffix\\\":\\\"ld\\\",\\\"VCodec\\\":\\\"h264\\\",\\\"vbitrate\\\":500000,\\\"resolution\\\":\\\"480x853\\\",\\\"gop\\\":0,\\\"v_rtbitrate\\\":549625.7930000001,\\\"v_rtpsnr\\\":0}\"}},\"hd\":{\"main\":{\"flv\":\"https://pull-w5-va01.tiktokcdn-us.com/stage/stream-2998416432169484338_hd.flv?expire=1731424642\\u0026sign=c64f09308148cde6eff4d70735658ede\",\"hls\":\"\",\"cmaf\":\"\",\"dash\":\"\",\"lls\":\"\",\"tsl\":\"\",\"tile\":\"\",\"sdk_params\":\"{\\\"VCodec\\\":\\\"h264\\\",\\\"resolution\\\":\\\"540x960\\\",\\\"gop\\\":0,\\\"stream_suffix\\\":\\\"hd\\\",\\\"vbitrate\\\":1000000}\"}}}}",
					"options": {
						"default_quality": {
							"name": "Original",
							"sdk_key": "origin"
						}
					}
				}
			}
		},
		"stats": {
			"total_user": 312
		},
		"owner": {
			"id": 6803805279089001000,
			"nickname": "NALDI",
			"avatar_thumb": {
				"url_list": [
					"https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0068/d0e44db2e9a3f3470327cfb88a901a84~c5_100x100.webp?lk3s=a5d48078&nonce=55267&refresh_token=daa83aeb5c774ccd769906f8acc4c2be&x-expires=1730386800&x-signature=GDK9uLJ3aLGqRaCmo595JEUOU4g%3D&shp=a5d48078&shcp=fdd36af4",
					"https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0068/d0e44db2e9a3f3470327cfb88a901a84~c5_100x100.jpeg?lk3s=a5d48078&nonce=10730&refresh_token=585388295813b4d64691d3649a6485a2&x-expires=1730386800&x-signature=LdCsIsqUPU0w8oGitbO8T0QP0xk%3D&shp=a5d48078&shcp=fdd36af4"
				],
				"uri": "100x100/tos-maliva-avt-0068/d0e44db2e9a3f3470327cfb88a901a84"
			},
			"avatar_medium": {
				"url_list": [
					"https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0068/d0e44db2e9a3f3470327cfb88a901a84~c5_720x720.webp?lk3s=a5d48078&nonce=14452&refresh_token=fdbd38532f09fec833692bd94b9568f7&x-expires=1730386800&x-signature=V3akHDdKjpEsxek%2FtUNOhyAQEoY%3D&shp=a5d48078&shcp=fdd36af4",
					"https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0068/d0e44db2e9a3f3470327cfb88a901a84~c5_720x720.jpeg?lk3s=a5d48078&nonce=73839&refresh_token=9c5d50f6156cb16ea0156b6ad012c34c&x-expires=1730386800&x-signature=bg5zH7xer%2F7ApRfdoxqXJYnBuR8%3D&shp=a5d48078&shcp=fdd36af4"
				],
				"uri": "720x720/tos-maliva-avt-0068/d0e44db2e9a3f3470327cfb88a901a84"
			},
			"avatar_large": {
				"url_list": [
					"https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0068/d0e44db2e9a3f3470327cfb88a901a84~c5_1080x1080.webp?lk3s=a5d48078&nonce=18039&refresh_token=bd8f1bfe5fadd04872034fed26ef53ae&x-expires=1730386800&x-signature=T%2FkW9namH4OaniIqExT%2Bws7pWwk%3D&shp=a5d48078&shcp=fdd36af4",
					"https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0068/d0e44db2e9a3f3470327cfb88a901a84~c5_1080x1080.jpeg?lk3s=a5d48078&nonce=65230&refresh_token=ddc0cf7d649c0e0a85e92b595bcfb657&x-expires=1730386800&x-signature=UHhw7oqXigrjddQqEvLR1E9atDw%3D&shp=a5d48078&shcp=fdd36af4"
				],
				"uri": "1080x1080/tos-maliva-avt-0068/d0e44db2e9a3f3470327cfb88a901a84"
			},
			"status": 1,
			"modify_time": 1729661258,
			"follow_info": {
				"following_count": 36,
				"follower_count": 4222
			},
			"pay_grade": {},
			"user_attr": {},
			"own_room": {
				"room_ids": [
					7431210864149057000
				],
				"room_ids_str": [
					"7431210864149056262"
				]
			},
			"display_id": "ronaldo_1998_",
			"sec_uid": "MS4wLjABAAAAs9051R7zCunFsWfYhbkYTc1cz4p2RMDv2L8ioPTzEH8qrdvhpwMsvt1O9c8Mr2Ml",
			"mint_type_label": [
				7160893592603462000
			],
			"id_str": "6803805279089001478"
		},
		"start_time": 1730213627,
		"like_count": 619,
		"stream_url_filtered_info": {},
		"cover_type": 1,
		"sub_tag": 1
	},
    ...
]
```

# Actor input Schema

## `keywords` (type: `array`):

List of keywords to search for TikTok live streams. If both keywords and categories are provided, keywords take priority and categories are ignored.

## `categories` (type: `array`):

TikTok live category slugs or full category URLs, e.g. lifestyle or https://www.tiktok.com/live/category/lifestyle. Used when keywords are empty.

## `maxItems` (type: `integer`):

Maximum number of live streams to scrape per keyword or category

## Actor input object example

```json
{
  "keywords": [
    "gaming"
  ],
  "categories": [],
  "maxItems": 30
}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "keywords": [
        "gaming"
    ],
    "maxItems": 30
};

// Run the Actor and wait for it to finish
const run = await client.actor("easyapi/tiktok-live-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "keywords": ["gaming"],
    "maxItems": 30,
}

# Run the Actor and wait for it to finish
run = client.actor("easyapi/tiktok-live-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "keywords": [
    "gaming"
  ],
  "maxItems": 30
}' |
apify call easyapi/tiktok-live-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,easyapi/tiktok-live-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/KqBopPRnUtrXwiTQa/builds/eMIZ8hNRco2IDg4pG/openapi.json
