# Casa Sapo — 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 Portuguese real estate listings from Casa Sapo for both sale and rent, view detailed property information, access bank-owned properties, and analyze market statistics to make informed decisions. Track new listings and price reductions to stay updated on the latest opportunities in the Portuguese property market.

**Category:** Real Estate | **Website:** [casasapo.pt/](https://casasapo.pt/) | **Docs:** [parse.bot/marketplace/4ae3d4c8-5192-44e6-b217-ace597596f1d/casasapo-pt-api](https://parse.bot/marketplace/4ae3d4c8-5192-44e6-b217-ace597596f1d/casasapo-pt-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-casasapo-pt-api-4ae3d4c8/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_listing_detail

Get full details of a single property listing including title, price, description text, and structured features. Requires the full listing URL obtained from any search endpoint's results.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `url` | string | Yes | Full URL of the listing detail page from search results (e.g. 'https://casa.sapo.pt/comprar-apartamento-t2-lisboa-<slug>.html?g3pid=<id>'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-casasapo-pt-api-4ae3d4c8/get_listing_detail \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"<string>"}'
```

### search_listings_for_rent

Search for properties for rent on Casa Sapo. Filters include location, property type, price range, area range, and typology. Returns one page of listing summaries per call; advance with the pn parameter.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `location` | string | Yes | Location slug identifying the area to search in (e.g. 'lisboa', 'porto', 'faro'). |
| `max_area` | integer | No | Maximum area in square meters. |
| `max_price` | integer | No | Maximum price in Euros. |
| `min_area` | integer | No | Minimum area in square meters. |
| `min_price` | integer | No | Minimum price in Euros. |
| `pn` | integer | No | Page number. |
| `property_type` | string | No | Property type filter. |
| `typology` | string | No | Typology (number of bedrooms) filter. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-casasapo-pt-api-4ae3d4c8/search_listings_for_rent \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"location":"<string>","max_area":"<integer>","max_price":"<integer>","min_area":"<integer>","min_price":"<integer>","pn":"<integer>","property_type":"<string>","typology":"<string>"}'
```

### search_listings_for_sale

Search for properties for sale on Casa Sapo. Filters include location, property type, price range, area range, and typology. Returns one page of listing summaries per call; advance with the pn parameter. Each page contains up to ~30 results.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `location` | string | Yes | Location slug identifying the area to search in (e.g. 'lisboa', 'porto', 'faro', 'braga'). |
| `max_area` | integer | No | Maximum area in square meters. |
| `max_price` | integer | No | Maximum price in Euros. |
| `min_area` | integer | No | Minimum area in square meters. |
| `min_price` | integer | No | Minimum price in Euros. |
| `pn` | integer | No | Page number. |
| `property_type` | string | No | Property type filter. |
| `typology` | string | No | Typology (number of bedrooms) filter. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-casasapo-pt-api-4ae3d4c8/search_listings_for_sale \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"location":"<string>","max_area":"<integer>","max_price":"<integer>","min_area":"<integer>","min_price":"<integer>","pn":"<integer>","property_type":"<string>","typology":"<string>"}'
```

### search_new_listings

Search for apartment listings published in the last 8 days. Returns recently added properties for a given location. Useful for monitoring new inventory.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `location` | string | No | Location slug (e.g. 'lisboa', 'porto'). |
| `pn` | integer | No | Page number. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-casasapo-pt-api-4ae3d4c8/search_new_listings \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"location":"<string>","pn":"<integer>"}'
```

### search_price_reduced_listings

Search for apartment listings with recent price reductions. Results include the current price, previous price, and reduction percentage. Inventory is typically limited (fewer than 10 results per location).

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `location` | string | No | Location slug (e.g. 'lisboa', 'porto'). |
| `pn` | integer | No | Page number. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-casasapo-pt-api-4ae3d4c8/search_price_reduced_listings \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"location":"<string>","pn":"<integer>"}'
```
