spb.cian.ru APIspb.cian.ru ↗
Search St. Petersburg real estate listings via the CIAN API. Filter flats by price, area, floor, rooms, and deal type. Returns coordinates, metro, and building data.
curl -X POST 'https://api.parse.bot/scraper/e87b8d0d-ca67-40ac-9fd9-545ff4dfdfce/search_flats' \
-H 'X-API-Key: $PARSE_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"page": "1",
"sort": "price_object_order",
"rooms": "2,3",
"max_area": "150",
"min_area": "50",
"deal_type": "sale",
"max_floor": "10",
"max_price": "20000000",
"min_floor": "2",
"min_price": "5000000",
"room_type": "flat",
"min_ceiling_height": "3"
}'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 spb-cian-ru-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: CIAN St. Petersburg Real Estate — bounded, re-runnable."""
from parse_apis.CIAN_St__Petersburg_Real_Estate_API import Cian, DealType, Sort, InvalidInput
client = Cian()
# Search flats for sale sorted by price ascending, capped at 5 results
for flat in client.flats.search(deal_type=DealType.SALE, sort=Sort.PRICE_ASC, limit=5):
print(flat.address, flat.price, flat.rooms_count, flat.total_area)
# Search 2-3 room flats for rent, get the first one
flat = client.flats.search(
deal_type=DealType.RENT,
rooms="2,3",
min_price=30000,
max_price=60000,
sort=Sort.NEWEST,
limit=1,
).first()
if flat:
print(flat.cian_id, flat.floor_number, flat.floors_count)
for ug in flat.undergrounds:
print(f" Metro: {ug.name}, {ug.time} min by {ug.transport_type}")
# Typed error handling for invalid input
try:
list(client.flats.search(deal_type="invalid_type", limit=1))
except InvalidInput as exc:
print(f"Invalid input caught: {exc}")
print("exercised: flats.search (sale + rent + invalid input)")
Search flats for sale or long-term rent in St. Petersburg. Returns paginated results with detailed property information including price, area, floor, address, coordinates, metro stations, and building characteristics. Each page returns up to 28 listings. Results are auto-iterated by the SDK.
| Param | Type | Description |
|---|---|---|
| page | integer | Page number for pagination, starting from 1. |
| sort | string | Sort order for results. |
| rooms | string | Comma-separated list of room counts to filter by (e.g. '1,2,3'). Studio is 9. |
| max_area | number | Maximum total area in square meters. |
| min_area | number | Minimum total area in square meters. |
| deal_type | string | Type of deal. |
| max_floor | integer | Maximum floor number. |
| max_price | integer | Maximum price in rubles. |
| min_floor | integer | Minimum floor number. |
| min_price | integer | Minimum price in rubles. |
| room_type | string | Filter by property type: 'flat' for flats only (excludes apartments), 'apartment' for apartments only. Omit for all types. |
| min_ceiling_height | number | Minimum ceiling height in meters (e.g. 2.7, 3.0). |
{
"type": "object",
"fields": {
"page": "integer",
"offers": "array of flat listing objects with full details",
"per_page": "integer",
"total_count": "integer"
},
"sample": {
"data": {
"page": 1,
"offers": [
{
"url": "https://spb.cian.ru/sale/flat/331338347/",
"price": 16000000,
"address": "Россия, Санкт-Петербург, аллея Арцеуловская, дом 7",
"cian_id": 331338347,
"category": "flatSale",
"currency": "rur",
"latitude": 60.03625,
"deal_type": "sale",
"flat_type": "rooms",
"longitude": 30.194928,
"sale_type": "free",
"build_year": 2024,
"decoration": null,
"offer_type": "flat",
"total_area": "54.3",
"description": "Продаётся двухкомнатная квартира...",
"living_area": "22.4",
"rooms_count": 2,
"floor_number": 5,
"floors_count": 13,
"kitchen_area": "17.4",
"photos_count": 27,
"undergrounds": [
{
"name": "Комендантский проспект",
"time": 10,
"line_color": "700579",
"transport_type": "transport"
}
],
"loggias_count": 1,
"material_type": "monolithBrick",
"from_developer": false,
"added_timestamp": 1782246805,
"balconies_count": null,
"is_new_building": false,
"price_per_meter": null,
"mortgage_allowed": true,
"address_components": [
"Санкт-Петербург",
"р-н Приморский",
"Юнтолово"
]
}
],
"per_page": 28,
"total_count": 8484
},
"status": "success"
}
}About the spb.cian.ru API
The spb.cian.ru API exposes one endpoint — search_flats — that returns up to 28 paginated flat listings per call from CIAN's St. Petersburg real estate database, covering both sale and long-term rental offers. Each listing object includes over a dozen fields: price in rubles, total area, floor number, address, geographic coordinates, nearby metro stations, and building characteristics. Results are auto-iterated across pages, making bulk extraction straightforward.
What the API Returns
The search_flats endpoint returns a paginated list of flat listings from CIAN's St. Petersburg inventory. Each response includes page, per_page, total_count, and an offers array. Individual offer objects carry property-level details: price, total and living area, floor, full address, latitude/longitude coordinates, nearby metro stations, and building characteristics such as construction type and ceiling height where available.
Filtering and Sorting
The endpoint accepts several input parameters to narrow results. Use deal_type to switch between sale and long-term rent listings. Filter by area with min_area and max_area (in square meters), cap price with max_price (in rubles), and restrict floor range with max_floor. The rooms parameter accepts a comma-separated list of room counts — note that studio apartments use the value 9. The sort parameter controls result ordering, and page handles pagination starting from 1.
Pagination Behavior
Each page returns up to 28 listings. The total_count field in the response tells you the full result set size, so you can calculate the number of pages needed. Results are auto-iterated by the API, meaning you can walk through pages sequentially without managing cursor tokens or session state.
Coverage Scope
Coverage is limited to St. Petersburg (region=2 on CIAN). The endpoint covers residential flats; commercial property, land, garages, and new-build project pages are not part of the current response schema. Listings include geographic coordinates suitable for mapping, and metro proximity data that CIAN surfaces on its own listing cards.
The spb.cian.ru API is a managed, monitored endpoint for spb.cian.ru — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when spb.cian.ru 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 spb.cian.ru 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?+
- Build a price-per-square-meter heatmap of St. Petersburg neighborhoods using coordinates and area fields.
- Monitor asking price trends over time for 2- and 3-room flats in specific districts.
- Find listings near a metro station by filtering results on the metro station field.
- Aggregate rental supply by room count to track availability shifts in the St. Petersburg market.
- Screen investment properties by combining
min_area,max_price, and floor filters to surface high-ceiling flats. - Export a CSV of sale listings sorted by price for offline analysis or client reporting.
| 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 CIAN have an official developer API?+
What does the `rooms` filter actually accept, and how are studios represented?+
rooms parameter takes a comma-separated string of integers representing room counts — for example, '1,2,3' for one-, two-, and three-room flats. Studios are encoded as 9, not 0. Passing '9,1' would return both studios and one-room flats in the results.Does the API cover listings in other Russian cities besides St. Petersburg?+
Are commercial properties, new-build project pages, or room rentals available?+
search_flats response schema. You can fork this API on Parse and revise it to add an endpoint targeting those offer types.