# Casa — Wrapped API

> **You are on:** `https://api.beta.paywithlocus.com/api` | [llms.txt](https://beta.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 for Locus Pro. Each call burns credits from your workspace balance.

## Access

**Base URL:** `https://api.beta.paywithlocus.com/api/wrapped/credits/casa/`
**Auth:** `Authorization: Bearer <LOCUS_CREDITS_SECRET_KEY>` (an `lcr_` secret key or a scoped `lcac_` agent credential)
**Required header:** `Idempotency-Key: <fresh UUID per call>`. A retry with the same key replays the stored result without a new charge.
**Response:** the provider response after any endpoint-specific normalization. `X-Locus-Credits-Charged` carries the charge and `X-Locus-Credits-Balance` the remaining balance. Insufficient credits return `402` before the provider is called.
**Pricing:** estimated costs below are USD. Locus debits the credit equivalent at your workspace rate.

Full call contract: https://docs.paywithlocus.com/api-reference/introduction

> Using a Pay With Locus wallet key (`claw_` prefix)? Wallet routes are documented separately: https://docs.paywithlocus.com/wrapped-apis/for-agents

## 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.beta.paywithlocus.com/api/wrapped/credits/casa/get-listing-detail \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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.beta.paywithlocus.com/api/wrapped/credits/casa/get-location-suggestions \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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.beta.paywithlocus.com/api/wrapped/credits/casa/get-property-types \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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.beta.paywithlocus.com/api/wrapped/credits/casa/search-listings \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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.beta.paywithlocus.com/api/wrapped/credits/casa/search-mountain-homes \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"location_hkey":"<string>","mq_max":"<integer>","mq_min":"<integer>","page":"<integer>","price_max":"<integer>","price_min":"<integer>"}'
```

## Next steps

- [All wrapped API providers](https://beta.paywithlocus.com/wapi/index.md): pick another provider.
- [Find and call tools](https://beta.paywithlocus.com/agent/tools.md): price ceilings, async results, and errors.
- [Credits and billing](https://beta.paywithlocus.com/agent/billing.md): what a call costs and how to add credits.
- [Agent docs index](https://beta.paywithlocus.com/agent/index.md): every Locus agent page.