# AutoTrader.ca Search API Documentation

Search public AutoTrader.ca car listings by make, model, province, city, offer type, price (CAD), model year, mileage and seller type: for each listing the id, price, year, mileage in km, transmission, fuel, location, seller (dealer or private), image urls and the public listing url, plus total_results, total_pages and a has_more pagination flag. A valid empty result is a successful response. Unknown makes, models and cities answer a non-billable 422.

- **Documentation:** [https://scrappa.co/docs/autotrader-ca-api/autotrader_ca_search](https://scrappa.co/docs/autotrader-ca-api/autotrader_ca_search)
- **API group:** AutoTrader.ca API
- **Endpoint:** `GET https://scrappa.co/api/autotrader_ca/search`

## Authentication

Send your Scrappa API key in the `X-API-KEY` request header. Paid endpoints also support accountless x402 payments when called without an API key.

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `make` | string | No | Make url slug, e.g. honda or mercedes-benz. Example: honda. |
| `model` | string | No | Model url slug, e.g. civic or cr-v. Needs make. Example: civic. |
| `province` | string | No | Province code: ab, bc, mb, nb, nl, ns, nt, nu, on, pe, qc, sk or yt. Example: on. |
| `city` | string | No | City url slug inside the province, e.g. toronto. Needs province. Example: toronto. |
| `offer` | string | No | new or used. Both when omitted. Example: used. |
| `price_from` | integer | No | Minimum price in CAD. Example: 10000. |
| `price_to` | integer | No | Maximum price in CAD. Example: 20000. |
| `year_from` | integer | No | Minimum model year. Example: 2018. |
| `year_to` | integer | No | Maximum model year. Example: 2022. |
| `km_from` | integer | No | Minimum mileage in km. Example: 20000. |
| `km_to` | integer | No | Maximum mileage in km. Example: 100000. |
| `seller_type` | string | No | private or dealer. Both when omitted. Example: private. |
| `postal_code` | string | No | Canadian postal code to search around. Example: M5V3L9. |
| `radius` | integer | No | Search radius in km around postal_code, 1 to 1000. Defaults to 50. Example: 50. |
| `sort` | string | No | standard, price, mileage, model_year, age (posting date) or distance (needs postal_code). Defaults to standard. Example: price. |
| `desc` | boolean | No | true sorts descending. Defaults to false. Example: false. |
| `page` | integer | No | 1-based page number, about 20 listings per page, at most 200 pages. Defaults to 1. Example: 2. |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/autotrader_ca/search?make=honda&model=civic&offer=used&price_from=10000&price_to=20000&year_from=2018&km_to=100000"
```

## Example response

```json
{
    "success": true,
    "data": {
        "page": 1,
        "total_results": 166,
        "total_pages": 9,
        "has_more": true,
        "results": [
            {
                "id": "61787721-8204-4ed3-b936-b9389f6841b1",
                "position": 1,
                "title": "2018 Honda Civic Sedan",
                "url": "https://www.autotrader.ca/offers/honda-civic-lx-sieges-chauffants-camera-recul-air-climatise-gasoline-silver-cat_ma31gr200622va2411tr11703-61787721-8204-4ed3-b936-b9389f6841b1",
                "price": 16995,
                "currency": "CAD",
                "price_evaluation": "great_price",
                "make": "Honda",
                "model": "Civic",
                "trim": "LX SI\u00c8GES CHAUFFANTS CAM\u00c9RA RECUL AIR CLIMATIS\u00c9",
                "year": 2018,
                "mileage_km": 71388,
                "transmission": "Automatic",
                "fuel": "Gasoline",
                "condition": "used",
                "description": "HONDA CIVIC LX 2018\nMoteur 2,0 L 4 cylindres de 158 chevaux\nTransmission CVT\nSi\u00e8ges avant chauffants\nClimatisation automatique\nCam\u00e9ra de recul\nR\u00e9gulateur de vit\u2026",
                "location": {
                    "city": "BROSSARD",
                    "province": "QC",
                    "postal_code": "J4X 1C2",
                    "street": "8750 Boul Taschereau"
                },
                "seller": {
                    "type": "dealer",
                    "is_dealer": true,
                    "company_name": "Brossard Hyundai",
                    "phones": [
                        {
                            "type": "office",
                            "number": "438-228-2308"
                        }
                    ]
                },
                "images": [
                    "https://prod.pictures.autoscout24.net/listing-images/61787721-8204-4ed3-b936-b9389f6841b1_f0e47a59-898a-4f92-9d8f-a3f27a37a042.jpg/250x188.webp",
                    "https://prod.pictures.autoscout24.net/listing-images/61787721-8204-4ed3-b936-b9389f6841b1_4912e019-b95d-4f51-bb47-9327b0bb82f3.jpg/250x188.webp"
                ]
            },
            {
                "id": "ae4d497a-5d13-4405-b7ac-dd1fc2c331db",
                "position": 2,
                "title": "2022 Honda Civic Sedan",
                "url": "https://www.autotrader.ca/offers/honda-civic-lx-alloy-wheels-carplay-heated-seats-gasoline-black-cat_ma31gr200622va2411tr11703-ae4d497a-5d13-4405-b7ac-dd1fc2c331db",
                "price": 19895,
                "currency": "CAD",
                "price_evaluation": "great_price",
                "make": "Honda",
                "model": "Civic",
                "trim": "LX|Alloy Wheels|CarPlay|Heated Seats",
                "year": 2022,
                "mileage_km": 96118,
                "transmission": "Automatic",
                "fuel": "Gasoline",
                "condition": "used",
                "description": "Certified. LX|Alloy Wheels|CarPlay|Heated Seats\n2022 Honda Civic LX LX|Alloy Wheels|CarPlay|Heated Seats Crystal Black Pearl 2.0L I4 DOHC 16V i-VTEC FWD CVT\n\nAP\u2026",
                "location": {
                    "city": "PICKERING",
                    "province": "ON",
                    "postal_code": "L1V1C6",
                    "street": "1800 Kingston Rd"
                },
                "seller": {
                    "type": "dealer",
                    "is_dealer": true,
                    "company_name": "PICKERING HONDA",
                    "phones": [
                        {
                            "type": "office",
                            "number": "866-844-3942"
                        },
                        {
                            "type": "sms",
                            "number": "289-769-9994"
                        }
                    ]
                },
                "images": [
                    "https://prod.pictures.autoscout24.net/listing-images/ae4d497a-5d13-4405-b7ac-dd1fc2c331db_abd0f7f1-c924-456e-a687-06d79ffeb8b5.jpg/250x188.webp",
                    "https://prod.pictures.autoscout24.net/listing-images/ae4d497a-5d13-4405-b7ac-dd1fc2c331db_f0fba8e3-4042-4921-a478-8afedf1cd4a5.jpg/250x188.webp"
                ]
            }
        ]
    },
    "meta": {
        "endpoint_family": "search",
        "billable": true
    }
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | A parameter is malformed, for example a model without a make, a page above 200 or a postal code that is not Canadian. This response is not billable. |
| 422 | Unknown Make, Model or City | AutoTrader.ca does not know the make, model, city or postal code and would ignore it. This response is not billable. |
| 503 | Upstream Unavailable | AutoTrader.ca is temporarily unreachable, blocked the request, or answered a shape we could not parse. Retry later; this response is not billable. |

## More Scrappa resources

- [API documentation](https://scrappa.co/docs)
- [Full LLM-readable API reference](https://scrappa.co/llms-full.txt)
- [OpenAPI specification](https://scrappa.co/docs/api.json)
- [Pricing](https://scrappa.co/pricing)
