Skip to content
Scrappa Get API key
Casa.it API 1 credit/request

Casa.it Listing Search

GET https://scrappa.co/api/casa_it/search?transaction=vendita&location=roma

Search Casa.it residential listings for sale (vendita) or rent (affitto) in an Italian town, province or region. Each listing has its id, url, title, description (Markdown and plain text), transaction, property type, price as an integer in euros, surface in square meters, rooms, bathrooms, floor, energy class, location with coordinates, publisher, images and flags for video and floor plan. Casa.it returns 20 listings per page and serves at most 80 pages per search, so narrow large cities with price_min, price_max and rooms. Get the location slug from the locations endpoint. A valid search without matches is a successful empty list. Unknown locations answer 404 and are not billed.

Casa.it Listing Search 1 credit/request

Endpoint

Request preview
GET
https://scrappa.co/api/casa_it/search?transaction=vendita&location=roma
Auth header
x-api-key
Cost
1 credit/request
transaction = vendita location = roma
Response preview
200 OK
{
    "success": true,
    "data": {
        "total": 20448,
        "pagination": {
            "page": 1,
            "per_page": 20,
            "total_pages": 80,
            "total": 20448
        },
        "listings": [
            {
                "id": 54994089,
                "url": "https://www.casa.it/immobili/54994089/",
...

Parameters

Start with the required fields, then add optional filters only when your use case needs them.

Runnable path

2 required parameters needed before sending a request.

4 optional filters available.

transaction string Required

vendita (sale) or affitto (rent). The English words sale and rent also work. Example: vendita.

Example value vendita
location string Required

Casa.it slug of a town, province or region from the locations endpoint, e.g. roma, milano or lazio.

Example value roma
page integer Optional

Page number, 1 to 80, 20 listings per page. Default: 1

Example value 1
price_min integer Optional

Minimum price in euros (monthly rent for affitto).

Example value 10
price_max integer Optional

Maximum price in euros (monthly rent for affitto). Must not be below price_min.

Example value 10
rooms integer Optional

Exact number of rooms, 1 to 4.

Example value 10

Request Examples

PHP
<?php

$curl = curl_init();

curl_setopt_array($curl, [
    CURLOPT_URL => "https://scrappa.co/api/casa_it/search?transaction=vendita&location=roma",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => "GET",
    CURLOPT_HTTPHEADER => [
        "x-api-key: YOUR_API_KEY_HERE"
    ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
    echo "cURL Error #:" . $err;
} else {
    echo $response;
}
PHP
<?php

use Illuminate\Support\Facades\Http;

$response = Http::timeout(30)
    ->withHeaders(['x-api-key' => 'YOUR_API_KEY_HERE'])
    ->get('https://scrappa.co/api/casa_it/search?transaction=vendita&location=roma');

if ($response->successful()) {
    echo $response->body();
} else {
    echo "Error: " . $response->status();
}
JavaScript
const options = {
    method: 'GET',
    headers: {
        'x-api-key': 'YOUR_API_KEY_HERE'
    }
};

fetch('https://scrappa.co/api/casa_it/search?transaction=vendita&location=roma', options)
    .then(response => {
        if (!response.ok) {
            throw new Error(`HTTP error! status: ${response.status}`);
        }
        return response.text();
    })
    .then(data => console.log(data))
    .catch(error => console.error('Error:', error));
JavaScript
const axios = require('axios');

const options = {
    method: 'GET',
    url: 'https://scrappa.co/api/casa_it/search?transaction=vendita&location=roma',
    headers: {
        x-api-key: 'YOUR_API_KEY_HERE',
    }
};

try {
    const response = await axios(options);
    console.log(response.data);
} catch (error) {
    console.error('Error:', error.message);
}
Ruby
require 'net/http'
require 'uri'

uri = URI.parse("https://scrappa.co/api/casa_it/search?transaction=vendita&location=roma")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == 'https'

request = Net::HTTP::Get.new(uri.request_uri)
request['x-api-key'] = 'YOUR_API_KEY_HERE'

begin
    response = http.request(request)
    puts response.body
rescue => e
    puts "Error: #{e.message}"
end
Python
import http.client
import json

conn = http.client.HTTPSConnection("scrappa.co")

headers = {
    'x-api-key': 'YOUR_API_KEY_HERE',
}

try:
    conn.request("GET", "/api/casa_it/search?transaction=vendita&location=roma", headers=headers)
    res = conn.getresponse()
    data = res.read()
    print(data.decode("utf-8"))
except Exception as e:
    print(f"Error: {e}")
finally:
    conn.close()
Python
import requests

headers = {
    'x-api-key': 'YOUR_API_KEY_HERE',
}

try:
    response = requests.get('https://scrappa.co/api/casa_it/search?transaction=vendita&location=roma', headers=headers)
    response.raise_for_status()
    print(response.text)
except requests.exceptions.RequestException as e:
    print(f"Error: {e}")
Java
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.Response;
import java.io.IOException;

public class ApiExample {
    public static void main(String[] args) {
        OkHttpClient client = new OkHttpClient();

        Request request = new Request.Builder()
            .url("https://scrappa.co/api/casa_it/search?transaction=vendita&location=roma")
        .addHeader("x-api-key", "YOUR_API_KEY_HERE")
            .build();

        try (Response response = client.newCall(request).execute()) {
            if (response.isSuccessful()) {
                System.out.println(response.body().string());
            } else {
                System.out.println("Error: " + response.code());
            }
        } catch (IOException e) {
            System.out.println("Error: " + e.getMessage());
        }
    }
}
Go
package main

import (
    "fmt"
    "net/http"
    "io/ioutil"
)

func main() {
    client := &http.Client{}
    req, err := http.NewRequest("GET", "https://scrappa.co/api/casa_it/search?transaction=vendita&location=roma", nil)
    if err != nil {
        fmt.Println("Error creating request:", err)
        return
    }
    req.Header.Set("x-api-key", "YOUR_API_KEY_HERE")

    resp, err := client.Do(req)
    if err != nil {
        fmt.Println("Error making request:", err)
        return
    }
    defer resp.Body.Close()

    body, err := ioutil.ReadAll(resp.Body)
    if err != nil {
        fmt.Println("Error reading response:", err)
        return
    }

    fmt.Println(string(body))
}
Terminal
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/casa_it/search?transaction=vendita&location=roma"
C#
using System;
using System.Net.Http;
using System.Threading.Tasks;

class Program
{
    static async Task Main()
    {
        using var client = new HttpClient();
        client.DefaultRequestHeaders.Add("x-api-key", "YOUR_API_KEY_HERE");

        try
        {
            var response = await client.SendAsync(new HttpRequestMessage(HttpMethod.Get, "https://scrappa.co/api/casa_it/search?transaction=vendita&location=roma"));
            var content = await response.Content.ReadAsStringAsync();
            Console.WriteLine(content);
        }
        catch (Exception ex)
        {
            Console.WriteLine($"Error: {ex.Message}");
        }
    }
}
TypeScript
import axios from 'axios';

async function run(): Promise<void> {
    try {
        const response = await axios({
            method: 'GET',
            url: 'https://scrappa.co/api/casa_it/search?transaction=vendita&location=roma',
            headers: {
        'x-api-key': 'YOUR_API_KEY_HERE',
            },
        });

        console.log(response.data);
    } catch (error) {
        console.error('Error:', error);
    }
}

void run();
RUST
use reqwest::Client;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = Client::new();

    let response = client
        .get("https://scrappa.co/api/casa_it/search?transaction=vendita&location=roma")
        .header("x-api-key", "YOUR_API_KEY_HERE")
        .send()
        .await?;

    println!("{}", response.text().await?);

    Ok(())
}

Response Schema

Example response fields are illustrative; inspect the JSON before integrating.

Example response fields

Scan these fields before integrating.

success data meta
JSON Response
200 OK
{
    "success": true,
    "data": {
        "total": 20448,
        "pagination": {
            "page": 1,
            "per_page": 20,
            "total_pages": 80,
            "total": 20448
        },
        "listings": [
            {
                "id": 54994089,
                "url": "https://www.casa.it/immobili/54994089/",
                "title": "Bilocale in Via di Monte del Gallo",
                "description": "SAN PIETRO - GREGORIO VII RISTRUTTURATO  San Pietro adiacenze e precisamente in Via Monte Del Gallo in signorile palazzina d'epoca di soli 3 piani proponiamo in vendita un appartamento posto al primo piano con affacci...",
                "description_text": "SAN PIETRO - GREGORIO VII RISTRUTTURATO San Pietro adiacenze e precisamente in Via Monte Del Gallo in signorile palazzina d'epoca di soli 3 piani proponiamo in vendita un appartamento posto al primo piano con affaccio...",
                "transaction": "vendita",
                "property_group": "case",
                "property_type": "appartamento",
                "price": 285000,
                "currency": "EUR",
                "surface_sqm": 35,
                "rooms": 2,
                "bathrooms": 1,
                "floor": "1\u00b0 piano",
                "location": {
                    "street": "Via di Monte del Gallo",
                    "district": "Gregorio VII, Baldo degli Ubaldi",
                    "neighborhood": "Gregorio VII",
                    "city": "Roma",
                    "province": "RM",
                    "province_name": "Roma",
                    "region": "Lazio",
                    "latitude": 41.896132,
                    "longitude": 12.452044
                },
                "publisher": {
                    "id": 59770,
                    "type": "agency",
                    "name": "CASAINCONTRO SRL",
                    "address": "Roma, Via Orti della Farnesina 146",
                    "phone": "0685871328",
                    "website": "http://www.casaincontro.com",
                    "url": "https://www.casa.it/agenzie/casaincontro-srl-59770/"
                },
                "images": [
                    "https://images-1.casa.it/800x600/listing/0/1e/20/b3/848233198.jpg",
                    "https://images-1.casa.it/800x600/listing/0/2b/26/54/848233199.jpg",
                    "https://images-1.casa.it/800x600/listing/0/72/d0/ec/848233200.jpg"
                ],
                "has_video": false,
                "has_floorplan": true
            },
            {
                "id": 54737192,
                "url": "https://www.casa.it/immobili/54737192/",
                "title": "Trilocale in Via di Monte del Gallo",
                "description": "GREGORIO VII AD. SAN PIETRO in contesto tranquillo e silenzioso, proponiamo in vendita una porzione di villino d\u2019epoca degli anni \u201920, situata in posizione riservata e non fronte strada con affaccio su gradevoli giard...",
                "description_text": "GREGORIO VII AD. SAN PIETRO in contesto tranquillo e silenzioso, proponiamo in vendita una porzione di villino d\u2019epoca degli anni \u201920, situata in posizione riservata e non fronte strada con affaccio su gradevoli giard...",
                "transaction": "vendita",
                "property_group": "case",
                "property_type": "appartamento",
                "price": 399000,
                "currency": "EUR",
                "surface_sqm": 80,
                "rooms": 3,
                "bathrooms": 1,
                "floor": "1\u00b0 piano",
                "location": {
                    "street": "Via di Monte del Gallo",
                    "district": "Gregorio VII, Baldo degli Ubaldi",
                    "neighborhood": "Gregorio VII",
                    "city": "Roma",
                    "province": "RM",
                    "province_name": "Roma",
                    "region": "Lazio",
                    "latitude": 41.896132,
                    "longitude": 12.452044
                },
                "publisher": {
                    "id": 59770,
                    "type": "agency",
                    "name": "CASAINCONTRO SRL",
                    "address": "Roma, Via Orti della Farnesina 146",
                    "phone": "0685871328",
                    "website": "http://www.casaincontro.com",
                    "url": "https://www.casa.it/agenzie/casaincontro-srl-59770/"
                },
                "images": [
                    "https://images-1.casa.it/800x600/listing/0/3c/2f/b7/840002274.jpg",
                    "https://images-1.casa.it/800x600/listing/0/19/c8/8f/840002079.jpg",
                    "https://images-1.casa.it/800x600/listing/0/31/46/7e/837677891.jpg"
                ],
                "has_video": false,
                "has_floorplan": true
            }
        ]
    },
    "meta": {
        "endpoint_family": "search",
        "billable": true
    }
}

Errors

Handle these documented responses before retrying or showing customer-facing failures.

422

Validation Error

A required query parameter is missing or invalid. This response is not billable.

{
    "errors": {
        "transaction": [
            "The transaction must be vendita (sale) or affitto (rent)."
        ]
    },
    "message": "The request validation failed"
}
404

Resource Not Found

The Casa.it location does not exist. This response is not billable.

{
    "meta": {
        "billable": false,
        "retryable": false,
        "endpoint_family": "search"
    },
    "error": {
        "code": "NOT_FOUND",
        "message": "The requested Casa.it resource was not found."
    },
    "success": false
}
503

Source Temporarily Blocked

The upstream service is temporarily unavailable. Please retry shortly.

{
    "meta": {
        "billable": false,
        "retryable": true,
        "endpoint_family": "search"
    },
    "error": {
        "code": "UPSTREAM_BLOCKED",
        "message": "The Casa.it data is temporarily unavailable. Please retry."
    },
    "success": false
}
503

Service Unavailable

Casa.it could not be reached or answered with a page that no longer matches the documented contract. This response is not billable.

{
    "meta": {
        "billable": false,
        "retryable": true,
        "endpoint_family": "search"
    },
    "error": {
        "code": "upstream_unavailable",
        "message": "The upstream service is temporarily unavailable. Please retry shortly."
    },
    "success": false
}

Generate Code with AI

Copy a ready-made prompt with all the endpoint details, parameters, and example responses. Paste it into ChatGPT, Claude, or any AI assistant to instantly generate working code.

Try It Live

Test this endpoint in our interactive playground with real data.