# OnTheMarket Listing API Documentation

<p><strong>OnTheMarket Listing API</strong> returns one UK property listing from OnTheMarket as JSON. The response carries the id, property type, display price with a numeric GBP value, channel, bedrooms, bathrooms, tenure, key facts, features, the description as HTML and plain text, address, postcode, coordinates, images, floorplans, EPC rating and date, broadband speeds, nearest stations and schools, room sizes, area price statistics and crime level, the estate-agent branch and similar properties.</p>

- **Documentation:** [https://scrappa.co/docs/onthemarket-api/onthemarket_listing](https://scrappa.co/docs/onthemarket-api/onthemarket_listing)
- **API group:** OnTheMarket API
- **Endpoint:** `GET https://scrappa.co/api/onthemarket/listing`

## Authentication

Send your Scrappa API key in the `X-API-KEY` request header. Paid endpoints also support accountless x402 payments when called without an API key.

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | Yes | Property id returned by the search endpoint, e.g. 20318324. |

## Example response

```json
{
    "data": {
        "listing": {
            "id": "20318324",
            "epc": {
                "date": "2023-12-05",
                "rating": "C"
            },
            "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": "\u00a3525,000",
            "rooms": [
                {
                    "name": "Kitchen / Living Room",
                    "size_text": "6.02m x 3.35m"
                }
            ],
            "images": [
                {
                    "url": "https://media.onthemarket.com/properties/20318324/1643568306/image-0-480x320.jpg",
                    "webp_url": "https://media.onthemarket.com/properties/20318324/1643568306/image-0-480x320.webp",
                    "large_url": "https://media.onthemarket.com/properties/20318324/1643568306/image-0-1024x1024.jpg",
                    "position_caption": "Image 1 of 13"
                }
            ],
            "tenure": "Freehold",
            "address": "Faringford Road, London, E15",
            "channel": "sale",
            "schools": [
                {
                    "name": "Porchester Junior School",
                    "distance": "0.3mi."
                }
            ],
            "bedrooms": 3,
            "features": [
                "Freehold",
                "Extended Three-bedroom family home",
                "Modern shower and ground floor w/c"
            ],
            "key_info": [
                {
                    "label": "Tenure",
                    "value": "Freehold"
                },
                {
                    "label": "Council tax",
                    "value": "Ask agent"
                }
            ],
            "location": {
                "lat": 51.539824,
                "lon": 0.006288
            },
            "postcode": "E15 4DP",
            "stations": [
                {
                    "name": "Carlton Station",
                    "distance": "1.7mi."
                }
            ],
            "bathrooms": 3,
            "branch_id": 73402,
            "broadband": {
                "date": "2021-12-16",
                "broadband_type": "ultra-fast",
                "max_upload_mbps": 1000,
                "max_download_mbps": 1000
            },
            "area_stats": {
                "crimes": {
                    "label": "Low",
                    "level": "low"
                },
                "avg_home_prices": {
                    "price": "\u00a3549,971",
                    "title": "3 bedroom terraced houses",
                    "price_value": 549971
                }
            },
            "floorplans": [
                {
                    "url": "https://media.onthemarket.com/properties/20318324/1643568306/floor-plan-0-480x320.jpg",
                    "large_url": "https://media.onthemarket.com/properties/20318324/1643568306/floor-plan-0-1024x1024.jpg",
                    "position_caption": "Floorplan"
                }
            ],
            "description": "<br/>A great opportunity to purchase this beautiful three double bedroom period property on Faringford Road.",
            "price_value": 525000,
            "description_text": "A great opportunity to purchase this beautiful three double bedroom period property on Faringford Road.",
            "similar_properties": [
                {
                    "id": "18698609",
                    "price": "\u00a3265,000",
                    "address": "Turneys Court, Nottingham, Nottinghamshire, NG2",
                    "bedrooms": 2,
                    "price_value": 265000,
                    "property_url": "https://www.onthemarket.com/details/18698609/",
                    "property_title": "2 bedroom flat for sale",
                    "humanised_property_type": "Flat"
                }
            ],
            "humanised_property_type": "Terraced house"
        }
    },
    "meta": {
        "billable": true,
        "endpoint_family": "listing"
    },
    "success": true
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | A public parameter is missing or invalid. This response is not billable. |
| 404 | Not Found | The property id is unknown or the listing has been removed. This response is not billable. |
| 502 | Invalid Source Response | OnTheMarket returned a response that could not be parsed. This response is not billable. |
| 503 | Service Unavailable | The upstream source is temporarily unavailable or returned an unexpected shape. This response is not billable and can be retried. |

## More Scrappa resources

- [API documentation](https://scrappa.co/docs)
- [Full LLM-readable API reference](https://scrappa.co/llms-full.txt)
- [OpenAPI specification](https://scrappa.co/docs/api.json)
- [Pricing](https://scrappa.co/pricing)
