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

OnTheMarket Agent Branch API Documentation

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

OnTheMarket Agent Branch API returns one estate-agent branch profile from OnTheMarket as JSON. The response carries the branch id, name, company name, address, postcode, telephone, public branch url, logo, coordinates, social links, hero image, description, affiliation titles, featured sale and rent listings and the public search urls for the branch.

OnTheMarket Agent Branch API Documentation 1 credit/request

Endpoint

Request preview
GET
https://scrappa.co/api/onthemarket/agent
Auth header
x-api-key
Cost
1 credit/request
slug = example
Response preview
200 OK
{
    "data": {
        "agent": {
            "name": "Bairstow Eves - Stratford",
            "address": "142 The Grove\nStratford\nE15 1NS",
            "socials": {
                "facebook": "https://www.facebook.com/BairstowEvesEstateAgents"
            },
            "location": {
                "lat": 51.544062,
                "lon": 0.004052
            },
            "logo_url": "https://media.onthemarket.com/agents/companies/14646/260126141925387/logo-300x200.jpg",
            "postcode": "E15 1NS",
...

Parameters

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

Runnable path

1 required parameter needed before sending a request.

slug string Required

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

Example value example

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",
            "address": "142 The Grove\nStratford\nE15 1NS",
            "socials": {
                "facebook": "https://www.facebook.com/BairstowEvesEstateAgents"
            },
            "location": {
                "lat": 51.544062,
                "lon": 0.004052
            },
            "logo_url": "https://media.onthemarket.com/agents/companies/14646/260126141925387/logo-300x200.jpg",
            "postcode": "E15 1NS",
            "branch_id": 73402,
            "telephone": "020 4645 2667",
            "hero_image": {
                "title": "House",
                "mobile_image_url": "https://media.onthemarket.com/agent-hero-images/default-5-mobile.jpg",
                "desktop_image_url": "https://media.onthemarket.com/agent-hero-images/default-5-desktop.jpg"
            },
            "description": "<p>Since 1899, Bairstow Eves has provided trusted expertise with extensive local knowledge.</p>",
            "details_url": "https://www.onthemarket.com/agents/branch/bairstow-eves-stratford/",
            "affiliations": [
                "ARLA logo",
                "NAEA logo",
                "TPO logo"
            ],
            "sale_preview": [
                {
                    "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_to_rent_url": "https://www.onthemarket.com/agents/branch/bairstow-eves-stratford/properties/?let-agreed=true&search-type=to-rent",
            "search_for_sale_url": "https://www.onthemarket.com/agents/branch/bairstow-eves-stratford/properties/?search-type=for-sale&under-offer=true"
        }
    },
    "meta": {
        "billable": true,
        "endpoint_family": "agent"
    },
    "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": {
        "slug": [
            "The slug 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"
    },
    "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"
    },
    "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"
    },
    "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.