# WeChat Search API

> Search WeChat with one endpoint: official account articles, accounts, Channels videos, live streams, news and more. Filter by vertical, sort and publish time, with cursor pagination.

Source: https://www.sandbase.ai/model/wechat-search/v2/search
API reference: https://www.sandbase.ai/model/wechat-search/v2/search/docs

## Facts

- Provider: WeChat Search
- Type: Data API
- Endpoint: `POST https://api.sandbase.ai/v1/api/wechat-search/v2/search`
- Price: $0.01 per call
- Free allowance: 100 calls per organization per UTC day, shared across eligible APIs
- Capabilities: api, wechat search
- Billing: pay per use from one SandBase balance; no provider account or subscription needed

## Call it

`POST https://api.sandbase.ai/v1/api/wechat-search/v2/search` with `Authorization: Bearer $SANDBASE_API_KEY` and the parameters as a JSON body.

| Parameter | Type | Required | Allowed values |
| --- | --- | --- | --- |
| `keyword` | string | yes |  |
| `business_type` | string | no | all, account, article, video, live_stream, moments, news, book, listen, image, encyclopedia, weixin_index |
| `cursor` | any | no |  |
| `offset` | integer | no |  |
| `publish_time` | any | no |  |
| `raw` | boolean | no |  |
| `sort` | any | no |  |

## FAQ

### How do I use the WeChat Search API?

Send a POST request to https://api.sandbase.ai/v1/api/wechat-search/v2/search with your SandBase API key in the Authorization header (Bearer) and the parameters as a JSON body. You can also try it in the Playground on this page without writing code.

### How much does the WeChat Search API cost?

$0.01 per call. Every organization gets 100 free calls per UTC day, shared across eligible SandBase APIs including this one; after that each call is billed at this price from your SandBase balance. There is no subscription.

### What parameters does the WeChat Search API accept?

Required: keyword (string). Optional: business_type (one of all, account, article, video, live_stream, moments, news, book, listen, image, encyclopedia, weixin_index), cursor (any), offset (integer), publish_time (any), raw (boolean) and sort (any). The Parameters table and the Playground on this page list every field.

### What does the WeChat Search API return?

A JSON response returned in the same HTTP request (synchronous). The README on this page includes a sample response.

### Do I need a WeChat Search developer account or API key?

No. WeChat Search runs through SandBase, so one SandBase API key covers this endpoint and every other API and model in the catalog. You do not need to apply for WeChat Search API access separately.

## README

### WeChat Search API

Run a WeChat universal search for a keyword. Choose the vertical with `business_type` (articles, accounts, videos, live streams, news, and more) and get titles, sources, timestamps and links.

#### Use cases

- Find WeChat official account articles about a topic or brand.
- Discover official accounts and Channels creators in a niche.
- Monitor new WeChat coverage with `sort=latest` and `publish_time`.

#### Request

```bash
curl -X POST "https://api.sandbase.ai/v1/api/wechat-search/v2/search" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"keyword": "OpenAI", "business_type": "article", "raw": false}'
```

#### Parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `keyword` | string | Yes | Search keyword (1-100 chars) |
| `raw` | boolean | No | Optional, default True. |
| `sort` | string | No | Optional, default `default`. |
| `cursor` | string | No | Optional. |
| `offset` | integer | No | Optional, default 0 (>=0). |
| `publish_time` | string | No | Optional, default `all`. |
| `business_type` | string | No | Optional, default `all`. |

#### Example response

Real response for the request above, trimmed to the main fields. User names and long IDs are masked.

```json
{
  "keyword": "OpenAI",
  "business_type": 2,
  "count": 38,
  "total": 315,
  "continue_flag": 1,
  "cursor": "<next page cursor>",
  "items": [
    {
      "title": "OpenAI「疯狂28天」首日，这都发了些啥啊…",
      "source": {
        "dateTime": "4小时前",
        "title": "量子位"
      },
      "timestamp": 1791260267,
      "doc_url": "http://mp.weixin.qq.com/s?__biz=MzIzNjc1NzUzMw==&mid=2247931194&idx=1…"
    }
  ]
}
```

#### Notes

- Paginate with `cursor`: pass back the `cursor` from the previous response with the same keyword and filters.
- Set `raw` to `false` for a simplified response.

#### Related APIs

- [WeChat Search for Channels Videos](/model/wechat-search/v2/search-videos): Search WeChat Channels videos specifically (`video` vertical), with the result page's "duration" filter, "relevance/newest/most-liked" sort, and "time" dropdow…
