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

OnTheMarket Agent Listings API Documentation

GET https://scrappa.co/api/onthemarket/agent-listings

OnTheMarket Agent Listings API returns the current property inventory of one estate-agent branch from OnTheMarket as JSON. The response carries the branch summary, paging metadata (one-based page, 30 listings per page and a has_more flag) and each listing card with the id, title, price and numeric GBP value, bedrooms, bathrooms, address, features, tenure, coordinates, labels and branch summary.

OnTheMarket Agent Listings API Documentation 1 credit/request

Endpoint

Request preview
GET
https://scrappa.co/api/onthemarket/agent-listings
Auth header
x-api-key
Cost
1 credit/request
slug = example search_type = example
Response preview
200 OK
{
    "data": {
        "agent": {
            "name": "Bairstow Eves - Stratford",
            "slug": "bairstow-eves-stratford"
        },
        "listings": [
            {
                "id": "18729963",
                "agent": {
                    "name": "Bairstow Eves - Stratford",
                    "branch_id": 73402,
                    "telephone": "020 4645 2667",
                    "details_url": "https://www.onthemarket.com/agents/branch/bairstow-eves-stratford/"
...

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.

3 optional filters available.

slug string Required

Agent branch slug, e.g. bairstow-eves-stratford.

Example value example
search_type string Required

for-sale or to-rent.

Example value example
page integer Optional

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

Example value 1
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

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": {
        "agent": {
            "name": "Bairstow Eves - Stratford",
            "slug": "bairstow-eves-stratford"
        },
        "listings": [
            {
                "id": "18729963",
                "agent": {
                    "name": "Bairstow Eves - Stratford",
                    "branch_id": 73402,
                    "telephone": "020 4645 2667",
                    "details_url": "https://www.onthemarket.com/agents/branch/bairstow-eves-stratford/"
                },
                "price": "\u00a3195,000",
                "tenure": "Leasehold (98 years remaining)",
                "address": "Romford Road, London, E7",
                "bedrooms": 1,
                "features": [
                    "Tenure: Leasehold (98 years remaining)"
                ],
                "location": {
                    "lat": 51.54902,
                    "lon": 0.043963
                },
                "bathrooms": 1,
                "spotlight": true,
                "main_label": "Spotlight Property",
                "price_value": 195000,
                "short_price": "\u00a3195k",
                "property_url": "https://www.onthemarket.com/details/18729963/",
                "property_title": "1 bedroom flat for sale",
                "price_qualifier": "Offers over",
                "humanised_property_type": "Flat"
            }
        ],
        "search_metadata": {
            "page": 1,
            "has_more": true,
            "frame_size": 30,
            "total_results": 113,
            "total_results_display": "113"
        }
    },
    "meta": {
        "billable": true,
        "endpoint_family": "agent_listings"
    },
    "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"
}
404

Not Found

The agent branch slug is unknown. This response is not billable.

{
    "meta": {
        "billable": false,
        "retryable": false,
        "endpoint_family": "agent_listings"
    },
    "error": {
        "code": "NOT_FOUND",
        "message": "The requested OnTheMarket resource was not found."
    },
    "success": false
}
502

Invalid Source Response

OnTheMarket returned a response that could not be parsed. This response is not billable.

{
    "meta": {
        "billable": false,
        "retryable": false,
        "endpoint_family": "agent_listings"
    },
    "error": {
        "code": "UPSTREAM_UNAVAILABLE",
        "message": "OnTheMarket returned an unexpected response."
    },
    "success": false
}
503

Service Unavailable

The upstream source is temporarily unavailable or returned an unexpected shape. This response is not billable and can be retried.

{
    "meta": {
        "billable": false,
        "retryable": true,
        "endpoint_family": "agent_listings"
    },
    "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.