Skip to main content
POST
/
api
/
fotocasa
/
properties
/
search
/fotocasa/properties/search
curl --request POST \
  --url https://api.anysite.io/api/fotocasa/properties/search \
  --header 'Content-Type: application/json' \
  --header 'access-token: <api-key>' \
  --data '
{
  "location": "<string>",
  "count": 2,
  "timeout": 300,
  "transaction": "comprar",
  "property_type": "viviendas",
  "owner": "todos",
  "sort": "relevancia",
  "min_price": 1,
  "max_price": 1,
  "min_surface": 1,
  "max_surface": 1,
  "min_rooms": 1,
  "max_rooms": 1,
  "min_bathrooms": 1,
  "bank_only": false
}
'
import requests

url = "https://api.anysite.io/api/fotocasa/properties/search"

payload = {
"location": "<string>",
"count": 2,
"timeout": 300,
"transaction": "comprar",
"property_type": "viviendas",
"owner": "todos",
"sort": "relevancia",
"min_price": 1,
"max_price": 1,
"min_surface": 1,
"max_surface": 1,
"min_rooms": 1,
"max_rooms": 1,
"min_bathrooms": 1,
"bank_only": False
}
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: '<string>',
count: 2,
timeout: 300,
transaction: 'comprar',
property_type: 'viviendas',
owner: 'todos',
sort: 'relevancia',
min_price: 1,
max_price: 1,
min_surface: 1,
max_surface: 1,
min_rooms: 1,
max_rooms: 1,
min_bathrooms: 1,
bank_only: false
})
};

fetch('https://api.anysite.io/api/fotocasa/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/fotocasa/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' => '<string>',
'count' => 2,
'timeout' => 300,
'transaction' => 'comprar',
'property_type' => 'viviendas',
'owner' => 'todos',
'sort' => 'relevancia',
'min_price' => 1,
'max_price' => 1,
'min_surface' => 1,
'max_surface' => 1,
'min_rooms' => 1,
'max_rooms' => 1,
'min_bathrooms' => 1,
'bank_only' => false
]),
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/fotocasa/properties/search"

