# OnTheMarket listings: `POST /v1/onthemarket/search`

Cost: 2 credits (2 per page (an empty page and failed requests are free)). Docs: https://scrapercompany.com/docs/reference/onthemarket-search

One page (up to 30) of OnTheMarket listings, for sale or to rent.

`location` is turned into OnTheMarket's place slug (`St Albans` ->
`st-albans`), or pass `place`. Prices are OnTheMarket's display text;
`price` is its number when the text is one amount (with `price_period`
for rents). An unknown place is a 404.

Request body (JSON):

- `mode` (string; optional; default sale; pattern ^(sale|rent)$): sale or rent.
- `min_price` (integer | null; optional; min 0): Minimum price (GBP; per month for rent).
- `max_price` (integer | null; optional; min 0): Maximum price (GBP; per month for rent).
- `min_bedrooms` (integer | null; optional; min 0, max 10): Minimum bedrooms.
- `location` (string | null; optional; max length 120): Place name, turned into OnTheMarket's slug (St Albans -> st-albans). Ignored when place is supplied.
- `place` (string | null; optional; max length 120, pattern ^[a-z0-9]+(-[a-z0-9]+)*$): OnTheMarket place slug from its URLs, e.g. st-albans.
- `page` (integer; optional; default 1; min 1, max 50): Result page.

Base URL: `https://api.scrapercompany.com`. Auth: send your key in the `x-api-key` header. A failed request (4xx or 5xx) or an empty result costs 0 credits.

- [Full API reference as one Markdown file](https://scrapercompany.com/llms-full.txt)
- [OpenAPI spec](https://scrapercompany.com/openapi.json)
