# Urbania — 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 for properties across Peru and get detailed information including prices, features, and images to find your ideal home. Browse location suggestions and access comprehensive listing details to make informed real estate decisions.

**Category:** Real Estate | **Website:** [urbania.pe/](https://urbania.pe/) | **Docs:** [parse.bot/marketplace/0f63ce0d-f41b-436d-9e09-ea9cbe14243f/urbania-pe-api](https://parse.bot/marketplace/0f63ce0d-f41b-436d-9e09-ea9cbe14243f/urbania-pe-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/urbania/`
**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 listing by its ID. Returns comprehensive information including description, amenities, images, prices, and publication date. The listing_id is obtained from search_listings results.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `listing_id` | string | Yes | The unique listing ID (e.g., '148560547'). Obtain from search_listings results. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/urbania/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

Search for location suggestions by name. Returns matching locations with their IDs and labels. Use the returned location_id in search_listings to scope results geographically. Each result includes a hierarchical label (district, city, department).

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `limit` | integer | No | Max number of suggestions to return. |
| `query` | string | Yes | The location name to search for (e.g., 'Lima', 'Miraflores', 'San Isidro'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/urbania/get-location-suggestions \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"limit":"<integer>","query":"<string>"}'
```

### Search listings

Search for property listings with filters including location, price range, property type, and features. Returns paginated results with listing summaries. Pagination via page number; total_pages in response indicates last page. Each listing includes pricing for all applicable operation types.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `area_max` | integer | No | Maximum area in square meters. |
| `area_min` | integer | No | Minimum area in square meters. |
| `bathrooms_min` | integer | No | Minimum number of bathrooms. |
| `bedrooms_min` | integer | No | Minimum number of bedrooms. |
| `currency_id` | integer | No | Currency for price filters. |
| `location_id` | string | No | Location ID from get_location_suggestions (e.g., 'V1-D-51119497' for Miraflores). Format is V1-{type}-{id} where type is B (province), C (department), or D (district). |
| `operation_type` | integer | No | Operation type filter. |
| `page` | integer | No | Page number for pagination. |
| `parking_min` | integer | No | Minimum number of parking spots. |
| `price_max` | integer | No | Maximum price filter. |
| `price_min` | integer | No | Minimum price filter. |
| `property_type` | integer | No | Property type filter. |
| `query` | string | No | Keyword search query. |
| `sort` | string | No | Sort order for results. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/urbania/search-listings \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"area_max":"<integer>","area_min":"<integer>","bathrooms_min":"<integer>","bedrooms_min":"<integer>","currency_id":"<integer>","location_id":"<string>","operation_type":"<integer>","page":"<integer>","parking_min":"<integer>","price_max":"<integer>","price_min":"<integer>","property_type":"<integer>","query":"<string>","sort":"<string>"}'
```

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