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

> Access data from kwmexico.mx.

**Category:** Real Estate | **Website:** [kwmexico.mx/](https://kwmexico.mx/) | **Docs:** [parse.bot/marketplace/bc81a21d-5459-4e68-a7e8-55efef869d21/kwmexico-mx-api](https://parse.bot/marketplace/bc81a21d-5459-4e68-a7e8-55efef869d21/kwmexico-mx-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-kwmexico-mx-api-bc81a21d/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_listing

Retrieve full details of a single listing by its URL or property ID. Returns complete property information including all photo URLs, agent details, and market center source. The listing_url can be a full KW Mexico property URL or a numeric property ID.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `listing_url` | string | Yes | Full KW Mexico listing URL (e.g. 'https://www.kwmexico.mx/Sections/Propiedades/propiedad_detalles.html?Filtro_Propiedad=1313') or a numeric property ID (e.g. '1313'). Property IDs are returned by search_listings as property_id. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-kwmexico-mx-api-bc81a21d/get_listing \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"listing_url":"<string>"}'
```

### search_listings

Search active real estate listings filtered by state, optional city (municipio/alcaldía), and listing category (venta or renta). Returns paginated results with 30 listings per page. Each result includes property details, location, pricing, and a single thumbnail image. Use get_listing with the returned listing_url for full photo galleries and agent details.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `city` | string | No | Municipality or alcaldía within the state (e.g. 'Coyoacán', 'Corregidora'). When omitted, returns listings from all cities in the state. |
| `listing_category` | string | Yes | Type of listing operation. |
| `page` | integer | No | Page number for pagination (30 results per page). |
| `state` | string | Yes | Mexican state name (e.g. 'Ciudad de México', 'Querétaro', 'Guanajuato'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-kwmexico-mx-api-bc81a21d/search_listings \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"city":"<string>","listing_category":"<string>","page":"<integer>","state":"<string>"}'
```
