Skip to content
Scrappa Get API key
AutoTrader.ca API 1 credit/request

AutoTrader.ca Search API Documentation

GET 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

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.

AutoTrader.ca Search API Documentation 1 credit/request

Endpoint

Request preview
GET
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
Auth header
x-api-key
Cost
1 credit/request
Response preview
200 OK
{
    "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,
...

Parameters

Start with the required fields, then add optional filters only when your use case needs them.

Runnable path

This endpoint has no required query parameters.

17 optional filters available.

make string Optional

Make url slug, e.g. honda or mercedes-benz. Example: honda.

Example value honda
model string Optional

Model url slug, e.g. civic or cr-v. Needs make. Example: civic.

Example value civic
province string Optional

Province code: ab, bc, mb, nb, nl, ns, nt, nu, on, pe, qc, sk or yt. Example: on.

Example value example
city string Optional

City url slug inside the province, e.g. toronto. Needs province. Example: toronto.

Example value example
offer string Optional

new or used. Both when omitted. Example: used.

Example value used
price_from integer Optional

Minimum price in CAD. Example: 10000.

Example value 10000
price_to integer Optional

Maximum price in CAD. Example: 20000.

Example value 20000
year_from integer Optional

Minimum model year. Example: 2018.

Example value 2018
year_to integer Optional

Maximum model year. Example: 2022.

Example value 10
km_from integer Optional

Minimum mileage in km. Example: 20000.

Example value 10
km_to integer Optional

Maximum mileage in km. Example: 100000.

Example value 100000
seller_type string Optional

private or dealer. Both when omitted. Example: private.

Example value example
postal_code string Optional

Canadian postal code to search around. Example: M5V3L9.

Example value example
radius integer Optional

Search radius in km around postal_code, 1 to 1000. Defaults to 50. Example: 50.

Example value 10
sort string Optional

standard, price, mileage, model_year, age (posting date) or distance (needs postal_code). Defaults to standard. Example: price.

Example value relevance
desc boolean Optional

true sorts descending. Defaults to false. Example: false.

Example value true
page integer Optional

1-based page number, about 20 listings per page, at most 200 pages. Defaults to 1. Example: 2.

Example value 1

Request Examples

PHP
<?php

$curl = curl_init();

curl_setopt_array($curl, [
    CURLOPT_URL => "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",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => "GET",
    CURLOPT_HTTPHEADER => [
        "x-api-key: YOUR_API_KEY_HERE"
    ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
    echo "cURL Error #:" . $err;
} else {
    echo $response;
}
PHP
<?php

use Illuminate\Support\Facades\Http;

$response = Http::timeout(30)
    ->withHeaders(['x-api-key' => 'YOUR_API_KEY_HERE'])
    ->get('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');

if ($response->successful()) {
    echo $response->body();
} else {
    echo "Error: " . $response->status();
}
JavaScript
const options = {
    method: 'GET',
    headers: {
        'x-api-key': 'YOUR_API_KEY_HERE'
    }
};

fetch('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', options)
    .then(response => {
        if (!response.ok) {
            throw new Error(`HTTP error! status: ${response.status}`);
        }
        return response.text();
    })
    .then(data => console.log(data))
    .catch(error => console.error('Error:', error));
JavaScript
const axios = require('axios');

const options = {
    method: 'GET',
    url: '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',
    headers: {
        x-api-key: 'YOUR_API_KEY_HERE',
    }
};

try {
    const response = await axios(options);
    console.log(response.data);
} catch (error) {
    console.error('Error:', error.message);
}
Ruby
require 'net/http'
require 'uri'

uri = URI.parse("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")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == 'https'

request = Net::HTTP::Get.new(uri.request_uri)
request['x-api-key'] = 'YOUR_API_KEY_HERE'

begin
    response = http.request(request)
    puts response.body
rescue => e
    puts "Error: #{e.message}"
end
Python
import http.client
import json

conn = http.client.HTTPSConnection("scrappa.co")

headers = {
    'x-api-key': 'YOUR_API_KEY_HERE',
}

try:
    conn.request("GET", "/api/autotrader_ca/search?make=honda&model=civic&offer=used&price_from=10000&price_to=20000&year_from=2018&km_to=100000", headers=headers)
    res = conn.getresponse()
    data = res.read()
    print(data.decode("utf-8"))
except Exception as e:
    print(f"Error: {e}")
finally:
    conn.close()
Python
import requests

headers = {
    'x-api-key': 'YOUR_API_KEY_HERE',
}

try:
    response = requests.get('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', headers=headers)
    response.raise_for_status()
    print(response.text)
except requests.exceptions.RequestException as e:
    print(f"Error: {e}")
Java
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.Response;
import java.io.IOException;

public class ApiExample {
    public static void main(String[] args) {
        OkHttpClient client = new OkHttpClient();

        Request request = new Request.Builder()
            .url("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")
        .addHeader("x-api-key", "YOUR_API_KEY_HERE")
            .build();

        try (Response response = client.newCall(request).execute()) {
            if (response.isSuccessful()) {
                System.out.println(response.body().string());
            } else {
                System.out.println("Error: " + response.code());
            }
        } catch (IOException e) {
            System.out.println("Error: " + e.getMessage());
        }
    }
}
Go
package main

import (
    "fmt"
    "net/http"
    "io/ioutil"
)

func main() {
    client := &http.Client{}
    req, err := http.NewRequest("GET", "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", nil)
    if err != nil {
        fmt.Println("Error creating request:", err)
        return
    }
    req.Header.Set("x-api-key", "YOUR_API_KEY_HERE")

    resp, err := client.Do(req)
    if err != nil {
        fmt.Println("Error making request:", err)
        return
    }
    defer resp.Body.Close()

    body, err := ioutil.ReadAll(resp.Body)
    if err != nil {
        fmt.Println("Error reading response:", err)
        return
    }

    fmt.Println(string(body))
}
Terminal
#!/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"
C#
using System;
using System.Net.Http;
using System.Threading.Tasks;

class Program
{
    static async Task Main()
    {
        using var client = new HttpClient();
        client.DefaultRequestHeaders.Add("x-api-key", "YOUR_API_KEY_HERE");

        try
        {
            var response = await client.SendAsync(new HttpRequestMessage(HttpMethod.Get, "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"));
            var content = await response.Content.ReadAsStringAsync();
            Console.WriteLine(content);
        }
        catch (Exception ex)
        {
            Console.WriteLine($"Error: {ex.Message}");
        }
    }
}
TypeScript
import axios from 'axios';

async function run(): Promise<void> {
    try {
        const response = await axios({
            method: 'GET',
            url: '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',
            headers: {
        'x-api-key': 'YOUR_API_KEY_HERE',
            },
        });

        console.log(response.data);
    } catch (error) {
        console.error('Error:', error);
    }
}

void run();
RUST
use reqwest::Client;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = Client::new();

    let response = client
        .get("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")
        .header("x-api-key", "YOUR_API_KEY_HERE")
        .send()
        .await?;

    println!("{}", response.text().await?);

    Ok(())
}

Response Schema

Example response fields are illustrative; inspect the JSON before integrating.

Example response fields

Scan these fields before integrating.

success data meta
JSON Response
200 OK
{
    "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

Handle these documented responses before retrying or showing customer-facing failures.

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.

{
    "errors": {
        "model": [
            "A model needs its make."
        ]
    },
    "message": "The request validation failed"
}
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.

{
    "meta": {
        "billable": false,
        "retryable": false,
        "endpoint_family": "search"
    },
    "error": {
        "code": "INVALID_PARAMETER",
        "message": "AutoTrader.ca does not know the requested make."
    },
    "success": false
}
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.

{
    "meta": {
        "billable": false,
        "retryable": true,
        "endpoint_family": "search"
    },
    "error": {
        "code": "UPSTREAM_UNAVAILABLE",
        "message": "AutoTrader.ca is temporarily unavailable. Please retry."
    },
    "success": false
}

Generate Code with AI

Copy a ready-made prompt with all the endpoint details, parameters, and example responses. Paste it into ChatGPT, Claude, or any AI assistant to instantly generate working code.

Try It Live

Test this endpoint in our interactive playground with real data.