{
  "openapi": "3.0.1",
  "info": {
    "title": "AutoTrader UK Car Scraper",
    "description": "Extract car listings from AutoTrader.co.uk — the UK's largest used car marketplace with 450K+ listings. Scrapes price, make, model, year, mileage, seller type & location. Supports incremental mode for scheduled runs.",
    "version": "0.1",
    "x-build-id": "Jgx7zJImDz9FonDn7"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/rastriq~autotrader-uk-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-rastriq-autotrader-uk-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/rastriq~autotrader-uk-scraper/runs": {
      "post": {
        "operationId": "runs-sync-rastriq-autotrader-uk-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/rastriq~autotrader-uk-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-rastriq-autotrader-uk-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": {
          "startUrls": {
            "title": "🔗 Start URLs (optional)",
            "type": "array",
            "description": "<b>Paste one or more AutoTrader search URLs here.</b><br>Copy the URL directly from your browser after filtering the search on AutoTrader.co.uk. When set, all filter fields below are ignored.<br><br>Example: <code>https://www.autotrader.co.uk/car-search?postcode=SW1A+1AA&amp;make=BMW&amp;model=3+Series&amp;year-from=2020</code>",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "postcode": {
            "title": "UK Postcode",
            "pattern": "^[A-Za-z]{1,2}[0-9][0-9A-Za-z]?\\s?[0-9][A-Za-z]{2}$",
            "type": "string",
            "description": "<b>UK postcode used as the centre of the search radius.</b><br>Examples: <code>SW1A 1AA</code> (London), <code>M1 1AE</code> (Manchester), <code>EH1 1YZ</code> (Edinburgh).",
            "default": "SW1A 1AA"
          },
          "radius": {
            "title": "Search Radius",
            "enum": [
              "1",
              "5",
              "10",
              "15",
              "20",
              "25",
              "30",
              "40",
              "50",
              "75",
              "100",
              "200",
              "1500"
            ],
            "type": "string",
            "description": "<b>How far from the postcode to search.</b><br>Use <b>Nationwide</b> to search all of the UK regardless of location.",
            "default": "1500"
          },
          "make": {
            "title": "Make",
            "type": "string",
            "description": "<b>Filter by manufacturer.</b><br>Examples: <code>BMW</code>, <code>Ford</code>, <code>Toyota</code>, <code>Volkswagen</code>, <code>Tesla</code>.<br>Leave empty to search all makes."
          },
          "model": {
            "title": "Model",
            "type": "string",
            "description": "<b>Filter by model within the chosen make.</b><br>Examples: <code>3 Series</code>, <code>Focus</code>, <code>Golf</code>, <code>Model 3</code>.<br>Requires <i>Make</i> to be set for reliable results."
          },
          "body_type": {
            "title": "Body type",
            "enum": [
              "",
              "Hatchback",
              "Saloon",
              "Estate",
              "SUV",
              "Coupe",
              "Convertible",
              "MPV",
              "Pickup",
              "Camper",
              "Limousine"
            ],
            "type": "string",
            "description": "<b>Filter by vehicle body style.</b>",
            "default": ""
          },
          "fuel_type": {
            "title": "Fuel type",
            "enum": [
              "",
              "Petrol",
              "Diesel",
              "Electric",
              "Hybrid",
              "Plug-in Hybrid",
              "LPG",
              "Bi-Fuel"
            ],
            "type": "string",
            "description": "<b>Filter by engine fuel or powertrain type.</b>",
            "default": ""
          },
          "gearbox": {
            "title": "Gearbox",
            "enum": [
              "any",
              "Manual",
              "Automatic"
            ],
            "type": "string",
            "description": "<b>Filter by transmission type.</b>",
            "default": "any"
          },
          "seller_type": {
            "title": "Seller type",
            "enum": [
              "any",
              "trade",
              "private"
            ],
            "type": "string",
            "description": "<b>Filter by who is selling the car.</b><br><b>Trade</b> = franchised dealerships and independent garages.<br><b>Private</b> = individual owners selling directly.",
            "default": "any"
          },
          "year_from": {
            "title": "Year from",
            "minimum": 1950,
            "maximum": 2030,
            "type": "integer",
            "description": "<b>Minimum registration year.</b><br>Example: <code>2018</code> to exclude cars older than 2018."
          },
          "year_to": {
            "title": "Year to",
            "minimum": 1950,
            "maximum": 2030,
            "type": "integer",
            "description": "<b>Maximum registration year.</b><br>Example: <code>2023</code> to exclude cars newer than 2023."
          },
          "price_from": {
            "title": "Min price (£)",
            "minimum": 0,
            "type": "integer",
            "description": "<b>Minimum asking price in GBP.</b><br>Example: <code>5000</code> to exclude listings below £5,000."
          },
          "price_to": {
            "title": "Max price (£)",
            "minimum": 0,
            "type": "integer",
            "description": "<b>Maximum asking price in GBP.</b><br>Example: <code>25000</code> to exclude listings above £25,000."
          },
          "max_mileage": {
            "title": "Max mileage",
            "minimum": 0,
            "type": "integer",
            "description": "<b>Maximum odometer reading in miles.</b><br>Example: <code>50000</code> to show only cars with under 50,000 miles."
          },
          "sort_by": {
            "title": "Sort by",
            "enum": [
              "relevance",
              "price-asc",
              "price-desc",
              "year-desc",
              "year-asc",
              "mileage",
              "latest-listings"
            ],
            "type": "string",
            "description": "<b>Order in which results are returned.</b><br><b>Newest listings first</b> is automatically forced when Incremental mode is enabled.",
            "default": "relevance"
          },
          "max_results": {
            "title": "Max results",
            "minimum": 0,
            "type": "integer",
            "description": "<b>Hard cap on total listings returned across all pages.</b><br>Set to <b>0</b> to use <i>Max pages</i> instead. The default of <b>20</b> finishes in under 2 minutes. Raise it for full exports — 1,000 listings ≈ 3 min, 10,000 listings ≈ 25 min.",
            "default": 0
          },
          "max_pages": {
            "title": "Max pages",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "<b>Maximum search result pages to scrape.</b><br>Each page returns 26 listings. Ignored when <i>Max results</i> is greater than 0. AutoTrader supports up to ~17,000 pages (450K+ nationwide listings).",
            "default": 3
          },
          "enableIncrementalMode": {
            "title": "Enable incremental mode",
            "type": "boolean",
            "description": "<b>Only scrape listings newer than the previous run.</b><br>When enabled, results are sorted by <b>Newest first</b> and the actor stops as soon as it reaches a listing already seen in the last run.<br><br>Ideal for scheduled runs that monitor new inventory without re-processing old data.<br><br>ℹ️ The cursor (last-seen listing ID) is stored in a Key-Value Store named <code>autotrader-scraper-state</code>. Delete that store to reset and re-scrape everything.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "<b>Pre-configured — no changes needed.</b><br>The proxy is set up automatically to ensure reliable access to AutoTrader.co.uk. Leave this setting as-is for best results."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}