{
  "openapi": "3.0.1",
  "info": {
    "title": "AutoTrader.ca Scraper — Used Car Listings & Prices",
    "description": "Scrape used and new car listings from AutoTrader.ca. Search by make, model, province or city, set price, year and mileage limits, and get price, mileage, trim, dealer, location and photos as structured data. Export to JSON, CSV or Excel, or use the API.",
    "version": "0.1",
    "x-build-id": "LbZhZPzC6aSXRudzM"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/akhil_rajesh~autotrader-canada-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-akhil_rajesh-autotrader-canada-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/akhil_rajesh~autotrader-canada-scraper/runs": {
      "post": {
        "operationId": "runs-sync-akhil_rajesh-autotrader-canada-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/akhil_rajesh~autotrader-canada-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-akhil_rajesh-autotrader-canada-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": {
          "make": {
            "title": "Make",
            "type": "string",
            "description": "Vehicle make, e.g. 'Honda', 'Toyota', 'Ford'. Leave empty to include every make."
          },
          "model": {
            "title": "Model",
            "type": "string",
            "description": "Vehicle model, e.g. 'Civic'. Only used when Make is set."
          },
          "province": {
            "title": "Province",
            "type": "string",
            "description": "Province code or name, e.g. 'ON' or 'Ontario'. Leave empty to search all of Canada, or to match on the City alone."
          },
          "city": {
            "title": "City",
            "type": "string",
            "description": "City name, e.g. 'Toronto'. Works on its own — no province required. If it returns too few vehicles the Actor widens to the whole province and then Canada."
          },
          "maxPrice": {
            "title": "Max price (CAD)",
            "type": "integer",
            "description": "Only return vehicles at or below this price."
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Stop after this many vehicles. Each search page returns up to 100 listings.",
            "default": 100
          },
          "maxPages": {
            "title": "Max search pages",
            "minimum": 1,
            "maximum": 40,
            "type": "integer",
            "description": "How many result pages to walk per search area (up to 100 vehicles per page). The Actor walks more pages when Max results needs them, up to 40.",
            "default": 5
          },
          "sort": {
            "title": "Sort order",
            "enum": [
              "default",
              "posted_desc",
              "posted_asc",
              "price_asc",
              "price_desc",
              "km_asc",
              "km_desc",
              "year_desc",
              "year_asc",
              "distance"
            ],
            "type": "string",
            "description": "How to order the listings.",
            "default": "default"
          },
          "widenSearch": {
            "title": "Widen search if your area has few vehicles",
            "type": "boolean",
            "description": "Recommended ON. The Actor always walks as many local pages as needed first. If your city or province still has fewer vehicles than Max results, it then widens — city, then province, then all of Canada — so you never get a short list. Widened rows carry a 'searchScope' field showing where they came from. Turn OFF for strictly local results only.",
            "default": true
          },
          "minYear": {
            "title": "Min model year",
            "minimum": 1950,
            "maximum": 2100,
            "type": "integer",
            "description": "Lowest model year to include."
          },
          "maxYear": {
            "title": "Max model year",
            "minimum": 1950,
            "maximum": 2100,
            "type": "integer",
            "description": "Highest model year to include."
          },
          "minPrice": {
            "title": "Min price (CAD)",
            "type": "integer",
            "description": "Lowest price to include. Useful for skipping placeholder prices such as $1 (\"call for price\")."
          },
          "maxMileageKm": {
            "title": "Max mileage (km)",
            "type": "integer",
            "description": "Exclude vehicles with more than this many kilometres."
          },
          "proxy": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional. AutoTrader.ca is a public site and normally needs no proxy; use an Apify proxy only if you hit rate limits."
          },
          "debug": {
            "title": "Debug mode",
            "type": "boolean",
            "description": "Verbose logging for troubleshooting.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}