Centanet APIsh.centanet.com ↗
Access Shanghai property listings, community profiles, rentals, and new developments via the Centanet (sh.centanet.com) API. 8 endpoints, clean JSON responses.
What is the Centanet API?
This API exposes 8 endpoints covering Shanghai real estate data from sh.centanet.com, including second-hand home sales, rentals, new developments, and residential community profiles. The search_second_hand_listings endpoint returns paginated sale listings filtered by keyword, district, or community code, while get_listing_detail provides per-listing loan estimates, tax info, and agent contact details. Geographic filtering is driven by district IDs retrieved from get_geographic_scopes.
curl -X GET 'https://api.parse.bot/scraper/34633616-aed5-473f-b409-2660c077a749/search_communities?region_id=2172&page_count=5&page_index=1' \ -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 sh-centanet-com-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.
"""Shanghai Centanet Real Estate API — usage walkthrough.
Demonstrates browsing districts, searching communities, drilling into listings,
and browsing new developments.
"""
from parse_apis.shanghai_centanet_real_estate_api import (
Centanet, PostType, ResourceNotFound
)
client = Centanet()
# List all districts (geographic scopes) — single-page, cap total items
for district in client.districts.list(limit=3):
print(district.name, district.id, district.lat)
# Search communities in Pudong district, capped at 3 results
for community in client.communities.search(region_id="2172", limit=3):
print(community.name, community.sale_avg_price, community.address)
# Drill into the first community's sale listings
community = client.communities.search(limit=1).first()
if community:
for listing in community.sale_listings.list(limit=3):
print(listing.title, listing.sale_price, listing.area)
# Search rental listings by keyword
rental = client.rentallistings.search(keywords="古北", limit=1).first()
if rental:
print(rental.estate_name, rental.rent_price, rental.room_count)
# Browse new developments and fetch detail
try:
detail = client.newdevelopments.get(est_ext_id="29618")
print(detail.name, detail.average_price, detail.status)
except ResourceNotFound as exc:
print(f"Development not found: {exc}")
print("exercised: districts.list / communities.search / sale_listings.list / rentallistings.search / newdevelopments.get")
Search for residential communities (xiaoqu) with optional filters. Returns paginated results with community summaries including average sale prices, addresses, sale/rent counts, and nearby transit info. Results are ordered by a relevance score.
| Param | Type | Description |
|---|---|---|
| region_id | string | District ID to filter by (e.g. '2172' for Pudong). Obtain from get_geographic_scopes endpoint. |
| page_count | integer | Number of results per page. |
| page_index | integer | Page number (1-based). |
| estate_name | string | Filter by community name (partial match supported). |
{
"type": "object",
"fields": {
"Total": "integer total number of matching communities",
"Result": "array of community summary objects with EstateCode, EstateName, SaleAvgPrice, Address, SaleNumber, RentNumber",
"ResultNo": "integer status code (0 = success)"
},
"sample": {
"data": {
"Total": 11505,
"Result": [
{
"Address": "顺平路59弄",
"IsSchool": true,
"RegionId": 2174,
"IsRailWay": true,
"EstateCode": "pedawkwyws",
"EstateName": "中环和润苑",
"GscopeName": "周家嘴路",
"RegionName": "杨浦",
"RentNumber": 4,
"SaleNumber": 22,
"SaleAvgPrice": 55123.99
}
],
"ResultNo": 0
},
"status": "success"
}
}About the Centanet API
Listings and Communities
The API covers three listing types: second-hand sales (search_second_hand_listings), rentals (search_rental_listings), and new developments (search_new_developments). Each search endpoint returns paginated summaries — Total count, a Result array, and a ResultNo status code. Listing summaries include price, area, and room counts; rental summaries add monthly rent figures. For full detail on any sale or rental listing, pass the AdsNo field and an optional post_type ('s' or 'r') to get_listing_detail, which returns estate info, loan calculator data, tax estimates, and agent contact.
Communities and New Developments
search_communities lets you find residential communities (xiaoqu) by district or partial name, returning average prices, addresses, and counts of active sale and rental listings. get_community_detail accepts an EstateCode and returns the full community record including EstateInfo, EstateImages, nearby schools, and transit data. New development searches use search_new_developments with 0-based start_index pagination; detail is retrieved via get_new_development_detail using the EstExtId, which returns project introduction, floor plans, developer info, and nearby transit.
Geographic Filtering
get_geographic_scopes takes no inputs and returns all Shanghai districts as an array of objects, each containing a gscopeList of nested sub-areas. The region_id values from this endpoint can be passed to search_communities, search_second_hand_listings, search_rental_listings, and search_new_developments to scope results to a specific district like Pudong (ID '2172'). This makes geographic filtering consistent across all listing types.
The Centanet API is a managed, monitored endpoint for sh.centanet.com — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when sh.centanet.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 sh.centanet.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?+
- Aggregate second-hand sale listings by district to build a Shanghai property price heat map using average price fields.
- Monitor new development launches by polling
search_new_developmentsand diffing theTotalcount andResultarray. - Build a community comparison tool using
get_community_detailto surface average prices, nearby schools, and transit for multiple xiaoqu. - Populate a rental search interface by filtering
search_rental_listingswithestate_codeandregion_idinputs. - Feed a loan affordability calculator using the loan and tax estimate fields returned by
get_listing_detailfor sale listings. - Construct a district-level market summary by combining
get_geographic_scopesIDs with paginated results from all three search endpoints.
| 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 sh.centanet.com have an official public developer API?+
What does `get_listing_detail` return beyond the basic listing summary?+
Result object that includes estate information, a loan calculator section, tax estimate fields, and agent contact details — fields not present in the search_second_hand_listings or search_rental_listings summary results. Pass post_type as 's' for sale listings or 'r' for rentals to ensure correct detail retrieval.How does pagination work across the different search endpoints?+
search_communities, search_second_hand_listings, and search_rental_listings use 1-based page_index with a page_count per-page size. search_new_developments differs: it uses a 0-based start_index offset alongside a length parameter. Both patterns return a Total integer so you can calculate how many pages or offsets remain.