# Beijing Anjuke — 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.

> Search Beijing real estate listings for second-hand homes and rentals, view detailed property information and price trends, and discover agents and community-specific listings. Get access to the Beijing house price index to track market movements and make informed decisions about property purchases or rentals.

**Category:** Real Estate | **Website:** [beijing.anjuke.com/](https://beijing.anjuke.com/) | **Docs:** [parse.bot/marketplace/40f07665-35f4-43ab-bcbd-e0d96f97357d/beijing-anjuke-com-api](https://parse.bot/marketplace/40f07665-35f4-43ab-bcbd-e0d96f97357d/beijing-anjuke-com-api)

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

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/credits/beijing-anjuke/`
**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 beijing house price index

Retrieve Beijing housing price trend data including current average price per square meter, monthly and yearly change percentages, daily/weekly/monthly price history arrays, and new housing price info. Returns data for the whole Beijing market.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/beijing-anjuke/get-beijing-house-price-index \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### Get second hand listing detail

Get details of a second-hand listing by ID.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `id` | string | Yes | Property listing ID (e.g. S717424612) |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/beijing-anjuke/get-second-hand-listing-detail \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"id":"<string>"}'
```

### Search agents

Search for real estate agents in Beijing. Returns a list of agents with their name, company, specialty tags, and profile URL. Results come from the mobile Anjuke tycoon page.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/beijing-anjuke/search-agents \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### Search listings by community

Search for residential communities by name with autocomplete. Returns matching communities, areas, and subway stations with average price per square meter. Result type field indicates: 1=district area, 2=sub-area, 3=subway station, 4=community.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `query` | string | Yes | Community or area name search keyword in Chinese characters |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/beijing-anjuke/search-listings-by-community \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"query":"<string>"}'
```

### Search rental listings

Search rental property listings in Beijing. Returns up to 60 listings per page with title, specs (rooms/area/floor), community name, address, tags, price, and listing URL. District filter and pagination beyond page 1 may be subject to antibot restrictions.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `district` | string | No | District filter as pinyin path segment (e.g. 'chaoyang', 'haidian', 'changping'). Omit to return listings across all Beijing districts. |
| `page` | integer | No | Page number |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/beijing-anjuke/search-rental-listings \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"district":"<string>","page":"<integer>"}'
```

### Search second hand listings

Search second-hand property listings in Beijing.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `district` | string | No | District filter path segment |
| `page` | integer | No | Page number |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/beijing-anjuke/search-second-hand-listings \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"district":"<string>","page":"<integer>"}'
```

## Next steps

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