Skip to content
Scrappa Get API key
OnTheMarket API 1 credit/request

OnTheMarket Search API Documentation

GET https://scrappa.co/api/onthemarket/search

OnTheMarket Search API returns current UK property listings from OnTheMarket as JSON. Filter for-sale or to-rent homes by location, price, bedrooms, property type and radius, sort by price or update date, and page through the results. Each listing carries the id, title, display price with a numeric GBP value, bedrooms, bathrooms, address, postcode, features, tenure, coordinates, images, labels and the estate-agent branch summary. total_results is a cap (OnTheMarket surfaces at most 34 pages of 30 listings) and a valid empty result is a successful response.

OnTheMarket Search API Documentation 1 credit/request

Endpoint

Request preview
GET
https://scrappa.co/api/onthemarket/search
Auth header
x-api-key
Cost
1 credit/request
search_type = example location_id = 1234567890
Response preview
200 OK
{
    "data": {
        "facets": [
            {
                "name": "property-features[]",
                "text": "Outside space",
                "terms": [
                    {
                        "id": "garden",
                        "text": "Garden"
                    }
                ]
            }
        ],
...

Parameters

Start with the required fields, then add optional filters only when your use case needs them.

Runnable path

2 required parameters needed before sending a request.

13 optional filters available.

search_type string Required

for-sale or to-rent.

Example value example
location_id string Required

Location slug, e.g. nottingham.

Example value 1234567890
page integer Optional

One-based page number, 1 to 34. 30 listings per page. Defaults to 1.

Example value 1
sort_field string Optional

recommended, price or update_date. Defaults to recommended.

Example value example
direction string Optional

asc or desc. Defaults to desc.

Example value example
prop_types string Optional

Comma-separated property types, e.g. detached,flats.

Example value example
min_price integer Optional

Minimum price in GBP.

Example value 10
max_price integer Optional

Maximum price in GBP.

Example value 10
min_bedrooms integer Optional

Minimum number of bedrooms.

Example value 10
max_bedrooms integer Optional

Maximum number of bedrooms.

Example value 10
radius number Optional

Search radius in miles.

Example value 10
under_offer boolean Optional

Include under-offer properties.

Example value true
let_agreed boolean Optional

Include let-agreed properties (to-rent only).

Example value true
exclusive_first boolean Optional

List exclusive properties first.

Example value true
new_home_flag boolean Optional

List new homes first.

Example value true

Response Schema

Example response fields are illustrative; inspect the JSON before integrating.

Example response fields

Scan these fields before integrating.

data meta success
JSON Response
200 OK
{
    "data": {
        "facets": [
            {
                "name": "property-features[]",
                "text": "Outside space",
                "terms": [
                    {
                        "id": "garden",
                        "text": "Garden"
                    }
                ]
            }
        ],
        "listings": [
            {
                "id": "20035804",
                "agent": {
                    "name": "Frank Innes - Mapperley",
                    "logo_url": "https://media.onthemarket.com/agents/companies/14665/260126142222870/logo-190x100.jpg",
                    "branch_id": 73818,
                    "telephone": "0115 691 4648",
                    "details_url": "https://www.onthemarket.com/agents/branch/frank-innes-mapperley/"
                },
                "price": "\u00a3275,000",
                "images": [
                    {
                        "url": "https://media.onthemarket.com/properties/20035804/1651432388/image-0-480x320.jpg",
                        "webp_url": "https://media.onthemarket.com/properties/20035804/1651432388/image-0-480x320.webp"
                    }
                ],
                "tenure": "Freehold",
                "address": "Marshall Road, Nottingham, Nottinghamshire, NG3",
                "reduced": true,
                "bedrooms": 2,
                "features": [
                    "Tenure: Freehold",
                    "Detached Bungalow",
                    "Two Bedrooms",
                    "Modernised Throughout"
                ],
                "for_sale": true,
                "location": {
                    "lat": 52.977144,
                    "lon": -1.115554
                },
                "postcode": "NG3",
                "bathrooms": 1,
                "spotlight": true,
                "main_label": "Reduced",
                "cover_image": {
                    "url": "https://media.onthemarket.com/properties/20035804/1651432388/image-0-480x320.jpg",
                    "webp_url": "https://media.onthemarket.com/properties/20035804/1651432388/image-0-480x320.webp"
                },
                "price_value": 275000,
                "images_count": 17,
                "property_url": "https://www.onthemarket.com/details/20035804/",
                "virtual_tour": true,
                "data_label_id": "reduced",
                "online_viewing": true,
                "property_title": "2 bedroom bungalow for sale",
                "address_locality": "Nottinghamshire",
                "floorplans_count": 1,
                "days_since_added_reduced": "Reduced < 7 days"
            }
        ],
        "search_metadata": {
            "page": 1,
            "has_more": true,
            "direction": "desc",
            "last_page": 34,
            "frame_size": 30,
            "sort_field": "recommended",
            "location_id": "nottingham",
            "search_type": "for-sale",
            "location_name": "Nottingham",
            "location_type": "town",
            "total_results": 3049,
            "total_results_display": "3,049"
        }
    },
    "meta": {
        "billable": true,
        "endpoint_family": "search"
    },
    "success": true
}

Errors

Handle these documented responses before retrying or showing customer-facing failures.

422

Validation Error

A public parameter is missing or invalid. This response is not billable.

{
    "errors": {
        "search_type": [
            "The search type field is required."
        ]
    },
    "message": "The request validation failed"
}
503

Service Unavailable

The upstream source is temporarily unavailable. This response is not billable and can be retried.

{
    "meta": {
        "billable": false,
        "retryable": true,
        "endpoint_family": "search"
    },
    "error": {
        "code": "UPSTREAM_UNAVAILABLE",
        "message": "The OnTheMarket API is temporarily unavailable. Please retry."
    },
    "success": false
}

Generate Code with AI

Copy a ready-made prompt with all the endpoint details, parameters, and example responses. Paste it into ChatGPT, Claude, or any AI assistant to instantly generate working code.

Try It Live

Test this endpoint in our interactive playground with real data.