# Toutiao — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://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. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-toutiao-com-api-bc506a85/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## 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.paywithlocus.com/api/wrapped/parse-toutiao-com-api-bc506a85/get_article_comments \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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.paywithlocus.com/api/wrapped/parse-toutiao-com-api-bc506a85/get_article_detail \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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.paywithlocus.com/api/wrapped/parse-toutiao-com-api-bc506a85/get_category_feed \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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.paywithlocus.com/api/wrapped/parse-toutiao-com-api-bc506a85/get_homepage_feed \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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.paywithlocus.com/api/wrapped/parse-toutiao-com-api-bc506a85/get_hot_trending_list \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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.paywithlocus.com/api/wrapped/parse-toutiao-com-api-bc506a85/get_video_feed \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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.paywithlocus.com/api/wrapped/parse-toutiao-com-api-bc506a85/search_articles \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"keyword":"<string>","type":"<string>"}'
```
