# Toutiao — Wrapped API

> **You are on:** `https://api.beta.paywithlocus.com/api` | [llms.txt](https://beta.paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Browse personalized news feeds, discover trending articles and hot topics, search content across categories, view detailed articles with comments, and explore author profiles on Toutiao. Access video feeds and stay updated with the latest news and trending stories all in one place.

**Category:** News & Media | **Website:** [toutiao.com/](https://toutiao.com/) | **Docs:** [parse.bot/marketplace/bc506a85-5be7-422e-b897-2c6c13e66eff/toutiao-com-api](https://parse.bot/marketplace/bc506a85-5be7-422e-b897-2c6c13e66eff/toutiao-com-api)

Pay-per-use API proxy for Locus Pro. Each call burns credits from your workspace balance.

## Access

**Base URL:** `https://api.beta.paywithlocus.com/api/wrapped/credits/toutiao-web/`
**Auth:** `Authorization: Bearer <LOCUS_CREDITS_SECRET_KEY>` (an `lcr_` secret key or a scoped `lcac_` agent credential)
**Required header:** `Idempotency-Key: <fresh UUID per call>`. A retry with the same key replays the stored result without a new charge.
**Response:** the provider response after any endpoint-specific normalization. `X-Locus-Credits-Charged` carries the charge and `X-Locus-Credits-Balance` the remaining balance. Insufficient credits return `402` before the provider is called.
**Pricing:** estimated costs below are USD. Locus debits the credit equivalent at your workspace rate.

Full call contract: https://docs.paywithlocus.com/api-reference/introduction

> Using a Pay With Locus wallet key (`claw_` prefix)? Wallet routes are documented separately: https://docs.paywithlocus.com/wrapped-apis/for-agents

## Endpoints

### Get article comments

Fetch comments for a specific article. Returns paginated comment data including comment text, user info, and engagement counts.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `article_id` | string | Yes | The article/group ID, a numeric string. Obtainable from get_homepage_feed or get_category_feed results. |
| `count` | integer | No | Number of comments to fetch per request. |
| `offset` | integer | No | Pagination offset for fetching subsequent pages of comments. |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/toutiao-web/get-article-comments \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"article_id":"<string>","count":"<integer>","offset":"<integer>"}'
```

### Get article detail

Fetch the full content of a single article by its article ID. Returns article metadata and full HTML content. Both text articles and video articles are supported; video articles return a different response schema including video playback information.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `article_id` | string | Yes | The article/group ID, a numeric string. Obtainable from get_homepage_feed or get_category_feed results (item_id or group_id field). |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/toutiao-web/get-article-detail \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"article_id":"<string>"}'
```

### Get category feed

Fetch articles for a specific news category/channel on Toutiao. Returns an array of article objects for the specified channel.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `channel` | string | Yes | Channel name for the news category. |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/toutiao-web/get-category-feed \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"channel":"<string>"}'
```

### Get homepage feed

Fetch the main recommended article feed from the Toutiao homepage. Returns an array of article objects with metadata including title, abstract, comment count, and article/group IDs usable for detail and comment endpoints.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/toutiao-web/get-homepage-feed \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### Get hot trending list

Fetch the trending hot list (Toutiao Hot Board). Returns an array of trending topic objects ranked by popularity.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/toutiao-web/get-hot-trending-list \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### Get video feed

Fetch the video-specific feed from Toutiao. Returns video articles with has_video=true flag and video metadata. Internally uses the 'video' channel.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/toutiao-web/get-video-feed \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### Search articles

Search for articles, videos, or users on Toutiao. The type parameter maps to Toutiao's search tabs: 'news' maps to the information/news tab, 'video' to the video tab, 'synthesis' to comprehensive results. Note: video search works best with Chinese-language keywords; English keywords may return empty results for video type.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `keyword` | string | Yes | Search keyword. Chinese keywords yield the most results across all search types. |
| `type` | string | No | Search type: 'news' (information/news tab), 'video' (video tab, best with Chinese keywords), 'synthesis' (comprehensive), 'user' (user search). |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/toutiao-web/search-articles \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"keyword":"<string>","type":"<string>"}'
```

## Next steps

- [All wrapped API providers](https://beta.paywithlocus.com/wapi/index.md): pick another provider.
- [Find and call tools](https://beta.paywithlocus.com/agent/tools.md): price ceilings, async results, and errors.
- [Credits and billing](https://beta.paywithlocus.com/agent/billing.md): what a call costs and how to add credits.
- [Agent docs index](https://beta.paywithlocus.com/agent/index.md): every Locus agent page.