# 🎵 Douyin Xingtu KOL Scraper (`ethereal_wool/douyin-xingtu-kol-scraper`) Actor

Extract Douyin xingtu kol data — star index, audience, followers, and more. Scrape by keyword, URL or ID. Export to JSON, CSV & Excel, use the API, schedule runs and integrate. No code required.

- **URL**: https://apify.com/ethereal\_wool/douyin-xingtu-kol-scraper.md
- **Developed by:** [Jackie Chen](https://apify.com/ethereal_wool) (community)
- **Categories:** Marketing
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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

## Douyin Xingtu (星图) KOL / Influencer Scraper

![douyin-xingtu-kol-scraper](https://api.apify.com/v2/key-value-stores/48FFrfZnw5XqzUC1C/records/douyin-xingtu-kol-scraper__hero)

Search **Douyin Xingtu (星图)** influencers (KOLs) by keyword and enrich each one with
profile basics, the **Xingtu index** marketing scores, and **fans / audience demographic
portraits** — the data brands use to plan China influencer-marketing campaigns.

> **Unofficial.** Not affiliated with, authorized, or endorsed by Douyin, Xingtu (星图),
> or ByteDance. This is an independent tool that retrieves publicly available data via a
> third-party API. Use it in compliance with Douyin's / Xingtu's terms and applicable law;
> you are responsible for how you use the data.

### What it does

- **Keyword search** (`searchKeywords`) — searches the Xingtu KOL marketplace and pages
  through results (20 KOLs per page) until `maxItems` is reached. Each KOL carries rich
  marketing metrics straight from search: star index, e-commerce score & GMV range, 30-day
  fans growth, interaction rate, median views, suggested CPM price, content theme labels,
  and the creator's top-performing items.
- **sec_user_id lookup** (`userIds`) — resolves a Douyin `sec_user_id` to its Xingtu
  `kolId` and enriches it the same way.
- **Per-KOL enrichment** (each toggle is on by default except audience portrait):
  - **Profile basics** — nickname, follower count, avatar, gender, city/province, tags,
    unique ID, sec_uid, MCN.
  - **Xingtu index** — star / spread / convert / shopping / cooperation / cp scores, each
    with value, rank and rank percentile.
  - **Fans portrait** — top cities, provinces, age bands, gender split, devices, interests.
  - **Audience portrait** (optional) — viewer demographics.

### Input

| Field | Type | Default | Notes |
|---|---|---|---|
| `searchKeywords` | string[] | `["美妆"]` | Keywords to search. Chinese works best. |
| `userIds` | string[] | `[]` | Douyin `sec_user_id` values to resolve + enrich. |
| `maxItems` | integer | `50` | Total KOLs across all inputs. |
| `enrichProfile` | boolean | `true` | Add profile basics (1 API call/KOL). |
| `enrichXingtuIndex` | boolean | `true` | Add Xingtu index scores (1 API call/KOL). |
| `enrichFansPortrait` | boolean | `true` | Add fans demographics (1 API call/KOL). |
| `enrichAudiencePortrait` | boolean | `false` | Add audience demographics (1 API call/KOL). |
| `proxyConfiguration` | object | off | Optional Apify Proxy. |

Example:

```json
{
  "searchKeywords": ["美妆"],
  "maxItems": 5
}
````

### Output

One dataset item per KOL, deduped by `kolId`. Shape (enrichment fields appear when enabled):

```json
{
  "kolId": "6978702114235088932",
  "nickname": "中年美妆博母杨光",
  "follower": 270553,
  "starIndex": 81.25,
  "ecomScore": 82,
  "ecomLevel": "L1",
  "ecomGmv30dRange": "1k-3w",
  "fansIncrement30d": 11158,
  "interactRate30d": 0.054,
  "vvMedian30d": 24386,
  "assignCpmSuggestPrice": 97,
  "gender": "female",
  "city": "杭州市",
  "province": "浙江省",
  "tags": ["时尚"],
  "contentThemeLabels": ["唇妆教程", "护发技巧", "..."],
  "secUid": "MS4wLjABAAAA...",
  "uniqueId": "bomuyg",
  "xingtuIndex": {
    "link_star_index": { "value": 75.6, "rank": 17936, "rankPercent": 0.0087, "avgValue": 56.41 }
  },
  "fansPortrait": [
    { "type": "城市分布", "description": "分布最多的1个城市上海(16%)", "distribution": [ { "key": "上海", "value": 11131 } ] }
  ],
  "topItems": [ { "itemId": "7580711922930502073", "vv": 3228265, "videoTag": 3 } ],
  "url": "https://www.xingtu.cn/ad/creator/author-homepage/abstract/6978702114235088932",
  "source": "search:美妆"
}
```

### How it works

Uses a fast, direct HTTP API (no headless browser, no cookies or login). Calls use a browser
User-Agent (the edge is behind Cloudflare bot-management) and retry on transient 403/429/5xx
responses as well as the occasional "HTTP 200 but please-retry" envelope the Xingtu upstream
emits. The API key is supplied to the Actor as a secret environment variable, managed for you —
you don't need to bring your own.

### Notes & limits

- Search results are capped by the upstream marketplace; very broad keywords still page deep.
- Enrichment costs one extra API call per KOL per enabled portrait/index — turn off the
  ones you don't need to run cheaper and faster.
- `userIds` accepts Douyin `sec_user_id` strings (not numeric UIDs or @handles).

***

### Why this Actor

- **Direct API, no headless browser** — fast, stable runs with nothing to babysit.
- **No login, no cookies** — we never touch your accounts, so there's no ban risk.
- **Fresh, real-time data** — every run reads the source live, not a stale cache.
- **Pay per result** — you're billed only for the rows actually delivered.
- **Structured JSON** — export to CSV, Excel, or JSON, or pull straight from the API / MCP.

### Use cases

- Pull structured content + engagement for analytics dashboards.
- Track a creator's or topic's output and performance over time.
- Build training/research datasets of posts and metadata.
- Power competitor and trend monitoring.

### FAQ

**Do I need an account, cookies, or to log in anywhere?**
No. The Actor talks to a fast, direct HTTP API server-side — you just provide inputs and run it.

**How am I billed?**
Pay-per-result: a fixed price per row returned, with no separate platform/compute charge. Caps like `maxItems` keep spend predictable.

**Can I run it on a schedule or call it from my app?**
Yes — use Apify Schedules, the REST API, the JavaScript / Python clients, or the MCP server. See the **API** tab.

**Is this affiliated with Douyin (抖音)?**
No. It's an independent tool that collects publicly available data. Use it in line with the platform's terms and applicable law.

**How do I get a `sec_user_id` or `aweme_id`?** A `sec_user_id` is the long `MS4wLjAB...` string in a profile share link; an `aweme_id` is the number in `douyin.com/video/<id>`.

### More Douyin (抖音) scrapers by us

- [**Douyin Scraper**](https://apify.com/ethereal_wool/douyin-content-scraper) — Search · profile · comments · 热榜 trending

Browse the full fleet → **https://apify.com/ethereal\_wool**

# Actor input Schema

## `searchKeywords` (type: `array`):

Keywords to search Douyin Xingtu (星图) KOLs for. Each keyword is searched and paginated independently (20 KOLs/page). Chinese keywords return the most results, e.g. 美妆 (beauty), 美食 (food), 健身 (fitness).

## `userIds` (type: `array`):

Optional. Douyin sec\_user\_id values (e.g. MS4wLjABAAAA...) to resolve to a Xingtu kolId and enrich. Use this to look up specific creators rather than searching.

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

Maximum total number of KOLs to scrape across all keywords and user IDs.

## `enrichProfile` (type: `boolean`):

Fetch each KOL's profile basics (nickname, follower count, avatar, gender, city/province, tags) via the Xingtu base-info endpoint. One extra API call per KOL.

## `enrichXingtuIndex` (type: `boolean`):

Fetch each KOL's Xingtu index scores (star / spread / convert / shopping / cooperation / cp), including value, rank and rank percentile. One extra API call per KOL.

## `enrichFansPortrait` (type: `boolean`):

Fetch each KOL's fans demographic distributions (top cities, provinces, age bands, gender, devices, interests). One extra API call per KOL.

## `enrichAudiencePortrait` (type: `boolean`):

Also fetch the audience (viewer) demographic distributions. Off by default; adds one extra API call per KOL.

## `proxyConfiguration` (type: `object`):

Optional. Route the upstream API calls through an Apify Proxy to vary the source IP. Usually not needed.

## Actor input object example

```json
{
  "searchKeywords": [
    "美妆"
  ],
  "userIds": [],
  "maxItems": 50,
  "enrichProfile": true,
  "enrichXingtuIndex": true,
  "enrichFansPortrait": true,
  "enrichAudiencePortrait": false,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# 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 = {
    "searchKeywords": [
        "美妆"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("ethereal_wool/douyin-xingtu-kol-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 = { "searchKeywords": ["美妆"] }

# Run the Actor and wait for it to finish
run = client.actor("ethereal_wool/douyin-xingtu-kol-scraper").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "searchKeywords": [
    "美妆"
  ]
}' |
apify call ethereal_wool/douyin-xingtu-kol-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=ethereal_wool/douyin-xingtu-kol-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "🎵 Douyin Xingtu KOL Scraper",
        "description": "Extract Douyin xingtu kol data — star index, audience, followers, and more. Scrape by keyword, URL or ID. Export to JSON, CSV & Excel, use the API, schedule runs and integrate. No code required.",
        "version": "0.1",
        "x-build-id": "WoIMXbV7dc3rBik0f"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/ethereal_wool~douyin-xingtu-kol-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-ethereal_wool-douyin-xingtu-kol-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/ethereal_wool~douyin-xingtu-kol-scraper/runs": {
            "post": {
                "operationId": "runs-sync-ethereal_wool-douyin-xingtu-kol-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/ethereal_wool~douyin-xingtu-kol-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-ethereal_wool-douyin-xingtu-kol-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "searchKeywords": {
                        "title": "Search keywords",
                        "type": "array",
                        "description": "Keywords to search Douyin Xingtu (星图) KOLs for. Each keyword is searched and paginated independently (20 KOLs/page). Chinese keywords return the most results, e.g. 美妆 (beauty), 美食 (food), 健身 (fitness).",
                        "default": [
                            "美妆"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "userIds": {
                        "title": "Douyin sec_user_id list",
                        "type": "array",
                        "description": "Optional. Douyin sec_user_id values (e.g. MS4wLjABAAAA...) to resolve to a Xingtu kolId and enrich. Use this to look up specific creators rather than searching.",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "maxItems": {
                        "title": "Max KOLs",
                        "minimum": 1,
                        "maximum": 100000,
                        "type": "integer",
                        "description": "Maximum total number of KOLs to scrape across all keywords and user IDs.",
                        "default": 50
                    },
                    "enrichProfile": {
                        "title": "Enrich: profile basics",
                        "type": "boolean",
                        "description": "Fetch each KOL's profile basics (nickname, follower count, avatar, gender, city/province, tags) via the Xingtu base-info endpoint. One extra API call per KOL.",
                        "default": true
                    },
                    "enrichXingtuIndex": {
                        "title": "Enrich: Xingtu index",
                        "type": "boolean",
                        "description": "Fetch each KOL's Xingtu index scores (star / spread / convert / shopping / cooperation / cp), including value, rank and rank percentile. One extra API call per KOL.",
                        "default": true
                    },
                    "enrichFansPortrait": {
                        "title": "Enrich: fans portrait",
                        "type": "boolean",
                        "description": "Fetch each KOL's fans demographic distributions (top cities, provinces, age bands, gender, devices, interests). One extra API call per KOL.",
                        "default": true
                    },
                    "enrichAudiencePortrait": {
                        "title": "Enrich: audience portrait",
                        "type": "boolean",
                        "description": "Also fetch the audience (viewer) demographic distributions. Off by default; adds one extra API call per KOL.",
                        "default": false
                    },
                    "proxyConfiguration": {
                        "title": "Proxy configuration",
                        "type": "object",
                        "description": "Optional. Route the upstream API calls through an Apify Proxy to vary the source IP. Usually not needed.",
                        "default": {
                            "useApifyProxy": false
                        }
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
