# 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 for Locus Pro. Each call burns credits from your workspace balance.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/credits/carsales/`
**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

### 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/credits/carsales/get-listing-details \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/carsales/get-makes \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/carsales/get-models-by-make \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/carsales/search-cars \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"make":"<string>","max_price":"<string>","min_price":"<string>","model":"<string>","offset":"<string>","state":"<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.