# 58 Housing — 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 housing market data from 58.com (58同城), China's largest classifieds platform. Search house price trends across 31+ major Chinese cities at city, district, and neighborhood levels, and browse hot new property developments with prices, floor plans, and location details.

**Category:** Real Estate | **Website:** [dq.58.com/](https://dq.58.com/) | **Docs:** [parse.bot/marketplace/1f9b54b7-d5bd-4b41-bf0e-87f1e0d0dd88/58-com-housing-api](https://parse.bot/marketplace/1f9b54b7-d5bd-4b41-bf0e-87f1e0d0dd88/58-com-housing-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/58-housing/`
**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

### City list

Get the list of supported cities with their IDs and subdomains. Returns all cities available in the housing data system. Each city entry includes its numeric ID, Chinese name, subdomain prefix (used as the 'city' parameter in other endpoints), and base URL. No parameters required.

**Estimated cost:** Metered

_No parameters required._

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

### Hot new properties

Get hot/recommended new property developments (楼盘) for a city. Returns popular new housing developments with prices, locations, images, and activity/promotion info. Supports filtering by region and business district. Results are curated recommendations from 58.com's algorithm, typically returning 3-10 properties per city.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `city` | string | No | City subdomain prefix (e.g., 'bj', 'sh', 'dq') or city_id number. |
| `region_id` | string | No | Region/district ID to filter by specific area. Numeric string. |
| `shangquan_id` | string | No | Business district (商圈) ID for more specific area filtering. Numeric string. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/58-housing/hot-new-properties \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"city":"<string>","region_id":"<string>","shangquan_id":"<string>"}'
```

### House price trends

Get house price trends for a city or district. Returns current average prices (yuan/sqm) and historical price trends (daily, weekly, monthly) for both second-hand housing and new housing. Supports city-level, district-level, community-level, and business district (shangquan) level data.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `area_id` | string | No | Area/district ID for sub-city level trends. Required when level is 'district', 'community', or 'shangquan'. Numeric string. |
| `city` | string | No | City subdomain prefix (e.g., 'bj' for Beijing, 'sh' for Shanghai, 'dq' for Daqing) or city_id number. Use the city_list endpoint for supported cities. |
| `level` | string | No | Price trend granularity. Accepted values: 'city', 'district', 'community', 'shangquan'. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/58-housing/house-price-trends \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"area_id":"<string>","city":"<string>","level":"<string>"}'
```

### Nearby new developments

Get new property developments near a given community or location. Returns detailed information about nearby developments including prices, floor plans, tags, sale status, contact numbers, and coordinates.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `city` | string | No | City subdomain prefix (e.g., 'bj' for Beijing, 'sh' for Shanghai) or city_id number. |
| `community_id` | string | Yes | Community/xiaoqu ID to search around. Use the house_price_trends or search endpoints to look up community IDs. |
| `lat` | string | No | Latitude coordinate for location-based search |
| `limit` | integer | No | Maximum number of developments to return |
| `lon` | string | No | Longitude coordinate for location-based search |
| `property_id` | string | No | Specific property listing ID for more targeted recommendations |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/58-housing/nearby-new-developments \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"city":"<string>","community_id":"<string>","lat":"<string>","limit":"<integer>","lon":"<string>","property_id":"<string>"}'
```

## 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.