{
  "openapi": "3.0.1",
  "info": {
    "title": "Car Listing Scraper for AutoTrader.ca - Prices & Dealer Leads",
    "description": "Scrape new and used car listings from AutoTrader.ca by make, model, province, year, price, km, fuel or body: CA$ price, price band, specs, photos, dealer phone. Full records add history flags, CARFAX link, VIN where shown; dealer leads add website, Google rating. Not affiliated with AutoTrader.ca.",
    "version": "0.1",
    "x-build-id": "dFniA8SxE0hnxWJqI"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapesage~autotrader-ca-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapesage-autotrader-ca-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/scrapesage~autotrader-ca-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapesage-autotrader-ca-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/scrapesage~autotrader-ca-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapesage-autotrader-ca-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "mode": {
            "title": "What to scrape",
            "enum": [
              "search",
              "carDetail",
              "dealerLeads"
            ],
            "type": "string",
            "description": "<b>Search cars</b> = listings from a make/model/filter search (the default). <b>Car details</b> = full vehicle records for vehicle links you provide (specs, equipment, stock number, VIN where AutoTrader.ca shows it, CARFAX report link, history flags and market-price evaluation). <b>Dealer leads</b> = car-dealer profiles with phone, website, address, Google rating, the number of their listings in your search and a lead score.",
            "default": "search"
          },
          "make": {
            "title": "Make / brand",
            "type": "string",
            "description": "Vehicle brand to search, as AutoTrader.ca writes it, e.g. <code>Honda</code>, <code>Toyota</code>, <code>Ford</code>, <code>Mercedes-Benz</code>, <code>Tesla</code>, <code>Ram</code>. A make AutoTrader.ca does not know stops the run before anything is billed. Leave empty to search all makes (with the filters below)."
          },
          "model": {
            "title": "Model",
            "type": "string",
            "description": "Model within the make, e.g. <code>Civic</code>, <code>F-150</code>, <code>RAV4</code>, <code>Model 3</code>. Requires a make. A model AutoTrader.ca does not know stops the run before anything is billed."
          },
          "province": {
            "title": "Province / territory",
            "enum": [
              "",
              "ontario",
              "quebec",
              "british columbia",
              "alberta",
              "manitoba",
              "saskatchewan",
              "nova scotia",
              "new brunswick",
              "newfoundland and labrador",
              "prince edward island",
              "northwest territories",
              "yukon",
              "nunavut"
            ],
            "type": "string",
            "description": "Limit results to a single Canadian province or territory (applied by AutoTrader.ca). Leave as <b>All Canada</b> for the whole country.",
            "default": ""
          },
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "Paste AutoTrader.ca links directly: search result pages (<code>autotrader.ca/lst/...</code> or <code>/cars/...</code>, filters kept as the site applied them) or single vehicle pages (<code>/offers/...</code>), which come back as full vehicle records. Auto-routed by type; used in addition to the search filters.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "priceFrom": {
            "title": "Min price (CA$)",
            "minimum": 0,
            "type": "integer",
            "description": "Only vehicles at or above this price. A price range (or the cheapest-first order) starts at CA$100 at least: lower prices are dealers' \"call for price\" placeholders. Set for example 1000 to also skip the monthly payments some dealers type as the price."
          },
          "priceTo": {
            "title": "Max price (CA$)",
            "minimum": 0,
            "type": "integer",
            "description": "Only vehicles at or below this price."
          },
          "yearFrom": {
            "title": "Year from",
            "type": "integer",
            "description": "Only vehicles of this model year or later, e.g. <code>2018</code>."
          },
          "yearTo": {
            "title": "Year to",
            "type": "integer",
            "description": "Only vehicles of this model year or earlier."
          },
          "mileageFrom": {
            "title": "Min mileage (km)",
            "minimum": 0,
            "type": "integer",
            "description": "Only vehicles with at least this many kilometres. A mileage range (or the lowest-mileage order) starts at 1 km, so vehicles without a mileage are left out."
          },
          "mileageTo": {
            "title": "Max mileage (km)",
            "minimum": 0,
            "type": "integer",
            "description": "Only vehicles with at most this many kilometres (e.g. <code>100000</code>)."
          },
          "fuelTypes": {
            "title": "Fuel types",
            "type": "array",
            "description": "Filter by fuel, as AutoTrader.ca groups it: hybrid and plug-in hybrid are one category (Gas/Electric Hybrid) and ethanol is Flex Fuel. AutoTrader.ca has no hydrogen or diesel-hybrid category, so those values are named on the run card and left out.",
            "items": {
              "type": "string",
              "enum": [
                "gasoline",
                "diesel",
                "electric",
                "hybrid",
                "phev",
                "hybrid-diesel",
                "lpg",
                "cng",
                "hydrogen",
                "ethanol",
                "other"
              ],
              "enumTitles": [
                "Gasoline (gasoline)",
                "Diesel (diesel)",
                "Electric (electric)",
                "Gas/Electric Hybrid (hybrid)",
                "Plug-in hybrid, same category as hybrid (phev)",
                "Diesel hybrid, no AutoTrader.ca category (hybrid-diesel)",
                "Propane / LPG (lpg)",
                "Natural gas / CNG (cng)",
                "Hydrogen, no AutoTrader.ca category (hydrogen)",
                "Flex fuel / E85 (ethanol)",
                "Other (other)"
              ]
            }
          },
          "transmission": {
            "title": "Transmission",
            "enum": [
              "",
              "automatic",
              "manual",
              "semi-automatic"
            ],
            "type": "string",
            "description": "Gearbox type. AutoTrader.ca has only automatic and manual: a semi-automatic filter stops the run before anything is billed.",
            "default": ""
          },
          "bodyTypes": {
            "title": "Body types",
            "type": "array",
            "description": "Filter by body style: <code>suv</code>, <code>truck</code> (or <code>pickup</code>), <code>sedan</code>, <code>coupe</code>, <code>convertible</code>, <code>hatchback</code>, <code>wagon</code>, <code>minivan</code> (or <code>van</code>), <code>other</code>. A value AutoTrader.ca has no category for is named on the run card.",
            "items": {
              "type": "string"
            }
          },
          "powerFromKw": {
            "title": "Min power (kW)",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum engine power in kilowatts (1 kW ≈ 1.34 hp)."
          },
          "powerToKw": {
            "title": "Max power (kW)",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum engine power in kilowatts."
          },
          "condition": {
            "title": "Condition",
            "enum": [
              "all",
              "new",
              "used"
            ],
            "type": "string",
            "description": "New, used, or both (applied by AutoTrader.ca).",
            "default": "all"
          },
          "sort": {
            "title": "Sort order",
            "enum": [
              "standard",
              "price_asc",
              "price_desc",
              "age_newest",
              "mileage_asc",
              "power_desc"
            ],
            "type": "string",
            "description": "How to order search results. Use <b>Newest listings first</b> with monitoring to catch fresh listings. In any order other than standard, AutoTrader.ca's paid slots are left out so the rows keep that order; cheapest first starts at CA$100 and lowest mileage first at 1 km (see the price and mileage fields). With no make or filter, a chosen order or monitoring reads all of Canada.",
            "default": "standard"
          },
          "keyword": {
            "title": "Keyword (optional)",
            "type": "string",
            "description": "Keep only vehicles whose name, version, fuel or body contains these words (e.g. <code>hybrid</code>, <code>AWD</code>, <code>XLE</code>). AutoTrader.ca has no keyword search, so the run checks each vehicle it reads; add a make and model so it finds enough matches."
          },
          "includeDetails": {
            "title": "Fetch full car details",
            "type": "boolean",
            "description": "For each vehicle found, read its vehicle page for the complete record: all equipment, accident and service history flags, colours, doors and seats, stock number, VIN where AutoTrader.ca shows it, the CARFAX report link, the market-price evaluation, the listing date and the full description. One extra request per vehicle; the row is billed as a Car detail instead of a Car listing.",
            "default": false
          },
          "emitDealerLeads": {
            "title": "Also emit dealer-lead records",
            "type": "boolean",
            "description": "In Search / Car-detail mode, also push one deduplicated dealer-lead record (type = \"dealerLead\") for every unique dealer found, with phone, website, address, Google rating, the number of its listings in your search, makes carried, price range and a 0-100 lead score.",
            "default": false
          },
          "enrichDealerEmails": {
            "title": "Crawl dealer websites for emails",
            "type": "boolean",
            "description": "When a dealer lists their own website, visit it (home + contact/about, hard-capped) to extract a public contact email. Only runs for dealers that have a website.",
            "default": false
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of vehicles to scrape across all searches. AutoTrader.ca pages through the first 200 result pages of a search (about 3,400 to 4,000 vehicles): split by make/model, province or price band to go deeper.",
            "default": 200
          },
          "maxDealers": {
            "title": "Max dealer leads",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of dealer-lead profiles to build (Dealer-leads mode, or when \"emit dealer-lead records\" is on).",
            "default": 200
          },
          "deduplicateResults": {
            "title": "Deduplicate within a run",
            "type": "boolean",
            "description": "Skip records already emitted in the same run (recommended).",
            "default": true
          },
          "monitorMode": {
            "title": "Monitoring mode - only new & changed",
            "type": "boolean",
            "description": "Remember vehicles across runs in a named key-value store and emit ONLY vehicles that are new or whose price changed since last time (and only dealers not seen before), each tagged with monitorStatus. The first run delivers up to maxResults and records the rest of the search without billing it, so later runs report only vehicles that are really new. With sort Newest listings first a run stops at the first vehicle it already knows (the fastest way to catch new listings); in any other order every run reads the whole search, so price changes anywhere in it are caught too. Works with Apify Schedules.",
            "default": false
          },
          "monitorKey": {
            "title": "Monitor key",
            "type": "string",
            "description": "Names the memory used by monitoring mode. Use a distinct key per saved search so different watches don't share state.",
            "default": "default"
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 16,
            "type": "integer",
            "description": "Maximum parallel requests. 6–10 is a good balance for AutoTrader.ca.",
            "default": 6
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxy settings. The default Apify Proxy (datacenter) works; the run switches to Canadian residential IPs by itself if AutoTrader.ca refuses datacenter. Custom settings are used as given.",
            "default": {
              "useApifyProxy": true
            }
          },
          "urlsFromFile": {
            "title": "Import URLs from a file",
            "type": "string",
            "description": "Paste a list of AutoTrader.ca URLs (one per line), OR one link to a .txt/.csv file, Google Sheet or Google Drive file containing them. Lets you import many search or vehicle URLs at once instead of typing each. Google Sheet/Drive share links are handled automatically."
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}