# Onthemarket — 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 rental homes on OnTheMarket.com by location, price, bedrooms, property type, and keywords to find your next place to live. Filter results across thousands of available rentals to narrow down properties that match your specific needs and budget.

**Category:** Real Estate | **Website:** [www.onthemarket.com/](https://www.onthemarket.com/) | **Docs:** [parse.bot/marketplace/63fdcbff-afea-47ea-a5b6-7adae2159ae0/onthemarket-com-api](https://parse.bot/marketplace/63fdcbff-afea-47ea-a5b6-7adae2159ae0/onthemarket-com-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/onthemarket/`
**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

### Search rentals

Search rental properties by location with optional filters for price range (PCM), bedroom count, property type, and keywords. Returns paginated results with 30 properties per page, auto-iterated by the SDK. Results include address, price, bedrooms, bathrooms, features, agent details, and coordinates.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `keywords` | string | No | Keyword filter for property descriptions (e.g. 'garden', 'air-conditioning', 'parking'). |
| `location` | string | Yes | UK postcode (e.g. 'SW1A 1AA') or area/city name (e.g. 'london', 'manchester'). Resolved to a location slug via the OnTheMarket autocomplete API. |
| `max_bedrooms` | integer | No | Maximum number of bedrooms. |
| `max_price` | integer | No | Maximum monthly rent in GBP (per calendar month). |
| `min_bedrooms` | integer | No | Minimum number of bedrooms. |
| `min_price` | integer | No | Minimum monthly rent in GBP (per calendar month). |
| `page` | integer | No | Page number for pagination (30 results per page). |
| `property_type` | string | No | Filter by property type. When omitted, all property types are returned. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/onthemarket/search-rentals \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"keywords":"<string>","location":"<string>","max_bedrooms":"<integer>","max_price":"<integer>","min_bedrooms":"<integer>","min_price":"<integer>","page":"<integer>","property_type":"<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.