{
  "openapi": "3.0.1",
  "info": {
    "title": "AutoTrader.ca Scraper — Cars, Price, Mileage & Dealer",
    "description": "Scrape AutoTrader.ca car listings by make, model, city, price and mileage, with dealer phone and address. Add price vs market and days listed.",
    "version": "1.0",
    "x-build-id": "G6qn9RcxM6kO4TrbK"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/khadinakbar~autotrader-ca-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-khadinakbar-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/khadinakbar~autotrader-ca-scraper/runs": {
      "post": {
        "operationId": "runs-sync-khadinakbar-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/khadinakbar~autotrader-ca-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-khadinakbar-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": {
          "searchUrls": {
            "title": "Search result URLs",
            "type": "array",
            "description": "Use this when you already have AutoTrader.ca search pages you want scraped. Paste full listing-search URLs copied from the browser, e.g. 'https://www.autotrader.ca/cars/bmw/x5/reg_on/cit_toronto?pricefrom=20000'. The actor auto-paginates each URL up to maxResults (AutoTrader caps any single search at 200 pages / ~4,000 results). NOT for single vehicle pages — put those in 'Direct listing URLs' instead.",
            "items": {
              "type": "string"
            }
          },
          "directUrls": {
            "title": "Direct listing URLs",
            "type": "array",
            "description": "Use this to scrape specific vehicles you already have links to. Paste AutoTrader.ca offer URLs, e.g. 'https://www.autotrader.ca/offers/bmw-x5-...'. Each URL is fetched and parsed individually with full detail. NOT for search pages — use 'Search result URLs' for those.",
            "items": {
              "type": "string"
            }
          },
          "make": {
            "title": "Make",
            "type": "string",
            "description": "Vehicle make to search for, lowercase (e.g. 'bmw', 'toyota', 'ford'). Used to build a structured search when no Search result URLs are given. Combine with Model to narrow further. Leave empty to search all makes."
          },
          "model": {
            "title": "Model",
            "type": "string",
            "description": "Vehicle model, lowercase, e.g. 'x5', 'corolla', 'f-150', 'rav-4'. Only used when Make is set. If the spelling is not recognised the Actor tries other spellings (rav4 -> rav-4) and then the whole make filtered by your model name; it never returns unrelated models. NOT a trim."
          },
          "province": {
            "title": "Province",
            "enum": [
              "",
              "ON",
              "QC",
              "BC",
              "AB",
              "MB",
              "SK",
              "NS",
              "NB",
              "NL",
              "PE",
              "NT",
              "YT",
              "NU"
            ],
            "type": "string",
            "description": "Canadian province/territory to search within (2-letter code). Combine with City to localize results. Leave empty for a Canada-wide search. Applies only to structured searches, not to pasted Search result URLs.",
            "default": "ON"
          },
          "city": {
            "title": "City",
            "type": "string",
            "description": "City to center the search on, e.g. 'Toronto', 'Vancouver', 'Calgary'. Spaces are auto-slugged (e.g. 'North York' -> 'north-york'). Requires Province to be set. If the city slug does not resolve, the search falls back to province-wide results.",
            "default": "Toronto"
          },
          "condition": {
            "title": "Condition",
            "enum": [
              "all",
              "new",
              "used"
            ],
            "type": "string",
            "description": "Filter by listing condition. 'all' returns both new and used (default), 'new' returns only new vehicles, 'used' returns only used. Applies to structured searches.",
            "default": "all"
          },
          "priceMin": {
            "title": "Min price (CAD)",
            "minimum": 0,
            "type": "integer",
            "description": "Lowest asking price in Canadian dollars to include, e.g. 15000. Filters the structured search server-side. Leave empty for no lower bound."
          },
          "priceMax": {
            "title": "Max price (CAD)",
            "minimum": 0,
            "type": "integer",
            "description": "Highest asking price in Canadian dollars to include, e.g. 45000. Filters the structured search server-side. Leave empty for no upper bound."
          },
          "yearMin": {
            "title": "Min model year",
            "minimum": 1900,
            "maximum": 2030,
            "type": "integer",
            "description": "Earliest model year to include, e.g. 2018. Applied client-side against each vehicle's modelYear (AutoTrader's URL year filter is unreliable for Canadian data, so this is filtered after fetch). Leave empty for no lower bound."
          },
          "yearMax": {
            "title": "Max model year",
            "minimum": 1900,
            "maximum": 2030,
            "type": "integer",
            "description": "Latest model year to include, e.g. 2024. Applied client-side against each vehicle's modelYear. Leave empty for no upper bound. NOT a registration-date filter."
          },
          "minMileageKm": {
            "title": "Min mileage (km)",
            "minimum": 0,
            "type": "integer",
            "description": "Lowest odometer reading in kilometres to include, e.g. 0. Filters the structured search server-side. Leave empty for no lower bound."
          },
          "maxMileageKm": {
            "title": "Max mileage (km)",
            "minimum": 0,
            "type": "integer",
            "description": "Highest odometer reading in kilometres to include, e.g. 80000. Filters the structured search server-side. Leave empty for no upper bound."
          },
          "sortBy": {
            "title": "Sort order",
            "enum": [
              "relevance",
              "price_asc",
              "price_desc",
              "mileage_asc",
              "year_desc"
            ],
            "type": "string",
            "description": "Order results are returned in. 'relevance' is AutoTrader's default ranking. Use price/mileage/year sorts to surface cheapest, lowest-km, or newest vehicles first. Applies to structured searches.",
            "default": "relevance"
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "type": "integer",
            "description": "Most vehicle listings to return across all searches combined, e.g. 100. Pages of a search are read at the same time, so big requests finish quickly (about 1,000 listings in under 2 minutes). A single AutoTrader search stops at about 4,000 results; if your search has more, the Actor splits it into price bands automatically so you can ask for several thousand. Free plan runs are limited to 100 listings. Direct listing URLs are always all read.",
            "default": 100
          },
          "enrichDetails": {
            "title": "Enrich with detail pages",
            "type": "boolean",
            "description": "When on, the Actor opens each vehicle's own page and adds the market median price, price versus market, date listed and days on market, history report link, all photos, full feature list, body type, colour, doors, drive train, GPS and the dealer's Google rating (and VIN when the seller published one). Each such listing is charged the listing event plus the detail event. Leave off for faster, cheaper search-level rows, which already include price, specs, mileage and dealer phone and address.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxy settings. The default (Apify datacenter proxy) is enough for AutoTrader.ca. Change only if you see blocks.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": []
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}