# 12321 — 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 anti-fraud information, complaint notices, and safety warnings from China's 12321 telecom complaint platform to check SMS and phone complaints, view fraud alerts, and monitor complaint status. Stay informed with official news, reports, and statistics about telecommunications fraud and consumer complaints.

**Category:** Government & Public Data | **Website:** [12321.cn/](https://12321.cn/) | **Docs:** [parse.bot/marketplace/5af9d87f-d6b5-40b5-b5ea-3fcf4ddf5d1a/12321-cn-api](https://parse.bot/marketplace/5af9d87f-d6b5-40b5-b5ea-3fcf4ddf5d1a/12321-cn-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-12321-cn-api-5af9d87f/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_captcha

Retrieve a captcha image for complaint search. Returns a base64-encoded PNG image. Must be called before search_phone_complaint or search_sms_complaint to establish a session with valid captcha state.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-12321-cn-api-5af9d87f/get_captcha \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_complaint_notice_sms

Retrieve the pre-complaint agreement text for SMS complaints. Returns the full agreement/notice content users must accept before filing SMS complaints.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-12321-cn-api-5af9d87f/get_complaint_notice_sms \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_homepage_stats

Retrieve homepage statistics including today's complaint count and the latest warning entries displayed on the homepage. The complaint count updates daily; warnings include the 5 most recent entries.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-12321-cn-api-5af9d87f/get_homepage_stats \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_news

Retrieve the list of news/information articles. Returns paginated results with article titles and IDs.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `page` | integer | No | Page number for pagination. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-12321-cn-api-5af9d87f/get_news \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"page":"<integer>"}'
```

### get_notice_detail

Retrieve the full text of a specific notice by ID. Returns the notice title, publish date, and full content. IDs are obtained from get_notices results.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `id` | string | Yes | Notice ID obtained from get_notices results. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-12321-cn-api-5af9d87f/get_notice_detail \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"id":"<string>"}'
```

### get_notices

Retrieve the list of official announcements/notices. Returns paginated results with notice titles, dates, and IDs. The site has approximately 2 pages of notices total.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `page` | integer | No | Page number for pagination. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-12321-cn-api-5af9d87f/get_notices \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"page":"<integer>"}'
```

### get_reports

Retrieve the list of downloadable report documents. Returns all reports with titles, dates, and download URLs. Single page, no pagination needed.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-12321-cn-api-5af9d87f/get_reports \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_warning_detail

Retrieve the full text of a specific warning article by ID. Returns the title, source, update time, and full content. Some articles are image-based and may return empty content.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `id` | string | Yes | Warning article ID obtained from get_warnings results. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-12321-cn-api-5af9d87f/get_warning_detail \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"id":"<string>"}'
```

### get_warnings

Retrieve the list of anti-fraud/spam warning articles. Returns paginated results with warning titles and IDs. Approximately 30 items per page.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `page` | integer | No | Page number for pagination. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-12321-cn-api-5af9d87f/get_warnings \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"page":"<integer>"}'
```

### search_phone_complaint

Query the complaint handling status for a phone number (phone call complaints). Requires a valid CAPTCHA code obtained by solving the image from get_captcha. Returns complaint records if found, or stale_input error for invalid captcha. Results cover the last 90 days.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `code` | string | Yes | Captcha code solved from the image returned by get_captcha. |
| `encryption_key` | string | Yes | Encryption key from login response |
| `phone` | string | Yes | Phone number to search for complaint records. |
| `session_id` | string | Yes | Session ID from login response |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-12321-cn-api-5af9d87f/search_phone_complaint \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"code":"<string>","encryption_key":"<string>","phone":"<string>","session_id":"<string>"}'
```

### search_sms_complaint

Query the complaint handling status for an SMS complaint. Requires a valid CAPTCHA code obtained by solving the image from get_captcha. Returns complaint records if found, or stale_input error for invalid captcha. Results cover the last 90 days.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `code` | string | Yes | Captcha code solved from the image returned by get_captcha. |
| `encryption_key` | string | Yes | Encryption key from login response |
| `phone` | string | Yes | Phone number to search for SMS complaint records. |
| `session_id` | string | Yes | Session ID from login response |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-12321-cn-api-5af9d87f/search_sms_complaint \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"code":"<string>","encryption_key":"<string>","phone":"<string>","session_id":"<string>"}'
```
