# Propiedades — 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 real estate listings from Mexico's Propiedades.com, view detailed property information including images and descriptions, and use location autocomplete to find homes in your desired area. Access comprehensive listing data to compare properties and make informed real estate decisions.

**Category:** Real Estate | **Website:** [propiedades.com/](https://propiedades.com/) | **Docs:** [parse.bot/marketplace/380a1921-d927-4f9a-b71a-811c38737788/propiedades-com-api](https://parse.bot/marketplace/380a1921-d927-4f9a-b71a-811c38737788/propiedades-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-propiedades-com-api-380a1921/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_listing_detail

Get full details for a specific property listing by its URL slug or ID. Includes gallery images from a separate API.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `url` | string | Yes | The listing URL or slug (e.g., '/inmuebles/casa-en-venta-...') |

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

### get_property_images

Get gallery images for a specific property listing by its numeric ID. Returns a list of image objects with CDN URLs, dimensions, and original source URLs. The property_id is obtained from search_listings results (properties[*].id).

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `property_id` | string | Yes | The numeric property ID from search_listings results (properties[*].id). For example '31256608'. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-propiedades-com-api-380a1921/get_property_images \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"property_id":"<string>"}'
```

### search_listings

Search for property listings by direction ID. Returns paginated results with detailed property information including price, address, bedrooms, bathrooms, size, coordinates, and amenities. The direction_id is obtained from the search_location endpoint results (directions[*].id). Supports sorting by price and filtering by purpose (sale/rent) and property type (residential/commercial/industrial). Each page returns up to 47 listings.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `direction_id` | string | Yes | The numeric direction ID from search_location results (directions[*].id). For example '733' for Roma Norte or '138360' for DF/CDMX state. |
| `order` | string | No | Sort order for results. Accepted values: 'precio-asc' (price low to high), 'precio-desc' (price high to low), 'default' (site default relevance). When set to 'default' or omitted, the site returns results in its default order. |
| `page` | integer | No | Pagination page number. |
| `property_type` | integer | No | Property category: 1 for residential, 2 for commercial, 3 for industrial. |
| `purpose` | integer | No | Transaction type: 1 for sale (venta), 2 for rent (renta). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-propiedades-com-api-380a1921/search_listings \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"direction_id":"<string>","order":"<string>","page":"<integer>","property_type":"<integer>","purpose":"<integer>"}'
```

### search_location

Get location suggestions for a search query. Returns neighborhoods, cities, and areas in Mexico with direction IDs for use with search_listings. Each result includes geographic coordinates and an associated URL on propiedades.com.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `query` | string | Yes | Search query for a city, neighborhood, or area in Mexico (e.g. 'Guadalajara', 'Ciudad de Mexico', 'Roma Norte'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-propiedades-com-api-380a1921/search_location \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"<string>"}'
```
