SpareRoom APIspareroom.co.uk ↗
Access SpareRoom UK flatshare listings by city with prices, locations, images, and links. Also retrieve the top flatsharing cities in the UK.
What is the SpareRoom API?
The SpareRoom API covers 2 endpoints for accessing UK flatshare data: search_listings returns paginated room and flat listings for any city, including title, price, location, image URL, and a direct listing link, while get_top_cities returns the curated list of top flatsharing cities from the SpareRoom homepage. Each search result page delivers up to 100 listings along with a total_count so you can page through the full result set.
curl -X GET 'https://api.parse.bot/scraper/cbca23db-ebaa-4a82-a40d-a790ec09434e/search_listings?city=London&page=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 spareroom-co-uk-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.
from parse_apis.spareroom_scraper_api import SpareRoom, Listing, City
client = SpareRoom()
# Discover top flatsharing cities
for city in client.cities.list():
print(city.name, city.url)
# Search listings in a specific city
manchester = client.city("Manchester")
for listing in manchester.search_listings(limit=5):
print(listing.title, listing.price, listing.location)
Search for flat listings in a specific city or area on SpareRoom. Returns paginated results with up to 100 listings per page. Each listing includes title, price (with period), location, image URL, and a detail link. Pagination is integer-based via the page param; total_count indicates total matching listings across all pages.
| Param | Type | Description |
|---|---|---|
| cityrequired | string | City or area to search in (e.g. London, Manchester, Brighton). |
| page | integer | Page number for pagination (1-based). |
{
"type": "object",
"fields": {
"city": "string - the city searched",
"page": "integer - current page number",
"listings": "array of listing objects with title, price, location, image_url, and link",
"total_count": "string - total number of matching listings"
},
"sample": {
"data": {
"city": "London",
"page": 1,
"listings": [
{
"link": "https://www.spareroom.co.uk/flatshare/flatshare_detail.pl?advert_id=17039205",
"price": "1300 pcm",
"title": "Spacious 2 bed 2 bathroom split-level maisonette",
"location": "Shepherds Bush (W12)",
"image_url": "https://photos2.spareroom.co.uk/images/flatshare/listings/large/89/95/89953731.jpg"
}
],
"total_count": "14971"
},
"status": "success"
}
}About the SpareRoom API
Searching Flatshare Listings
The search_listings endpoint accepts a required city parameter (e.g. London, Manchester, Brighton) and an optional page parameter for pagination. Each response includes the searched city, the current page number, a total_count string indicating how many listings matched, and a listings array. Every listing object carries a title, price, location, image_url, and link back to the full SpareRoom listing page. With up to 100 listings per page, you can iterate through large result sets using the total_count to calculate how many pages exist.
Discovering Top Flatsharing Cities
The get_top_cities endpoint requires no inputs and returns a top_cities array. Each entry contains a name (the city name as it appears on SpareRoom) and a url pointing to that city's SpareRoom listings page. This endpoint is useful for building location pickers, seeding city-level searches, or staying current with which UK cities SpareRoom actively curates.
Coverage and Scope
Coverage is UK-wide, scoped to whatever cities and areas SpareRoom indexes. The search_listings endpoint reflects live listing inventory — the total_count field gives you the current volume at query time. Data returned is limited to the listing card level: title, price, location, image, and link. Full listing details such as room descriptions, availability dates, or landlord/tenant preferences are not included in the search response.
The SpareRoom API is a managed, monitored endpoint for spareroom.co.uk — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when spareroom.co.uk 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 spareroom.co.uk 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 UK flatshare search tool that lets users filter by city and page through live SpareRoom listings.
- Track average room prices across multiple UK cities by aggregating the
pricefield fromsearch_listingsresponses. - Populate a city selector dropdown for a rental app using the
nameandurlfields fromget_top_cities. - Monitor listing volume in a specific area over time by recording the
total_countfrom repeatedsearch_listingscalls. - Generate city-by-city flatshare inventory reports by querying
search_listingsfor each city returned byget_top_cities. - Feed listing images and links into a property aggregator using the
image_urlandlinkfields from the listings array.
| 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 SpareRoom have an official developer API?+
What does the `search_listings` endpoint return beyond basic listing info?+
title, price, location, image_url, and link. The response also includes city, page, and total_count so you can paginate. Detailed room descriptions, availability dates, house rules, and advertiser contact details are not included in the search results.Does the API cover individual listing detail pages — descriptions, availability, or landlord preferences?+
How does pagination work with `search_listings`?+
page parameter to retrieve subsequent pages. Each page returns up to 100 listings. The total_count field in the response tells you the total number of matching listings, which you can use to calculate how many pages are available for a given city.Does the API cover flatshares outside the UK, such as Ireland or the US?+
get_top_cities endpoint also returns UK cities only. You can fork this API on Parse and revise it to target other regional flatshare platforms if you need non-UK coverage.