/onthemarket/properties/search
curl --request POST \
--url https://api.anysite.io/api/onthemarket/properties/search \
--header 'Content-Type: application/json' \
--header 'access-token: <api-key>' \
--data '
{
"location_id": "<string>",
"count": 2,
"timeout": 300,
"min_price": 1,
"max_price": 1,
"min_bedrooms": 1,
"max_bedrooms": 1,
"property_type": [],
"keywords": "<string>",
"sort": "recommended",
"include_under_offer": true,
"include_let_agreed": true,
"auction": true,
"shared_ownership": true,
"new_build": true,
"retirement": true,
"student": true,
"shared_accommodation": true,
"pet_friendly": true,
"accessible_features": true,
"greener_choice": true,
"recently_reduced": true,
"matterport_tour": true,
"virtual_tour": true,
"video": true
}
'import requests
url = "https://api.anysite.io/api/onthemarket/properties/search"
payload = {
"location_id": "<string>",
"count": 2,
"timeout": 300,
"min_price": 1,
"max_price": 1,
"min_bedrooms": 1,
"max_bedrooms": 1,
"property_type": [],
"keywords": "<string>",
"sort": "recommended",
"include_under_offer": True,
"include_let_agreed": True,
"auction": True,
"shared_ownership": True,
"new_build": True,
"retirement": True,
"student": True,
"shared_accommodation": True,
"pet_friendly": True,
"accessible_features": True,
"greener_choice": True,
"recently_reduced": True,
"matterport_tour": True,
"virtual_tour": True,
"video": True
}
headers = {
"access-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'access-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
location_id: '<string>',
count: 2,
timeout: 300,
min_price: 1,
max_price: 1,
min_bedrooms: 1,
max_bedrooms: 1,
property_type: [],
keywords: '<string>',
sort: 'recommended',
include_under_offer: true,
include_let_agreed: true,
auction: true,
shared_ownership: true,
new_build: true,
retirement: true,
student: true,
shared_accommodation: true,
pet_friendly: true,
accessible_features: true,
greener_choice: true,
recently_reduced: true,
matterport_tour: true,
virtual_tour: true,
video: true
})
};
fetch('https://api.anysite.io/api/onthemarket/properties/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.anysite.io/api/onthemarket/properties/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'location_id' => '<string>',
'count' => 2,
'timeout' => 300,
'min_price' => 1,
'max_price' => 1,
'min_bedrooms' => 1,
'max_bedrooms' => 1,
'property_type' => [
],
'keywords' => '<string>',
'sort' => 'recommended',
'include_under_offer' => true,
'include_let_agreed' => true,
'auction' => true,
'shared_ownership' => true,
'new_build' => true,
'retirement' => true,
'student' => true,
'shared_accommodation' => true,
'pet_friendly' => true,
'accessible_features' => true,
'greener_choice' => true,
'recently_reduced' => true,
'matterport_tour' => true,
'virtual_tour' => true,
'video' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"access-token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.anysite.io/api/onthemarket/properties/search"
payload := strings.NewReader("{\n \"location_id\": \"<string>\",\n \"count\": 2,\n \"timeout\": 300,\n \"min_price\": 1,\n \"max_price\": 1,\n \"min_bedrooms\": 1,\n \"max_bedrooms\": 1,\n \"property_type\": [],\n \"keywords\": \"<string>\",\n \"sort\": \"recommended\",\n \"include_under_offer\": true,\n \"include_let_agreed\": true,\n \"auction\": true,\n \"shared_ownership\": true,\n \"new_build\": true,\n \"retirement\": true,\n \"student\": true,\n \"shared_accommodation\": true,\n \"pet_friendly\": true,\n \"accessible_features\": true,\n \"greener_choice\": true,\n \"recently_reduced\": true,\n \"matterport_tour\": true,\n \"virtual_tour\": true,\n \"video\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("access-token", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.anysite.io/api/onthemarket/properties/search")
.header("access-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"location_id\": \"<string>\",\n \"count\": 2,\n \"timeout\": 300,\n \"min_price\": 1,\n \"max_price\": 1,\n \"min_bedrooms\": 1,\n \"max_bedrooms\": 1,\n \"property_type\": [],\n \"keywords\": \"<string>\",\n \"sort\": \"recommended\",\n \"include_under_offer\": true,\n \"include_let_agreed\": true,\n \"auction\": true,\n \"shared_ownership\": true,\n \"new_build\": true,\n \"retirement\": true,\n \"student\": true,\n \"shared_accommodation\": true,\n \"pet_friendly\": true,\n \"accessible_features\": true,\n \"greener_choice\": true,\n \"recently_reduced\": true,\n \"matterport_tour\": true,\n \"virtual_tour\": true,\n \"video\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.anysite.io/api/onthemarket/properties/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["access-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"location_id\": \"<string>\",\n \"count\": 2,\n \"timeout\": 300,\n \"min_price\": 1,\n \"max_price\": 1,\n \"min_bedrooms\": 1,\n \"max_bedrooms\": 1,\n \"property_type\": [],\n \"keywords\": \"<string>\",\n \"sort\": \"recommended\",\n \"include_under_offer\": true,\n \"include_let_agreed\": true,\n \"auction\": true,\n \"shared_ownership\": true,\n \"new_build\": true,\n \"retirement\": true,\n \"student\": true,\n \"shared_accommodation\": true,\n \"pet_friendly\": true,\n \"accessible_features\": true,\n \"greener_choice\": true,\n \"recently_reduced\": true,\n \"matterport_tour\": true,\n \"virtual_tour\": true,\n \"video\": true\n}"
response = http.request(request)
puts response.read_body[
{
"id": "<string>",
"@type": "OnthemarketPropertyCard",
"url": "<string>",
"address": "<string>",
"property_title": "<string>",
"property_type": "<string>",
"price": 123,
"display_price": "<string>",
"short_price": "<string>",
"price_qualifier": "<string>",
"bedroom_count": 123,
"bathroom_count": 123,
"features": [],
"image": "<string>",
"images": [],
"latitude": 123,
"longitude": 123,
"main_label": "<string>",
"added_reduced_label": "<string>",
"is_spotlight": true,
"agent_id": 123,
"agent_name": "<string>",
"agent_alias": "<string>",
"agent_phone": "<string>",
"agent_image": "<string>"
}
]{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}/onthemarket
/onthemarket/properties/search
Search OnTheMarket properties for sale, to rent or new homes within a location. Returns property cards: id, url, address, property title and type, price, bedroom/bathroom counts, listing features, images, coordinates, status labels and the marketing agent. Filter by radius, price range, bedrooms, property types, keywords, how recently the listing was added, tenancy terms and a large set of include/exclude flags.
Price: 5 credits per 30 results
⚠️ Common errors: 412: Location not found
POST
/
api
/
onthemarket
/
properties
/
search
/onthemarket/properties/search
curl --request POST \
--url https://api.anysite.io/api/onthemarket/properties/search \
--header 'Content-Type: application/json' \
--header 'access-token: <api-key>' \
--data '
{
"location_id": "<string>",
"count": 2,
"timeout": 300,
"min_price": 1,
"max_price": 1,
"min_bedrooms": 1,
"max_bedrooms": 1,
"property_type": [],
"keywords": "<string>",
"sort": "recommended",
"include_under_offer": true,
"include_let_agreed": true,
"auction": true,
"shared_ownership": true,
"new_build": true,
"retirement": true,
"student": true,
"shared_accommodation": true,
"pet_friendly": true,
"accessible_features": true,
"greener_choice": true,
"recently_reduced": true,
"matterport_tour": true,
"virtual_tour": true,
"video": true
}
'import requests
url = "https://api.anysite.io/api/onthemarket/properties/search"
payload = {
"location_id": "<string>",
"count": 2,
"timeout": 300,
"min_price": 1,
"max_price": 1,
"min_bedrooms": 1,
"max_bedrooms": 1,
"property_type": [],
"keywords": "<string>",
"sort": "recommended",
"include_under_offer": True,
"include_let_agreed": True,
"auction": True,
"shared_ownership": True,
"new_build": True,
"retirement": True,
"student": True,
"shared_accommodation": True,
"pet_friendly": True,
"accessible_features": True,
"greener_choice": True,
"recently_reduced": True,
"matterport_tour": True,
"virtual_tour": True,
"video": True
}
headers = {
"access-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'access-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
location_id: '<string>',
count: 2,
timeout: 300,
min_price: 1,
max_price: 1,
min_bedrooms: 1,
max_bedrooms: 1,
property_type: [],
keywords: '<string>',
sort: 'recommended',
include_under_offer: true,
include_let_agreed: true,
auction: true,
shared_ownership: true,
new_build: true,
retirement: true,
student: true,
shared_accommodation: true,
pet_friendly: true,
accessible_features: true,
greener_choice: true,
recently_reduced: true,
matterport_tour: true,
virtual_tour: true,
video: true
})
};
fetch('https://api.anysite.io/api/onthemarket/properties/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.anysite.io/api/onthemarket/properties/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'location_id' => '<string>',
'count' => 2,
'timeout' => 300,
'min_price' => 1,
'max_price' => 1,
'min_bedrooms' => 1,
'max_bedrooms' => 1,
'property_type' => [
],
'keywords' => '<string>',
'sort' => 'recommended',
'include_under_offer' => true,
'include_let_agreed' => true,
'auction' => true,
'shared_ownership' => true,
'new_build' => true,
'retirement' => true,
'student' => true,
'shared_accommodation' => true,
'pet_friendly' => true,
'accessible_features' => true,
'greener_choice' => true,
'recently_reduced' => true,
'matterport_tour' => true,
'virtual_tour' => true,
'video' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"access-token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.anysite.io/api/onthemarket/properties/search"
payload := strings.NewReader("{\n \"location_id\": \"<string>\",\n \"count\": 2,\n \"timeout\": 300,\n \"min_price\": 1,\n \"max_price\": 1,\n \"min_bedrooms\": 1,\n \"max_bedrooms\": 1,\n \"property_type\": [],\n \"keywords\": \"<string>\",\n \"sort\": \"recommended\",\n \"include_under_offer\": true,\n \"include_let_agreed\": true,\n \"auction\": true,\n \"shared_ownership\": true,\n \"new_build\": true,\n \"retirement\": true,\n \"student\": true,\n \"shared_accommodation\": true,\n \"pet_friendly\": true,\n \"accessible_features\": true,\n \"greener_choice\": true,\n \"recently_reduced\": true,\n \"matterport_tour\": true,\n \"virtual_tour\": true,\n \"video\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("access-token", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.anysite.io/api/onthemarket/properties/search")
.header("access-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"location_id\": \"<string>\",\n \"count\": 2,\n \"timeout\": 300,\n \"min_price\": 1,\n \"max_price\": 1,\n \"min_bedrooms\": 1,\n \"max_bedrooms\": 1,\n \"property_type\": [],\n \"keywords\": \"<string>\",\n \"sort\": \"recommended\",\n \"include_under_offer\": true,\n \"include_let_agreed\": true,\n \"auction\": true,\n \"shared_ownership\": true,\n \"new_build\": true,\n \"retirement\": true,\n \"student\": true,\n \"shared_accommodation\": true,\n \"pet_friendly\": true,\n \"accessible_features\": true,\n \"greener_choice\": true,\n \"recently_reduced\": true,\n \"matterport_tour\": true,\n \"virtual_tour\": true,\n \"video\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.anysite.io/api/onthemarket/properties/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["access-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"location_id\": \"<string>\",\n \"count\": 2,\n \"timeout\": 300,\n \"min_price\": 1,\n \"max_price\": 1,\n \"min_bedrooms\": 1,\n \"max_bedrooms\": 1,\n \"property_type\": [],\n \"keywords\": \"<string>\",\n \"sort\": \"recommended\",\n \"include_under_offer\": true,\n \"include_let_agreed\": true,\n \"auction\": true,\n \"shared_ownership\": true,\n \"new_build\": true,\n \"retirement\": true,\n \"student\": true,\n \"shared_accommodation\": true,\n \"pet_friendly\": true,\n \"accessible_features\": true,\n \"greener_choice\": true,\n \"recently_reduced\": true,\n \"matterport_tour\": true,\n \"virtual_tour\": true,\n \"video\": true\n}"
response = http.request(request)
puts response.read_body[
{
"id": "<string>",
"@type": "OnthemarketPropertyCard",
"url": "<string>",
"address": "<string>",
"property_title": "<string>",
"property_type": "<string>",
"price": 123,
"display_price": "<string>",
"short_price": "<string>",
"price_qualifier": "<string>",
"bedroom_count": 123,
"bathroom_count": 123,
"features": [],
"image": "<string>",
"images": [],
"latitude": 123,
"longitude": 123,
"main_label": "<string>",
"added_reduced_label": "<string>",
"is_spotlight": true,
"agent_id": 123,
"agent_name": "<string>",
"agent_alias": "<string>",
"agent_phone": "<string>",
"agent_image": "<string>"
}
]{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
API token from the dashboard
Headers
Body
application/json
Minimum string length:
1Available options:
for-sale, to-rent, new-homes Required range:
x >= 1Required range:
20 <= x <= 1500Available options:
0, 0.25, 0.5, 1, 2, 3, 4, 5, 7.5, 10, 15, 20, 30, 40 Required range:
x >= 0Required range:
x >= 0Available options:
pcm, pw Required range:
x >= 0Required range:
x >= 0Available options:
detached, semi-detached, terraced, bungalow, flats-apartments, farms-land, park-homes Available options:
24-hours, 3-days, 7-days Available options:
recommended, price_high, price_low, recent Available options:
furnished, part-furnished, unfurnished Available options:
long-term, short-term Response
Successful Response