# 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:** 629 total users, 49 monthly users, 99.7% runs succeeded, 4 bookmarks
- **User rating**: 4.21 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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## TikTok Live Search Scraper 🎥

Scrape TikTok live streams data based on search keywords. Extract comprehensive information about ongoing live streams including viewer counts, likes, stream URLs, and broadcaster details.

### Features ✨

- 🔍 Search live streams by keywords
- 📊 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 💡

Simply provide:

1. Search keywords for live streams
2. Maximum number of items to scrape (optional)

The actor will automatically:

- Search TikTok for live streams matching your keywords
- Extract comprehensive data about each stream
- Save results in structured format

### 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

### Input Parameters 📝

| Field | Type | Description |
|-------|------|-------------|
| `keywords` | Array | List of keywords to search for live streams |
| `maxItems` | Integer | Maximum number of items to scrape (optional) |

#### Input Example

A full explanation of an input example in JSON.

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

#### 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

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

Maximum number of live streams to scrape

## Actor input object example

```json
{
  "keywords": [
    "gaming"
  ],
  "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 = {};

// 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 = {}

# 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 '{}' |
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/DOd6gJwIcZw4557jR/openapi.json
