# Top Baidu — 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.

> Access real-time trending search data from Baidu's Top platform. Retrieve ranked hot search terms, novels, movies, and TV dramas, with support for genre and category filtering across all board tabs.

**Category:** News & Media | **Website:** [top.baidu.com/](https://top.baidu.com/) | **Docs:** [parse.bot/marketplace/edf60d0d-bac9-4dce-9908-b09a79a50857/top-baidu-com-api](https://parse.bot/marketplace/edf60d0d-bac9-4dce-9908-b09a79a50857/top-baidu-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-top-baidu-com-api-edf60d0d/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_board_by_tab

General-purpose endpoint to retrieve any board tab (realtime, novel, movie, teleplay) with optional tag filtering. Returns ranked items and available filter tags.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `tab` | string | Yes | Board tab name: realtime, novel, movie, teleplay. |
| `tag` | string | No | Optional category/genre filter tag. Available tags are returned in the tags_available field of any board response. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-top-baidu-com-api-edf60d0d/get_board_by_tab \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"tab":"<string>","tag":"<string>"}'
```

### get_homepage_summary

Fetch the main home/board overview page summary with cloud trending topics and top items for all categories (realtime, novel, movie, teleplay). Each card contains a preview of that board's top items. The cloud array contains trending keywords with hotScores.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-top-baidu-com-api-edf60d0d/get_homepage_summary \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_movie_rankings

Fetch the hot movie rankings from the Baidu Top board. Returns ranked movies with scores and available filter tags for genre and region.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-top-baidu-com-api-edf60d0d/get_movie_rankings \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_novel_rankings

Fetch the hot novel rankings from the Baidu Top board. Returns all novels currently ranked with their scores, along with available genre filter tags that can be used with get_novel_rankings_by_genre or get_board_by_tab.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-top-baidu-com-api-edf60d0d/get_novel_rankings \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_novel_rankings_by_genre

Fetch novel rankings filtered by genre type. Returns novels matching the specified genre along with available tags. Equivalent to get_board_by_tab with tab=novel and the genre as tag.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `genre` | string | Yes | Novel genre filter. Available genres can be discovered from the tags_available field of get_novel_rankings. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-top-baidu-com-api-edf60d0d/get_novel_rankings_by_genre \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"genre":"<string>"}'
```

### get_realtime_hot_search

Fetch the real-time hot search rankings from the Baidu Top board. Returns the current top trending search terms with scores and metadata. Items are ordered by descending hot_score. No filtering is available; the full ranked list is returned in a single page.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-top-baidu-com-api-edf60d0d/get_realtime_hot_search \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_search_results_for_keyword

Construct a Baidu search URL for a specific hot search keyword to view related news and discussions. Does not fetch search results; only builds and returns the URL.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `keyword` | string | Yes | The trending keyword to generate a Baidu search URL for. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-top-baidu-com-api-edf60d0d/get_search_results_for_keyword \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"keyword":"<string>"}'
```

### get_tv_drama_rankings

Fetch the hot TV drama rankings from the Baidu Top board. Returns ranked TV dramas with scores and available filter tags for genre and region.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-top-baidu-com-api-edf60d0d/get_tv_drama_rankings \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```
