# 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. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-urbania-pe-api-0f63ce0d/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## 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/parse-urbania-pe-api-0f63ce0d/get_listing_detail \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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/parse-urbania-pe-api-0f63ce0d/get_location_suggestions \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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/parse-urbania-pe-api-0f63ce0d/search_listings \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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>"}'
```
