{
  "openapi": "3.0.1",
  "info": {
    "title": "AutoTrader.ca Scraper: Car Prices, Price Drops & Market Stats",
    "description": "Export AutoTrader.ca car listings by make, model, province or postal code, past the 4,000-result limit: price, mileage, year, fuel, transmission, body style, price rating, seller type. Track new cars, price drops and removed ads; get median prices by model and year. No phone numbers or seller names.",
    "version": "0.1",
    "x-build-id": "SCbLeOwTxQQVDKtlk"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/datasmithlab~autotrader-ca-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-datasmithlab-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/datasmithlab~autotrader-ca-scraper/runs": {
      "post": {
        "operationId": "runs-sync-datasmithlab-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/datasmithlab~autotrader-ca-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-datasmithlab-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": {
          "searches": {
            "title": "Make / model",
            "type": "array",
            "description": "One per line, as in AutoTrader.ca links: 'bmw/3 series', 'honda/civic', 'toyota/rav4', 'ford/f-150', or just a make ('mazda'). 'BMW 3 Series' also works (first word = make). Searches above AutoTrader.ca's 4,000-result limit are split by price automatically.",
            "items": {
              "type": "string"
            }
          },
          "provinces": {
            "title": "Provinces",
            "type": "array",
            "description": "Each make/model is searched once per province. Leave empty for all of Canada (or use a postal code below).",
            "items": {
              "type": "string",
              "enum": [
                "AB",
                "BC",
                "MB",
                "NB",
                "NL",
                "NS",
                "NT",
                "NU",
                "ON",
                "PE",
                "QC",
                "SK",
                "YT"
              ],
              "enumTitles": [
                "Alberta",
                "British Columbia",
                "Manitoba",
                "New Brunswick",
                "Newfoundland and Labrador",
                "Nova Scotia",
                "Northwest Territories",
                "Nunavut",
                "Ontario",
                "Prince Edward Island",
                "Quebec",
                "Saskatchewan",
                "Yukon"
              ]
            }
          },
          "postalCode": {
            "title": "Postal code",
            "type": "string",
            "description": "Full Canadian postal code, e.g. M5V 3L9. Searches within the radius below instead of all of Canada."
          },
          "radiusKm": {
            "title": "Radius (km)",
            "minimum": 10,
            "maximum": 400,
            "type": "integer",
            "description": "Only used together with a postal code (ignored otherwise). One of 10, 20, 50, 100, 150, 200, 250, 300, 400. Default 50 km."
          },
          "startUrls": {
            "title": "AutoTrader.ca search URLs",
            "type": "array",
            "description": "Or paste autotrader.ca search pages such as https://www.autotrader.ca/cars/honda/civic/ot_used?modelyearfrom=2018. Price, year, mileage, fuel, gearbox, seller, condition, body, postal code and radius settings in the URL are kept; other settings are ignored.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "maxItems": {
            "title": "Max listings",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many listing rows (you pay per row). Market summary rows are not counted.",
            "default": 200
          },
          "priceFrom": {
            "title": "Price from (CAD)",
            "minimum": 0,
            "type": "integer",
            "description": "Leave empty for no limit."
          },
          "priceTo": {
            "title": "Price to (CAD)",
            "minimum": 0,
            "type": "integer",
            "description": "Leave empty for no limit."
          },
          "yearFrom": {
            "title": "Model year from",
            "minimum": 0,
            "maximum": 2100,
            "type": "integer",
            "description": "e.g. 2018."
          },
          "yearTo": {
            "title": "Model year to",
            "minimum": 0,
            "maximum": 2100,
            "type": "integer",
            "description": "e.g. 2022."
          },
          "mileageFrom": {
            "title": "Mileage from (km)",
            "minimum": 0,
            "type": "integer",
            "description": "Leave empty for no limit."
          },
          "mileageTo": {
            "title": "Mileage to (km)",
            "minimum": 0,
            "type": "integer",
            "description": "Leave empty for no limit."
          },
          "fuel": {
            "title": "Fuel",
            "type": "array",
            "description": "Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "gasoline",
                "diesel",
                "electric",
                "hybrid",
                "naturalGas",
                "flexFuel",
                "propane",
                "other"
              ],
              "enumTitles": [
                "Gasoline",
                "Diesel",
                "Electric",
                "Gas/Electric hybrid",
                "Natural gas",
                "Flex fuel",
                "Propane (LPG)",
                "Other"
              ]
            }
          },
          "transmission": {
            "title": "Gearbox",
            "type": "array",
            "description": "Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "automatic",
                "manual"
              ],
              "enumTitles": [
                "Automatic",
                "Manual"
              ]
            }
          },
          "condition": {
            "title": "Condition",
            "type": "array",
            "description": "Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "used",
                "new",
                "demo",
                "employeeCar",
                "preRegistered",
                "classic"
              ],
              "enumTitles": [
                "Used",
                "New",
                "Demonstration",
                "Employee's car",
                "Pre-registered",
                "Antique / classic"
              ]
            }
          },
          "bodyType": {
            "title": "Body type",
            "type": "array",
            "description": "Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "hatchback",
                "convertible",
                "coupe",
                "wagon",
                "sedan",
                "minivan",
                "suv",
                "pickup",
                "other"
              ],
              "enumTitles": [
                "Hatchback",
                "Convertible",
                "Coupe",
                "Wagon",
                "Sedan",
                "Minivan",
                "SUV",
                "Pick-up truck",
                "Other"
              ]
            }
          },
          "sellerType": {
            "title": "Seller",
            "enum": [
              "all",
              "dealer",
              "private"
            ],
            "type": "string",
            "description": "Private sellers are listed without name or phone. Dealers too: no seller names or phones are collected.",
            "default": "all"
          },
          "onlyNewOrChanged": {
            "title": "Only new or changed listings",
            "type": "boolean",
            "description": "For scheduled runs: each run returns only cars that are NEW, had a PRICE_DROP or PRICE_UP since the last run with the same settings, and (when every search was read completely) REMOVED cars. The first run returns everything as NEW. Unchanged cars are not returned and not charged.",
            "default": false
          },
          "marketSummary": {
            "title": "Market summary by model and year",
            "type": "boolean",
            "description": "Add one row per make, model, model year and condition: listings, median and quartile price, median mileage, price per 1,000 km, dealer share, share rated good/top price and cars with a price drop. Uses every matching car, also unchanged ones in monitoring mode.",
            "default": false
          },
          "splitByPrice": {
            "title": "Split large searches by price",
            "type": "boolean",
            "description": "AutoTrader.ca shows at most 4,000 cars per search (200 pages). When a search has more, it is read in price bands so you get all of them. Cars without a listed price are not included in price bands. Turn off to read only the first 4,000.",
            "default": true
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Requests go out without a proxy first. Only if AutoTrader.ca blocks them is this proxy used (at most 3 new IPs, then the run stops and reports it).",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "CA"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}