{
  "openapi": "3.0.1",
  "info": {
    "title": "AutoTrader.ca Scraper — Cars, Price, Mileage & Dealer",
    "description": "Scrape Canadian vehicle listings from AutoTrader.ca by search URL, structured filters, or direct listing URLs. Returns price, specs, mileage, dealer contact. MCP-ready.",
    "version": "1.0",
    "x-build-id": "INzoe9vjd5B1zVOU3"
  },
  "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 to search for, lowercase (e.g. 'x5', 'corolla', 'f-150'). Only applied when Make is also set. Leave empty to include all models of the chosen make. NOT a trim — trim/version filtering is not supported as a search param."
          },
          "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": "Maximum number of vehicle listings to return across all search URLs/queries combined, e.g. 100. The actor stops paginating once this is reached. AutoTrader hard-caps any single search at ~4,000 results (200 pages); to exceed that, split into narrower searches. Direct listing URLs are always all scraped regardless of this cap.",
            "default": 100
          },
          "enrichDetails": {
            "title": "Enrich with detail pages",
            "type": "boolean",
            "description": "When enabled, the actor visits each vehicle's detail page to add full description, all photos, VIN (when published), full feature list, GPS coordinates, and the dealer's Google rating. Adds one extra request per listing and is billed at the higher detail-enriched rate. Leave off for fast, cheaper listing-level data, which already includes price, specs, mileage, dealer phone, and dealer street/city/postal code.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxy settings. Defaults to Apify Proxy datacenter servers, which is sufficient for AutoTrader.ca (no aggressive anti-bot). Override only if you hit 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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}