# Douyin Xingtu connected-user structure API (douyin.xingtu_link_structure)

- Canonical page: https://everyinfra.com/en/douyin-api/xingtu_link_structure
- Endpoint: POST /api/v1/social with {"platform": "douyin", "action": "xingtu_link_structure", "params": {...}}
- Price: $0.016 per call ($16 per 1,000 requests); failed and empty results are not charged
- Returns: single object
- Mode: sync; add "mode": "async" for slow tasks

## Health

- Live health (24h percent, hourly and daily trends): https://api.everyinfra.com/api/v1/social/availability?platform=douyin&action=xingtu_link_structure

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| douyin_id | not declared | yes | not declared | The creator's visible Douyin ID (`unique_id`, from `creator_search`) or the 19-digit Xingtu `creator_id` returned by `xingtu_creator_search`. A creator who is not on Xingtu gives an empty result, which is not charged. |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| creator_id | platform-native meaning |
| link_type | Xingtu's connection type for the creator (xingtu_link_structure), in Chinese as Xingtu gives it, meaning seeding or spread. |
| total_user_count | Total connected users Xingtu counts for the creator (xingtu_link_structure); the four levels add up to it. |
| total_rank_top_percent | Where that total ranks among Xingtu creators (xingtu_link_structure), 0 to 1, smaller is better: 0.0456 means the top 4.56%. |
| levels | Xingtu's four connected-user levels (xingtu_link_structure), numbered 1 to 4 as Xingtu numbers them: [{level, user_count, share of the total (0 to 1), industry_median_user_count (median for creators in the same industry)}]. |
| platform | Source platform identifier, the same as platform in the request (for example xiaohongshu, tiktok). |

## Example

```bash
curl -X POST 'https://api.everyinfra.com/api/v1/social' \
  -H "Authorization: Bearer $EVERYINFRA_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "platform": "douyin",
  "action": "xingtu_link_structure",
  "params": {
    "douyin_id": "XiaoZhenlla"
  }
}'
```

```python
import os
import requests

response = requests.post(
    "https://api.everyinfra.com/api/v1/social",
    headers={"Authorization": f"Bearer {os.environ['EVERYINFRA_API_KEY']}"},
    json={
        "platform": "douyin",
        "action": "xingtu_link_structure",
        "params": {
            "douyin_id": "XiaoZhenlla",
        },
    },
    timeout=120,
)
print(response.status_code)
print(response.json())
```

## Response example

No real sample for these example parameters yet: structure only, every value is a placeholder (…).

```text
{
  "id": "req_…",
  "platform": "douyin",
  "action": "xingtu_link_structure",
  "results": {
    "creator_id": …,
    "link_type": …,
    "total_user_count": …,
    "total_rank_top_percent": …,
    "levels": …,
    "platform": …
  },
  "billing": {
    "charged": …,
    "charged_usd": …,
    "balance_after_usd": …,
    …
  },
  "quota": { … }
}
```

## Also

- Capability catalog (no key): https://api.everyinfra.com/api/v1/social/catalog?platform=douyin
- OpenAPI: https://everyinfra.com/openapi.json · Agents guide: https://everyinfra.com/agents.md
