# Carsales — 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 cars on Carsales and retrieve detailed listings with technical specifications, makes, and models. Filter and browse available vehicles by make to find exactly what you're looking for.

**Category:** Automotive | **Website:** [carsales.com/](https://carsales.com/) | **Docs:** [parse.bot/marketplace/ca19bd70-4b40-4b6c-9f12-64f666e1ddfe/carsales-com-api](https://parse.bot/marketplace/ca19bd70-4b40-4b6c-9f12-64f666e1ddfe/carsales-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-carsales-com-api-ca19bd70/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_listing_details

Retrieve full details for a specific car listing including seller description, high-resolution images, and comprehensive specifications (engine, dimensions, fuel, safety features, warranty). Requires both the listing slug and ad_id from search results.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `ad_id` | string | Yes | Listing ID from search results (e.g. OAG-AD-25870390). |
| `slug` | string | Yes | Listing slug from search results (e.g. 2023-toyota-hilux-sr5-auto-4x4-double-cab). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-carsales-com-api-ca19bd70/get_listing_details \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"ad_id":"<string>","slug":"<string>"}'
```

### get_makes

Get all car makes available on carsales.com.au. Returns a flat list of make names and slugs. Slugs are used as input to search_cars and get_models_by_make.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-carsales-com-api-ca19bd70/get_makes \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_models_by_make

Get all models available for a specific car make on carsales.com.au. Returns model names and slugs that can be used in search_cars.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `make` | string | Yes | Make slug (e.g. toyota, ford, mazda). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-carsales-com-api-ca19bd70/get_models_by_make \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"make":"<string>"}'
```

### search_cars

Search car listings on carsales.com.au with optional filters for make, model, state, and price range. Returns paginated listing summaries. Pagination uses an offset parameter (increments of ~12 per page). When make is omitted, returns all listings. Model requires make; state requires both make and model.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `make` | string | No | Car make slug (e.g. toyota, ford, mazda). |
| `max_price` | string | No | Maximum price filter as a numeric string (e.g. 50000). |
| `min_price` | string | No | Minimum price filter as a numeric string (e.g. 20000). |
| `model` | string | No | Car model slug (e.g. corolla, hilux). Requires make to be set. |
| `offset` | string | No | Results offset for pagination (e.g. 0, 12, 24). |
| `state` | string | No | Australian state slug. Requires make and model to be set. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-carsales-com-api-ca19bd70/search_cars \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"make":"<string>","max_price":"<string>","min_price":"<string>","model":"<string>","offset":"<string>","state":"<string>"}'
```
