# Comparis — 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 compare real estate listings, cars, and mortgage interest rates across the Swiss marketplace Comparis.ch with detailed filtering options and property/vehicle information. Get current mortgage rates and access comprehensive details on available properties and cars to make informed buying or financing decisions.

**Category:** Real Estate | **Website:** [comparis.ch/](https://comparis.ch/) | **Docs:** [parse.bot/marketplace/69b292b8-a21e-48b7-b365-412faf714b7c/comparis-ch-api](https://parse.bot/marketplace/69b292b8-a21e-48b7-b365-412faf714b7c/comparis-ch-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-comparis-ch-api-69b292b8/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_car_detail

Fetches full details for a single car listing including main information, technical details, features, pricing with market comparison, and contact information. Requires an ad_id from search_cars results.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `ad_id` | string | Yes | Car listing ID from search_cars results (AdID field). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-comparis-ch-api-69b292b8/get_car_detail \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"ad_id":"<string>"}'
```

### get_car_filters

Returns available car makes for use as filter values in the car search endpoint. Model groups and models are null until a make is selected via search.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-comparis-ch-api-69b292b8/get_car_filters \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_mortgage_rates

Fetches current benchmark mortgage interest rates for various terms and providers in Switzerland. Includes the Comparis benchmark offer, individual provider rates, term-based min/max ranges, and provider footnotes.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-comparis-ch-api-69b292b8/get_mortgage_rates \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_real_estate_detail

Fetches full details for a single real estate listing including property information, pricing breakdown, features, map data, and contact details. Requires an ad_id from search_real_estate results.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `ad_id` | string | Yes | Listing ID from search_real_estate results (AdId field). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-comparis-ch-api-69b292b8/get_real_estate_detail \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"ad_id":"<string>"}'
```

### get_real_estate_filters

Returns the fixed vocabulary of deal types, property types, and sort options accepted by the real estate search endpoint. No parameters required; the response is static reference data.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-comparis-ch-api-69b292b8/get_real_estate_filters \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### search_cars

Searches for car listings with optional filters for make, model, vehicle type, year, price, and mileage. Returns paginated results. total_count may be null.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `make` | string | No | Make ID from get_car_filters (MakeId field). |
| `mileage_to` | integer | No | Maximum mileage in km. |
| `model` | string | No | Model ID from get_car_filters. |
| `page` | integer | No | Page number for pagination. |
| `price_to` | integer | No | Maximum price in CHF. |
| `vehicle_type` | integer | No | Vehicle condition type. |
| `year_from` | integer | No | Minimum year of first registration. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-comparis-ch-api-69b292b8/search_cars \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"make":"<string>","mileage_to":"<integer>","model":"<string>","page":"<integer>","price_to":"<integer>","vehicle_type":"<integer>","year_from":"<integer>"}'
```

### search_real_estate

Searches for real estate listings with optional filters for location, deal type, property type, price range, area, and room count. Returns paginated results ordered by the chosen sort criteria. Pagination is page-based starting at 1. total_count may be null on some queries.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `area_from` | integer | No | Minimum living space in m2. |
| `area_to` | integer | No | Maximum living space in m2. |
| `deal_type` | integer | No | Deal type ID. |
| `location` | string | No | City name or postal code to search in. |
| `page` | integer | No | Page number for pagination. |
| `price_from` | integer | No | Minimum price. |
| `price_to` | integer | No | Maximum price. |
| `property_types` | string | No | Comma-separated property type IDs (e.g. '1,10'). IDs from get_real_estate_filters. |
| `rooms_from` | number | No | Minimum number of rooms. |
| `rooms_to` | number | No | Maximum number of rooms. |
| `sort` | integer | No | Sort criteria ID. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-comparis-ch-api-69b292b8/search_real_estate \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"area_from":"<integer>","area_to":"<integer>","deal_type":"<integer>","location":"<string>","page":"<integer>","price_from":"<integer>","price_to":"<integer>","property_types":"<string>","rooms_from":"<number>","rooms_to":"<number>","sort":"<integer>"}'
```