payload := strings.NewReader("{\n \"location\": \"<string>\",\n \"count\": 2,\n \"timeout\": 300,\n \"transaction\": \"comprar\",\n \"property_type\": \"viviendas\",\n \"owner\": \"todos\",\n \"sort\": \"relevancia\",\n \"min_price\": 1,\n \"max_price\": 1,\n \"min_surface\": 1,\n \"max_surface\": 1,\n \"min_rooms\": 1,\n \"max_rooms\": 1,\n \"min_bathrooms\": 1,\n \"bank_only\": false\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/fotocasa/properties/search")
.header("access-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"location\": \"<string>\",\n \"count\": 2,\n \"timeout\": 300,\n \"transaction\": \"comprar\",\n \"property_type\": \"viviendas\",\n \"owner\": \"todos\",\n \"sort\": \"relevancia\",\n \"min_price\": 1,\n \"max_price\": 1,\n \"min_surface\": 1,\n \"max_surface\": 1,\n \"min_rooms\": 1,\n \"max_rooms\": 1,\n \"min_bathrooms\": 1,\n \"bank_only\": false\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.anysite.io/api/fotocasa/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\": \"<string>\",\n \"count\": 2,\n \"timeout\": 300,\n \"transaction\": \"comprar\",\n \"property_type\": \"viviendas\",\n \"owner\": \"todos\",\n \"sort\": \"relevancia\",\n \"min_price\": 1,\n \"max_price\": 1,\n \"min_surface\": 1,\n \"max_surface\": 1,\n \"min_rooms\": 1,\n \"max_rooms\": 1,\n \"min_bathrooms\": 1,\n \"bank_only\": false\n}"

response = http.request(request)
puts response.read_body
[
  {
    "id": "<string>",
    "@type": "FotocasaPropertyCard",
    "real_estate_ad_id": "<string>",
    "url": "<string>",
    "property_type": "<string>",
    "transaction_type": "<string>",
    "price": 123,
    "price_drop": 123,
    "price_per_m2": 123,
    "surface": 123,
    "room_count": 123,
    "bathroom_count": 123,
    "floor": 123,
    "condition": "<string>",
    "antiquity": "<string>",
    "orientation": "<string>",
    "is_furnished": true,
    "created_at": "<string>",
    "is_new": true,
    "is_new_construction": true,
    "is_occupied": true,
    "is_auctioned": true,
    "is_bare_ownership": true,
    "is_rented_with_tenants": true,
    "is_premium": true,
    "has_video": true,
    "has_virtual_tour": true,
    "has_quality_seal": true,
    "features": [],
    "address": {
      "@type": "FotocasaAddress",
      "street": "<string>",
      "street_number": 123,
      "neighborhood": "<string>",
      "district": "<string>",
      "municipality": "<string>",
      "locality": "<string>",
      "region": "<string>",
      "province": "<string>",
      "autonomous_community": "<string>",
      "country": "<string>",
      "zip_code": "<string>",
      "coordinates": {
        "@type": "FotocasaCoordinates",
        "latitude": 123,
        "longitude": 123
      }
    },
    "images": [],
    "agency": {
      "@type": "FotocasaCardAgency",
      "client_id": "<string>",
      "name": "<string>",
      "type": "<string>",
      "url": "<string>",
      "publisher_id": "<string>"
    }
  }
]
{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}

Authorizations

access-token
string
header
required

API token from the dashboard

Headers

access-token
string
required

Body

application/json
location
string
required
Minimum string length: 1
count
integer
required
Required range: x >= 1
timeout
integer
default:300
Required range: 20 <= x <= 1500
transaction
enum<string>
default:comprar
Available options:
comprar,
alquiler
property_type
enum<string>
default:viviendas
Available options:
viviendas,
pisos,
apartamentos,
aticos,
duplex,
estudios,
lofts,
plantas-intermedias,
bajos,
chalets,
adosados,
casas-rurales,
locales,
oficinas,
garajes,
trasteros,
naves-industriales,
edificios,
terrenos,
terrenos-residenciales,
terrenos-urbanizables,
terrenos-industriales
feature
enum<string> | null
Available options:
obra-nueva,
terraza,
ascensor,
piscina,
jardin,
amueblado,
no-amueblado,
subasta,
nuda-propiedad,
ocupado,
con-inquilino,
con-ayudas,
chimenea,
vistas-al-mar,
en-primera-linea-de-mar,
chollo,
aisladas,
lujo,
modernas,
campo,
prefabricadas,
unifamiliares,
villa,
vpo
owner
enum<string>
default:todos
Available options:
todos,
particular
sort
enum<string>
default:relevancia
Available options:
relevancia,
recientes,
precio-asc,
precio-desc,
superficie-desc,
superficie-asc
min_price
integer | null
Required range: x >= 0
max_price
integer | null
Required range: x >= 0
min_surface
integer | null
Required range: x >= 0
max_surface
integer | null
Required range: x >= 0
min_rooms
integer | null
Required range: x >= 0
max_rooms
integer | null
Required range: x >= 0
min_bathrooms
integer | null
Required range: x >= 0
bank_only
boolean
default:false

Response

Successful Response

id
string
required
@type
string
default:FotocasaPropertyCard
real_estate_ad_id
string | null
url
string | null
property_type
string | null
transaction_type
string | null
price
integer | null
price_drop
integer | null
price_per_m2
number | null
surface
integer | null
room_count
integer | null
bathroom_count
integer | null
floor
integer | null
condition
string | null
antiquity
string | null
orientation
string | null
is_furnished
boolean | null
created_at
string | null
is_new
boolean | null
is_new_construction
boolean | null
is_occupied
boolean | null
is_auctioned
boolean | null
is_bare_ownership
boolean | null
is_rented_with_tenants
boolean | null
is_premium
boolean | null
has_video
boolean | null
has_virtual_tour
boolean | null
has_quality_seal
boolean | null
features
string[]
address
object | null
images
string[]
agency
object | null