# Idealista — 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.

> Access data from idealista.com.

**Category:** Real Estate | **Website:** [idealista.com/](https://idealista.com/) | **Docs:** [parse.bot/marketplace/56bc5f9f-8061-4341-aeff-a7b6a3ae4116/idealista-com-api](https://parse.bot/marketplace/56bc5f9f-8061-4341-aeff-a7b6a3ae4116/idealista-com-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-idealista-com-api-56bc5f9f/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_listing_detail

Retrieve full details for a single property listing by its numeric ID. Returns title, price, full description, features list, size info, and photo URLs when available. The listing_id can be obtained from search results.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `listing_id` | string | Yes | Numeric listing ID from idealista (e.g. '111688398'). Obtainable from search_sale_listings or search_rental_listings results. |

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

### get_price_stats

Get average price-per-square-meter statistics for a location by fetching the first page of listings and computing the mean. Returns the location, operation type, average price per m², and sample size (number of listings used in the calculation).

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `location` | string | Yes | Location slug in format 'city-province' (e.g. 'madrid-madrid', 'barcelona-barcelona'). |
| `operation` | string | No | Type of operation: 'alquiler-viviendas' for rentals or 'venta-viviendas' for sales. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-idealista-com-api-56bc5f9f/get_price_stats \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"location":"<string>","operation":"<string>"}'
```

### search_rental_listings

Search for rental properties in a given location. Returns paginated listing summaries with monthly rent, size, bedrooms, and location info. Supports filtering by price range, size range, and number of bedrooms. Each page returns up to 30 listings. Pagination via page number; the response includes has_next to indicate more pages.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `filter_bedrooms` | string | No | Number of bedrooms filter (e.g. '1', '2', '3', '4'). |
| `filter_max_price` | string | No | Maximum monthly rent in Euros (e.g. '1500'). |
| `filter_max_size` | string | No | Maximum size in square meters (e.g. '120'). |
| `filter_min_price` | string | No | Minimum monthly rent in Euros (e.g. '500'). |
| `filter_min_size` | string | No | Minimum size in square meters (e.g. '40'). |
| `limit` | integer | No | Maximum number of listings to return. 0 means no limit (returns all listings on the page, up to 30). |
| `location` | string | Yes | Location slug in format 'city-province' (e.g. 'madrid-madrid', 'barcelona-barcelona', 'sevilla-sevilla', 'valencia-valencia'). |
| `page` | integer | No | Page number for pagination. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-idealista-com-api-56bc5f9f/search_rental_listings \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"filter_bedrooms":"<string>","filter_max_price":"<string>","filter_max_size":"<string>","filter_min_price":"<string>","filter_min_size":"<string>","limit":"<integer>","location":"<string>","page":"<integer>"}'
```

### search_sale_listings

Search for properties listed for sale in a given location. Returns paginated listing summaries with price, size, bedrooms, and location info. Supports filtering by price range, size range, and number of bedrooms. Each page returns up to 30 listings from idealista.com. Pagination via page number; the response includes has_next to indicate more pages.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `filter_bedrooms` | string | No | Number of bedrooms filter (e.g. '1', '2', '3', '4'). |
| `filter_max_price` | string | No | Maximum price in Euros (e.g. '500000'). |
| `filter_max_size` | string | No | Maximum size in square meters (e.g. '150'). |
| `filter_min_price` | string | No | Minimum price in Euros (e.g. '200000'). |
| `filter_min_size` | string | No | Minimum size in square meters (e.g. '50'). |
| `limit` | integer | No | Maximum number of listings to return. 0 means no limit (returns all listings on the page, up to 30). |
| `location` | string | Yes | Location slug in format 'city-province' (e.g. 'madrid-madrid', 'barcelona-barcelona', 'sevilla-sevilla', 'valencia-valencia'). |
| `page` | integer | No | Page number for pagination. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-idealista-com-api-56bc5f9f/search_sale_listings \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"filter_bedrooms":"<string>","filter_max_price":"<string>","filter_max_size":"<string>","filter_min_price":"<string>","filter_min_size":"<string>","limit":"<integer>","location":"<string>","page":"<integer>"}'
```
