{
  "openapi": "3.0.1",
  "info": {
    "title": "Autotrader Scraper: UK and Canada Car Listings and Prices",
    "description": "Scrape Autotrader UK and AutoTrader Canada car listings by make, model, postcode or search link: price, year, mileage, fuel, gearbox, body, colour, engine, dealer name, address and phone, location, photos and link. No login.",
    "version": "0.1",
    "x-build-id": "o95FFWSDd6O8iE1vi"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/themineworks~autotrader-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-themineworks-autotrader-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/themineworks~autotrader-scraper/runs": {
      "post": {
        "operationId": "runs-sync-themineworks-autotrader-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/themineworks~autotrader-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-themineworks-autotrader-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": {
          "country": {
            "title": "Country",
            "enum": [
              "UK",
              "CA"
            ],
            "type": "string",
            "description": "Which Autotrader site the search fields below go to. Links in Search or listing links pick their own site.",
            "default": "UK"
          },
          "make": {
            "title": "Make",
            "type": "string",
            "description": "Make as written on the site, e.g. BMW, Ford, Toyota. Leave empty for all makes."
          },
          "model": {
            "title": "Model",
            "type": "string",
            "description": "Model as written on the site, e.g. 3 Series, Fiesta, RAV4. Needs a make."
          },
          "postcode": {
            "title": "UK postcode",
            "type": "string",
            "description": "UK only: search around this postcode, e.g. M1 1AE. Leave empty for the whole UK (distances then count from central London)."
          },
          "location": {
            "title": "Canada city",
            "type": "string",
            "description": "Canada only: city and province, e.g. Toronto, ON or Vancouver, BC. Leave empty for all of Canada."
          },
          "radius": {
            "title": "Radius",
            "minimum": 1,
            "maximum": 1500,
            "type": "integer",
            "description": "Distance around the postcode (miles, UK) or city (km, Canada). Empty = national (UK) or 100 km (Canada)."
          },
          "priceMin": {
            "title": "Min price",
            "minimum": 0,
            "type": "integer",
            "description": "Lowest price in GBP (UK) or CAD (Canada)."
          },
          "priceMax": {
            "title": "Max price",
            "minimum": 0,
            "type": "integer",
            "description": "Highest price in GBP (UK) or CAD (Canada)."
          },
          "yearMin": {
            "title": "Min year",
            "minimum": 1900,
            "maximum": 2100,
            "type": "integer",
            "description": "Oldest year, e.g. 2018."
          },
          "yearMax": {
            "title": "Max year",
            "minimum": 1900,
            "maximum": 2100,
            "type": "integer",
            "description": "Newest year."
          },
          "maxMileage": {
            "title": "Max mileage",
            "minimum": 0,
            "type": "integer",
            "description": "Highest mileage: miles (UK) or km (Canada)."
          },
          "fuelType": {
            "title": "Fuel",
            "enum": [
              "any",
              "petrol",
              "diesel",
              "electric",
              "hybrid",
              "plug-in hybrid"
            ],
            "type": "string",
            "description": "Fuel type.",
            "default": "any"
          },
          "transmission": {
            "title": "Gearbox",
            "enum": [
              "any",
              "automatic",
              "manual"
            ],
            "type": "string",
            "description": "Gearbox.",
            "default": "any"
          },
          "bodyType": {
            "title": "Body type",
            "enum": [
              "any",
              "hatchback",
              "saloon",
              "estate",
              "suv",
              "coupe",
              "convertible",
              "mpv",
              "pickup"
            ],
            "type": "string",
            "description": "Body type.",
            "default": "any"
          },
          "sellerType": {
            "title": "Seller",
            "enum": [
              "any",
              "dealer",
              "private"
            ],
            "type": "string",
            "description": "Dealers, private sellers or both.",
            "default": "any"
          },
          "keywords": {
            "title": "Keywords (UK)",
            "type": "string",
            "description": "UK only: words the advert must contain, e.g. panoramic roof."
          },
          "sort": {
            "title": "Sort",
            "enum": [
              "relevance",
              "price_asc",
              "price_desc",
              "mileage",
              "year_dsc",
              "year_asc",
              "distance",
              "most_recent"
            ],
            "type": "string",
            "description": "Order of the results.",
            "default": "relevance"
          },
          "startUrls": {
            "title": "Search or listing links",
            "type": "array",
            "description": "Optional. Paste search links from autotrader.co.uk (car-search?...) or autotrader.ca (/cars/...), or single listing links (car-details/... or /offers/...). Every filter in the link is kept. Each link is read on top of the fields above.",
            "items": {
              "type": "string"
            }
          },
          "maxResults": {
            "title": "Max cars per search",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Stop each search after this many cars. Autotrader UK shows at most 2,000 cars per search; split big searches by price or year.",
            "default": 50
          },
          "includeDetails": {
            "title": "Open each listing page",
            "type": "boolean",
            "description": "On: fuel, gearbox, body, colour, engine, doors, seats, owners, history check, full description, all photos and the dealer name, address and phone. Off: faster, from the result cards only (UK cards have no fuel, gearbox, body or dealer name).",
            "default": true
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Leave as is. Autotrader UK is read through the Apify datacenter proxy (no extra fee); AutoTrader.ca goes direct and moves to the proxy only if it refuses a request.",
            "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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}