---
title: "OnTheMarket API: Search | Perceptlayer"
description: "Search from OnTheMarket as JSON. 1 credit per successful call."
url: https://perceptlayer.com/apis/onthemarket/search
---

[APIs](https://perceptlayer.com/apis) / [OnTheMarket](https://perceptlayer.com/apis/onthemarket) / Search

# OnTheMarket: Search

Search from OnTheMarket as JSON. 1 credit per successful call.

GET `/v1/onthemarket/search`

## Parameters

Send parameters in the query string.

| Parameter | Type | Required | Allowed values |
| --- | --- | --- | --- |
| `search_type` | string | Required | for-sale, to-rent |
| `location_id` | string | Required | Up to 80 characters |
| `page` | integer | Optional | Any |
| `sort_field` | string | Optional | recommended, price, update\_date |
| `direction` | string | Optional | asc, desc |
| `prop_types` | string | Optional | Up to 120 characters |
| `min_price` | integer | Optional | Any |
| `max_price` | integer | Optional | Any |
| `min_bedrooms` | integer | Optional | Any |
| `max_bedrooms` | integer | Optional | Any |
| `radius` | number | Optional | Any |
| `under_offer` | boolean | Optional | Any |
| `let_agreed` | boolean | Optional | Any |
| `exclusive_first` | boolean | Optional | Any |
| `new_home_flag` | boolean | Optional | Any |

## Example request

cURL shell 

```
curl "https://api.perceptlayer.com/v1/onthemarket/search?search_type=for-sale&location_id=london" \
  -H "X-API-Key: $API_KEY"
```

[Run this endpoint in the playground](https://perceptlayer.com/apis/onthemarket?try=search#playground) with your own parameters. 1 credit per successful call; failed calls are free.
