58 APIdq.58.com ↗
Access house price trends and new property developments across 31+ Chinese cities via the 58.com Housing API. City, district, and community-level data.
What is the 58 API?
The 58.com Housing API exposes housing market data from 58同城, China's largest classifieds platform, across 4 endpoints covering city listings, price trends, and new property developments. The house_price_trends endpoint returns average prices in yuan per square meter with daily, weekly, and monthly historical series for both new and second-hand housing, queryable down to the community or business-district level across 31+ major Chinese cities.
curl -X GET 'https://api.parse.bot/scraper/dcf3cd6f-9e97-4bb0-8055-fbb97a13ff10/house_price_trends?city=bj&level=city' \ -H 'X-API-Key: $PARSE_API_KEY'
Typed, relational, agent-ready
A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.
- Fully typed · autocompletes
- Objects link to objects
- Typed errors & pagination
Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:
uv add parse-sdk uv run parse init uv run parse add --marketplace 58-com-housing-api
uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.
"""Walkthrough: 58.com Housing API — bounded, re-runnable; every call capped."""
from parse_apis.housing_58 import Housing58, City_, TrendLevel, CityNotFound
client = Housing58()
# List all supported cities (capped to 5 for demo)
for city in client.cities.list(limit=5):
print(city.city_name, city.subdomain, city.city_id)
# Construct a city and fetch price trends at city level
beijing = client.city("bj")
trends = beijing.price_trends(level=TrendLevel.CITY)
print(trends.city_name, trends.second_hand_price.avg_price_per_sqm, trends.second_hand_price.month_change_pct)
# Browse monthly price history from the trend data
for entry in trends.price_trends.monthly[:3]:
print(entry.date, entry.price)
# Get hot new property developments in Shanghai
shanghai = client.city("sh")
for prop in shanghai.hot_properties(limit=3):
print(prop.name, prop.region, prop.price, prop.price_unit, prop.follow_count)
# Typed error handling: catch invalid city
try:
bad = client.city("zzz")
bad.price_trends(level=TrendLevel.DISTRICT)
except CityNotFound as exc:
print(f"city not found: {exc}")
print("exercised: cities.list / city.price_trends / city.hot_properties / CityNotFound")
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.
| Param | Type | Description |
|---|---|---|
| city | string | 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 | Price trend granularity. Accepted values: 'city', 'district', 'community', 'shangquan'. |
| area_id | string | Area/district ID for sub-city level trends. Required when level is 'district', 'community', or 'shangquan'. Numeric string. |
{
"type": "object",
"fields": {
"level": "string — granularity level used for the query",
"city_id": "integer — numeric city identifier",
"location": "object with lat and lng string coordinates",
"city_name": "string — Chinese city name",
"market_url": "string — URL to the full market page",
"price_trends": "object with daily, weekly, monthly arrays of {date, price} entries",
"new_housing_price": "object with month, avg_price_per_sqm, month_change_pct, year_change_pct, description",
"second_hand_price": "object with month, avg_price_per_sqm, month_change_pct, year_change_pct"
},
"sample": {
"data": {
"level": "city",
"city_id": 1,
"location": {
"lat": "39.911321",
"lng": "116.414814"
},
"city_name": "北京",
"market_url": "https://bj.58.com/fangjia/",
"price_trends": {
"daily": [
{
"date": "06-09",
"price": "37100"
}
],
"weekly": [
{
"date": "06-11",
"price": "37101"
}
],
"monthly": [
{
"date": "26-06",
"price": "37100"
}
]
},
"new_housing_price": {
"month": "5",
"description": "5月成交均价",
"year_change_pct": "2.83",
"month_change_pct": "0",
"avg_price_per_sqm": "50356"
},
"second_hand_price": {
"month": "6",
"year_change_pct": "-12.94",
"month_change_pct": "-0.91",
"avg_price_per_sqm": "37100"
}
},
"status": "success"
}
}About the 58 API
What the API Covers
The API surfaces housing market data from 58.com (58同城) across four endpoints. city_list returns all supported cities with their numeric city_id, subdomain prefix, and URL — the starting point for every other call. house_price_trends accepts a city parameter (subdomain like bj or numeric city_id) and an optional level value (city, district, community, or shangquan) to scope results. The response includes price_trends with daily, weekly, and monthly arrays of {date, price} pairs, plus separate new_housing_price and second_hand_price objects that each carry avg_price_per_sqm, month_change_pct, and year_change_pct.
New Property Developments
hot_new_properties returns promoted new housing developments (楼盘) for a city, optionally filtered by region_id or shangquan_id. Each property object in the properties array includes loupan_id, name, region, sub_region, price, price_unit, activity, follow_count, and a has_panoramic_view flag. nearby_new_developments takes a community_id (required) plus optional latitude/longitude coordinates and a limit parameter, and returns an array of developments with floor plans, tags, sale status, contact numbers, and coordinates.
Geo and ID Lookup
Sub-city queries require an area_id for house_price_trends and a community_id for nearby_new_developments. The city_list endpoint provides the subdomain-to-ID mapping. Coordinates from the house_price_trends response (location.lat, location.lng) can be passed directly into nearby_new_developments for location-anchored queries. City names and market URLs are returned in Chinese.
The 58 API is a managed, monitored endpoint for dq.58.com — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when dq.58.com changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.
This isn't an official dq.58.com API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.
Will this API break when the source site changes?+
Is this an official API from the source site?+
Can I fix or extend this API myself if I need a new endpoint or field?+
What happens if I call an endpoint that has an issue?+
- Track monthly average price per sqm trends for second-hand housing in Beijing and Shanghai to monitor market movement.
- Compare year-over-year price changes across multiple cities using
year_change_pctfromhouse_price_trends. - Identify promoted new property developments in a target district by filtering
hot_new_propertieswithregion_id. - Build a neighborhood comparison tool by querying
house_price_trendsatcommunitylevel for multiplearea_idvalues. - Find new developments near a specific community using
nearby_new_developmentswithcommunity_idand coordinate inputs. - Power a city-selector UI by enumerating supported markets from
city_listwith their subdomain and numeric IDs. - Monitor
follow_counton new developments inhot_new_propertiesto gauge buyer interest over time.
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 100 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does 58.com offer an official developer API for housing data?+
What does `house_price_trends` return and how granular can queries get?+
price_trends with daily, weekly, and monthly {date, price} arrays, plus new_housing_price and second_hand_price objects each containing avg_price_per_sqm, month_change_pct, and year_change_pct. Granularity is controlled by the level parameter: city, district, community, or shangquan (business district). Sub-city levels require an area_id; use the city_list endpoint to resolve city identifiers first.Does the API cover rental listings or only purchase (sale) housing data?+
Are all 31+ cities available for sub-district and community-level price trends?+
city_list. Sub-city granularity (district, community, shangquan) depends on whether 58.com publishes that breakdown for a given city — smaller cities may only have city-level data. The area_id values needed for sub-city queries must be looked up via house_price_trends or related search results, as there is no standalone area-directory endpoint. You can fork this API on Parse and revise it to add an area lookup endpoint for systematic sub-city ID discovery.What property detail fields does `nearby_new_developments` return compared to `hot_new_properties`?+
nearby_new_developments returns richer per-development detail: floor plans, tags, sale status, contact phone numbers, and coordinates. hot_new_properties is oriented toward promoted listings and includes activity/promotion info, follow_count, and a has_panoramic_view flag alongside basic price and location fields. Neither endpoint currently returns individual unit-level listings or historical transaction records for specific developments.