# CarsForSale.com — 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 vehicle listings and browse detailed car inventory by make, model, and trim to find the perfect vehicle on CarsForSale.com. Access comprehensive listing details including pricing, specifications, and availability all in one place.

**Category:** Automotive | **Website:** [carsforsale.com/](https://carsforsale.com/) | **Docs:** [parse.bot/marketplace/0380d98d-1de8-4040-8475-46ee65fc46dc/carsforsale-com-api](https://parse.bot/marketplace/0380d98d-1de8-4040-8475-46ee65fc46dc/carsforsale-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/carsforsale-com/`
**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

Get market analytics for a specific vehicle listing including national average price, days on market, popularity, depreciation history, price history across dealers, and available images. The listing_id (globalInventoryId) is obtained from search_listings results.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `listing_id` | string | Yes | The globalInventoryId of the listing, obtainable from search_listings results. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/carsforsale-com/get-listing-details \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"listing_id":"<string>"}'
```

### Get makes

Get available vehicle makes and popular search categories from the homepage. Returns a sorted list of makes (e.g. Toyota, Honda) intermixed with popular search categories (e.g. Cheap Cars, Diesel Trucks).

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/carsforsale-com/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 available models for a specific vehicle make. Each model includes its slug name and a display name with the count of available listings.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `make` | string | Yes | Vehicle make name (e.g. Toyota, Honda, Ford, Chevrolet). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/carsforsale-com/get-models-by-make \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"make":"<string>"}'
```

### Get trims by make model

Get available trims for a specific vehicle make and model combination. Returns the list of trim levels found for that make/model across all listings.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `make` | string | Yes | Vehicle make name (e.g. Toyota, Honda, Ford). |
| `model` | string | Yes | Vehicle model name (e.g. Camry, Accord, F-150). Must match the Value field from get_models_by_make. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/carsforsale-com/get-trims-by-make-model \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"make":"<string>","model":"<string>"}'
```

### Search listings

Search for newly listed vehicle listings near a zip code. Returns recently added vehicles, optionally filtered by make. Results are not paginated and typically return up to ~24 listings. Each listing includes price, mileage, dealer info, and image URLs.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `make` | string | No | Filter results by vehicle make (e.g. Toyota, Honda, Ford). Case-insensitive partial match. |
| `zip_code` | string | No | US zip code to search near. Omitting returns listings from a default/national scope. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/carsforsale-com/search-listings \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"make":"<string>","zip_code":"<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.