# Casa — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Search and browse property listings from Casa.it, Italy's real estate marketplace. Retrieve listings by location, price, size, property type, and transaction type (sale or rent), and fetch full details for individual properties including descriptions, photos, features, and publisher information.

**Category:** Real Estate | **Website:** [casa.it/](https://casa.it/) | **Docs:** [parse.bot/marketplace/990dceb0-f94c-473f-89c8-5ed397bbc120/casa-it-api](https://parse.bot/marketplace/990dceb0-f94c-473f-89c8-5ed397bbc120/casa-it-api)

Pay-per-use API proxy. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-casa-it-api-990dceb0/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_listing_detail

Get full details for a specific property listing including description, photos, features, address, publisher info, energy class, and nearby points of interest. Returns stale_input with kind 'input_not_found' if the listing does not exist. Listing IDs are obtained from search_listings or search_mountain_homes results.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `listing_id` | string | Yes | Listing ID (numeric string, e.g., '53288364') |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-casa-it-api-990dceb0/get_listing_detail \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"listing_id":"<string>"}'
```

### get_location_suggestions

Get location autocomplete suggestions for a search query. Returns locations (cities, provinces, regions, zones, metro lines) with their hkey identifiers for use in search_listings and search_mountain_homes. Each location carries an hkey string that uniquely identifies it in downstream search endpoints, plus lat/lon coordinates and an approximate listings_count.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `query` | string | Yes | Search query for location (e.g., 'Roma', 'Milano') |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-casa-it-api-990dceb0/get_location_suggestions \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"<string>"}'
```

### get_property_types

Get available residential property types and their values for use in search filters. Returns a static list of property type labels and values. Use the value field in the property_types parameter of search_listings.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-casa-it-api-990dceb0/get_property_types \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### search_listings

Search for property listings with various filters including location, price, size, rooms, and property type. Returns paginated results with listing summaries. Each listing includes id, title, features (price, mq, rooms, bathrooms), geoInfos, publisher, and media. Use location_hkey from get_location_suggestions to scope the search geographically.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `bathrooms` | integer | No | Minimum number of bathrooms |
| `location_hkey` | string | No | Location hash key from get_location_suggestions (e.g., 'a0d22860' for Roma) |
| `mq_max` | integer | No | Maximum size in square meters |
| `mq_min` | integer | No | Minimum size in square meters |
| `page` | integer | No | Page number (1-indexed) |
| `price_max` | integer | No | Maximum price in euros |
| `price_min` | integer | No | Minimum price in euros |
| `property_types` | array | No | JSON array of property type values from get_property_types (e.g., ["appartamento", "villa"]) |
| `rooms` | integer | No | Minimum number of rooms |
| `size` | integer | No | Results per page (max 50) |
| `sort` | string | No | Sort order for results |
| `transaction_type` | string | No | Transaction type: 'vendita' (sale) or 'affitto' (rent) |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-casa-it-api-990dceb0/search_listings \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"bathrooms":"<integer>","location_hkey":"<string>","mq_max":"<integer>","mq_min":"<integer>","page":"<integer>","price_max":"<integer>","price_min":"<integer>","property_types":"<array>","rooms":"<integer>","size":"<integer>","sort":"<string>","transaction_type":"<string>"}'
```

### search_mountain_homes

Search for rural and mountain-style property types (baite, bungalow, chalet, trulli) with optional location and price/size filters. Returns paginated results in the same shape as search_listings. This is a convenience endpoint equivalent to search_listings with property_types set to mountain/rural types.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `location_hkey` | string | No | Location hash key from get_location_suggestions |
| `mq_max` | integer | No | Maximum size in square meters |
| `mq_min` | integer | No | Minimum size in square meters |
| `page` | integer | No | Page number (1-indexed) |
| `price_max` | integer | No | Maximum price in euros |
| `price_min` | integer | No | Minimum price in euros |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-casa-it-api-990dceb0/search_mountain_homes \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"location_hkey":"<string>","mq_max":"<integer>","mq_min":"<integer>","page":"<integer>","price_max":"<integer>","price_min":"<integer>"}'
```
