{
  "openapi": "3.0.1",
  "info": {
    "title": "AutoTrader UK Scraper",
    "description": "AutoTrader UK scraper for used and new cars on autotrader.co.uk: search by make, model, postcode, radius, price, year and mileage or paste search URLs. Get price, mileage, fuel, gearbox, body, engine size, price indicator, dealer name. Monitor mode alerts on new listings and price drops.",
    "version": "0.1",
    "x-build-id": "xK1uhxYgF9eqqkXpk"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/datahamster~autotrader-uk-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-datahamster-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/datahamster~autotrader-uk-scraper/runs": {
      "post": {
        "operationId": "runs-sync-datahamster-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/datahamster~autotrader-uk-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-datahamster-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": {
          "make": {
            "title": "Make",
            "type": "string",
            "description": "Car make as autotrader.co.uk spells it, e.g. BMW, Ford, Volkswagen, Land Rover. Leave empty for all makes (then use a search URL or other filters)."
          },
          "model": {
            "title": "Model",
            "type": "string",
            "description": "Model as autotrader.co.uk spells it, e.g. 3 Series, Focus, Golf. Needs a make."
          },
          "postcode": {
            "title": "Postcode",
            "type": "string",
            "description": "UK postcode the search is measured from, e.g. M1 1AE or SW1A 1AA. Leave empty for the whole UK."
          },
          "radius": {
            "title": "Radius (miles)",
            "minimum": 1,
            "maximum": 1500,
            "type": "integer",
            "description": "Distance from the postcode in miles. Empty = national."
          },
          "minPrice": {
            "title": "Min price (£)",
            "minimum": 0,
            "type": "integer",
            "description": "Lowest total price in pounds."
          },
          "maxPrice": {
            "title": "Max price (£)",
            "minimum": 0,
            "type": "integer",
            "description": "Highest total price in pounds."
          },
          "minYear": {
            "title": "Min year",
            "minimum": 1900,
            "maximum": 2100,
            "type": "integer",
            "description": "Oldest year, e.g. 2018."
          },
          "maxYear": {
            "title": "Max year",
            "minimum": 1900,
            "maximum": 2100,
            "type": "integer",
            "description": "Newest year."
          },
          "minMileage": {
            "title": "Min mileage",
            "minimum": 0,
            "type": "integer",
            "description": "Lowest mileage in miles."
          },
          "maxMileage": {
            "title": "Max mileage",
            "minimum": 0,
            "type": "integer",
            "description": "Highest mileage in miles, e.g. 60000."
          },
          "fuelTypes": {
            "title": "Fuel types",
            "type": "array",
            "description": "Any of: Petrol, Diesel, Electric, Petrol Hybrid, Petrol Plug-in Hybrid, Diesel Hybrid, Diesel Plug-in Hybrid, Bi Fuel. Empty = all.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "bodyTypes": {
            "title": "Body types",
            "type": "array",
            "description": "Any of: Hatchback, Saloon, Estate, SUV, Coupe, Convertible, MPV, Pickup, Minibus, Combi Van. Empty = all.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "transmission": {
            "title": "Gearbox",
            "enum": [
              "any",
              "Manual",
              "Automatic"
            ],
            "type": "string",
            "description": "Manual or automatic only.",
            "default": "any"
          },
          "sellerType": {
            "title": "Seller",
            "enum": [
              "any",
              "trade",
              "private"
            ],
            "type": "string",
            "description": "Dealer (trade) or private listings only.",
            "default": "any"
          },
          "sort": {
            "title": "Sort",
            "enum": [
              "most_recent",
              "relevance",
              "price_asc",
              "price_desc",
              "mileage",
              "year_dsc",
              "year_asc",
              "distance"
            ],
            "type": "string",
            "description": "Order of results. A pasted search URL keeps its own sort. Monitor mode always reads newest first.",
            "default": "most_recent"
          },
          "startUrls": {
            "title": "autotrader.co.uk search or listing URLs",
            "type": "array",
            "description": "Optional. Search URLs copied from autotrader.co.uk/car-search after setting any filters on the site (also filters this form does not have), or listing URLs (/car-details/<id>). Each URL runs as its own search next to the form search above; a car found twice is returned once.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxPagesPerSearch": {
            "title": "Max pages per search",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Result pages per search, 20 cars each (autotrader serves up to 100 pages = 2,000 cars per search). Example: 5 = up to 100 cars.",
            "default": 5
          },
          "includeDetails": {
            "title": "Open every listing page (full specs)",
            "type": "boolean",
            "description": "true = read each car's own page for fuel type, gearbox, body type, engine size, colour, owners, dealer name, autotrader's good-price band and the description (phone numbers and e-mails removed). false = search-card fields only (price, mileage, year, price indicator, town), faster.",
            "default": true
          },
          "priceIndicators": {
            "title": "Only these price indicators",
            "type": "array",
            "description": "Keep only cars with one of autotrader's price badges, e.g. GREAT and GOOD. Cars without a badge are dropped when this is set. Dropped cars are not charged.",
            "items": {
              "type": "string",
              "enum": [
                "LOW",
                "GREAT",
                "GOOD",
                "FAIR",
                "HIGH"
              ],
              "enumTitles": [
                "Lower price",
                "Great price",
                "Good price",
                "Fair price",
                "Higher price"
              ]
            },
            "default": []
          },
          "strictFilters": {
            "title": "Re-check numeric filters on every car",
            "type": "boolean",
            "description": "Drop any car whose price, year, mileage or distance is outside the search's limits (also limits inside a pasted URL). Dropped cars are not charged.",
            "default": true
          },
          "includePromoted": {
            "title": "Include paid featured slots",
            "type": "boolean",
            "description": "autotrader adds paid featured and promoted cars to every page. false = organic results only. Monitor mode always skips them.",
            "default": false
          },
          "priceChangeAlerts": {
            "title": "Monitor: price alerts",
            "enum": [
              "drops",
              "any",
              "off"
            ],
            "type": "string",
            "description": "Monitor mode only. drops = a known car comes back when its price falls below the last price you were told about; any = every price change; off = new listings only.",
            "default": "drops"
          },
          "minPriceDropPercent": {
            "title": "Monitor: minimum price drop (%)",
            "minimum": 0,
            "maximum": 90,
            "type": "integer",
            "description": "Monitor mode with price drops: report a drop only when it is at least this many percent below the last reported price. Smaller drops add up until they reach it.",
            "default": 0
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many results (you are charged only for pushed items)",
            "default": 100
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "scrape",
              "monitor"
            ],
            "type": "string",
            "description": "scrape = full results; monitor = only new/changed items since the previous run of this task",
            "default": "scrape"
          },
          "monitorStateId": {
            "title": "Monitor state id",
            "type": "string",
            "description": "Optional state id when not running as a saved task (monitor mode)"
          },
          "webhookUrl": {
            "title": "Webhook URL",
            "type": "string",
            "description": "POST a change summary here in monitor mode"
          },
          "telegramBotToken": {
            "title": "Telegram bot token",
            "type": "string",
            "description": "Optional: bot token for monitor-mode change summaries"
          },
          "telegramChatId": {
            "title": "Telegram chat id",
            "type": "string",
            "description": "Optional: chat id that receives monitor-mode summaries"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}