# 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 for Locus Pro. Each call burns credits from your workspace balance.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/credits/casa-sapo/`
**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 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/credits/casa-sapo/get-listing-detail \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/casa-sapo/search-listings-for-rent \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/casa-sapo/search-listings-for-sale \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/casa-sapo/search-new-listings \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/casa-sapo/search-price-reduced-listings \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"location":"<string>","pn":"<integer>"}'
```

## Next steps

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