{
  "openapi": "3.0.1",
  "info": {
    "title": "AutoTrader.ca Scraper - Cars, Prices & Dealer Leads",
    "description": "Scrape AutoTrader.ca, Canada's #1 car marketplace. Get new & used vehicle listings, full specs, real prices, mileage, fuel, photos & VIN. Filter by make/model/price/year/province. Full car details + dealer B2B leads with phone, website & ratings. Price-drop & new-listing monitoring, no start fee.",
    "version": "0.1",
    "x-build-id": "qOzf5aWOvedhMZEaw"
  },
  "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 URLs you provide (every spec, equipment, VIN/stock #, history & rich pricing). <b>Dealer leads</b> = car-dealer B2B profiles with phone, website, address, Google rating, inventory size & a lead score.",
            "default": "search"
          },
          "make": {
            "title": "Make / brand",
            "type": "string",
            "description": "Vehicle brand to search, e.g. <code>Honda</code>, <code>Toyota</code>, <code>Ford</code>, <code>BMW</code>, <code>Tesla</code>, <code>Ram</code>. 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. Leave empty for all models of the make."
          },
          "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. Leave as <b>All Canada</b> for the whole country.",
            "default": ""
          },
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "Paste AutoTrader.ca URLs directly: search result pages (<code>autotrader.ca/lst/...</code> or <code>/cars/...</code>) or single vehicle pages (<code>/offers/...</code> or <code>/a/...</code>). 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."
          },
          "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."
          },
          "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. Options: <code>gasoline</code>, <code>diesel</code>, <code>electric</code>, <code>hybrid</code>, <code>lpg</code>, <code>cng</code>, <code>hydrogen</code>.",
            "items": {
              "type": "string"
            }
          },
          "transmission": {
            "title": "Transmission",
            "enum": [
              "",
              "automatic",
              "manual",
              "semi-automatic"
            ],
            "type": "string",
            "description": "Gearbox type.",
            "default": ""
          },
          "bodyTypes": {
            "title": "Body types",
            "type": "array",
            "description": "Filter by body style: <code>suv</code>, <code>truck</code>/<code>pickup</code>, <code>sedan</code>, <code>coupe</code>, <code>convertible</code>, <code>hatchback</code>, <code>station-wagon</code>, <code>van</code>, <code>other</code>.",
            "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.",
            "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 first</b> with monitoring to catch fresh listings.",
            "default": "standard"
          },
          "keyword": {
            "title": "Keyword (optional)",
            "type": "string",
            "description": "Free-text keyword added to the search (e.g. a trim or feature word). Make/model filters are more reliable than keyword alone."
          },
          "includeDetails": {
            "title": "Fetch full car details",
            "type": "boolean",
            "description": "For each vehicle found, open its detail page to capture the complete record: all equipment, fuel consumption & CO₂, accident & service history, previous owners, colours, doors/seats, VIN/stock #, rich market-price evaluation and the full description. Adds one request per vehicle (billed as a Car detail).",
            "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, inventory size, 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. The platform paginates the first ~2,000 results per search — 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 fingerprints 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). Perfect for price-drop alerts and new-inventory watches. 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 well; switch to Residential (country = Canada) for extra resilience on very large runs.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}