Anjuke APIbeijing.anjuke.com ↗
Access Beijing property data via the Anjuke API: rental listings, second-hand homes, price index, community search, and agent profiles across Beijing districts.
What is the Anjuke API?
This API exposes 6 endpoints covering Beijing real estate data from Anjuke, including second-hand property listings, rental listings, a city-wide house price index, community autocomplete search, listing detail pages, and agent profiles. The get_beijing_house_price_index endpoint alone returns current average price per square meter alongside daily, weekly, and monthly price history arrays, making it useful for tracking market movement over time.
curl -X GET 'https://api.parse.bot/scraper/cb9bb724-0512-4ccb-aef4-2615cefb5873/search_second_hand_listings?page=1&district=chaoyang' \ -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 beijing-anjuke-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.
"""Walkthrough: Anjuke Beijing Real Estate SDK — bounded, re-runnable."""
from parse_apis.anjuke_beijing_real_estate_api import (
Anjuke, CommunityType, CommunityNotFound
)
client = Anjuke()
# Get Beijing market price overview — singleton fetch, typed nested access.
index = client.priceindexes.get()
print(f"Market: {index.data.name}, price: ¥{index.data.price_info.price}/m²")
print(f" Monthly change: {index.data.price_info.month_change}%")
print(f" New housing: ¥{index.data.xinfang_price_info.price}/m²")
# Browse daily price trends (nested List[PriceTrend] → List[PricePoint]).
for trend in index.data.price_trend:
points = trend.city[:3]
for pt in points:
print(f" [{trend.trend_type}] {pt.date}: ¥{pt.price}")
# Search communities by name — uses CommunityType enum for filtering.
for result in client.communityresults.search(query="朝阳", limit=5):
print(f" {result.name} (type={result.type}) price={result.price}")
if result.type == CommunityType.COMMUNITY:
print(f" address: {result.address}")
# List rental properties across Beijing — capped iteration.
for rental in client.rentallistings.list(limit=3):
print(f" {rental.title} | {rental.price} | {rental.community}")
print(f" specs={rental.specs}, tags={rental.tags}")
# Typed error handling: catch CommunityNotFound on a bad query.
try:
results = client.communityresults.search(query="不存在的地方xyz", limit=1)
first = results.first()
if first:
print(f"Found: {first.name}")
except CommunityNotFound as exc:
print(f"Community not found: {exc.query}")
# List agents with company info.
for agent in client.agents.list(limit=3):
print(f" {agent.name} @ {agent.company}, tags={agent.tags}")
print("exercised: priceindexes.get / communityresults.search / rentallistings.list / agents.list")
Search second-hand property listings in Beijing.
| Param | Type | Description |
|---|---|---|
| page | integer | Page number |
| district | string | District filter path segment |
{
"type": "object",
"fields": {
"page": "string",
"listings": "array"
},
"sample": {
"data": {
"page": "1",
"listings": []
},
"status": "success"
}
}About the Anjuke API
Listings and Rentals
The search_second_hand_listings endpoint accepts an optional page integer and a district path segment to filter results by area. The search_rental_listings endpoint returns up to 60 objects per page, each carrying an id, title, specs (rooms, area, floor), community, address, tags, price, and a direct url. District filtering uses pinyin strings such as chaoyang, haidian, or changping. Note that district-filtered requests and pagination beyond page 1 can encounter antibot restrictions.
Price Index and Listing Detail
get_beijing_house_price_index takes no inputs and returns a data object containing priceInfo (current average price per square meter, monthly and yearly change percentages), priceTrend arrays for daily, weekly, and monthly history, xinfangPriceInfo for new housing, and evaluateInfo. A status field of '0' indicates a successful response. To retrieve specifics for a known property, get_second_hand_listing_detail accepts a listing id (e.g. S717424612) and returns full listing detail.
Community Search and Agents
search_listings_by_community accepts a Chinese-character query string and returns an array of results, each with id, name, type (1=district, 2=sub-area, 3=subway station, 4=community), areaId, areaName, price (average per square meter), and address. This endpoint doubles as an autocomplete for community names. The search_agents endpoint returns a list of agent objects with name, company, tags, and url — no input parameters required.
The Anjuke API is a managed, monitored endpoint for beijing.anjuke.com — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when beijing.anjuke.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 beijing.anjuke.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 Beijing's average housing price per square meter over time using daily and monthly arrays from the price index endpoint.
- Build a district-level rental listing feed for Chaoyang or Haidian using the district filter in search_rental_listings.
- Look up a specific second-hand property by ID to retrieve full listing details for a property comparison tool.
- Autocomplete community name input in a property search UI using search_listings_by_community with Chinese-character queries.
- Display agent directories with company affiliations and specialty tags pulled from the search_agents endpoint.
- Monitor new housing vs. second-hand price divergence using xinfangPriceInfo alongside priceInfo from the price index.
- Filter second-hand listings by Beijing sub-district and paginate results for a market analysis pipeline.
| 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.