{
  "openapi": "3.0.1",
  "info": {
    "title": "Autotrader Scraper",
    "description": "Scrapes car listings from Autotrader.com with advanced search filters, pagination, and detailed vehicle data.",
    "version": "1.0",
    "x-build-id": "lp5zauBe4v1kAR9V5"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/rigelbytes~autotrader-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-rigelbytes-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/rigelbytes~autotrader-scraper/runs": {
      "post": {
        "operationId": "runs-sync-rigelbytes-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/rigelbytes~autotrader-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-rigelbytes-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": {
          "searchUrl": {
            "title": "Search URL",
            "type": "string",
            "description": "Optional Autotrader search URL from your browser. Query params from this URL are merged with the individual filter fields below — individual fields override matching URL params when both are provided."
          },
          "allListingType": {
            "title": "Listing Category",
            "enum": [
              "all-cars"
            ],
            "type": "string",
            "description": "Autotrader listing category path segment (usually all-cars)"
          },
          "zip": {
            "title": "ZIP Code",
            "type": "string",
            "description": "ZIP code for location-based search. Required unless searchUrl includes a zip."
          },
          "city": {
            "title": "City",
            "type": "string",
            "description": "Optional city override. Normally resolved automatically from ZIP via Autotrader markets API."
          },
          "state": {
            "title": "State",
            "type": "string",
            "description": "Optional state override (e.g., AR). Normally resolved automatically from ZIP."
          },
          "dmaCode": {
            "title": "DMA Code",
            "type": "string",
            "description": "Optional designated market area code. Normally resolved automatically from ZIP."
          },
          "searchRadius": {
            "title": "Search Radius (miles)",
            "minimum": 0,
            "maximum": 500,
            "type": "integer",
            "description": "Search radius in miles from the ZIP code"
          },
          "makeCodes": {
            "title": "Makes",
            "type": "array",
            "description": "Car makes to include (e.g., BMW, TOYOTA, FORD). Leave empty for all makes.",
            "items": {
              "type": "string"
            }
          },
          "modelCodes": {
            "title": "Models",
            "type": "array",
            "description": "Car models to include (e.g., 3-Series, Camry). Leave empty for all models.",
            "items": {
              "type": "string"
            }
          },
          "minPrice": {
            "title": "Min Price ($)",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum price in USD"
          },
          "maxPrice": {
            "title": "Max Price ($)",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum price in USD"
          },
          "maxMileage": {
            "title": "Max Mileage",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum mileage (e.g., 50000 for 50k miles)"
          },
          "startYear": {
            "title": "Start Year",
            "minimum": 1980,
            "maximum": 2030,
            "type": "integer",
            "description": "Earliest model year (e.g., 2020)"
          },
          "endYear": {
            "title": "End Year",
            "minimum": 1980,
            "maximum": 2030,
            "type": "integer",
            "description": "Latest model year (e.g., 2025)"
          },
          "listingTypes": {
            "title": "Listing Types",
            "type": "array",
            "description": "Types of listings: NEW, USED, CERTIFIED, 3P_CERT",
            "items": {
              "type": "string"
            }
          },
          "sellerTypes": {
            "title": "Seller Types",
            "type": "array",
            "description": "Seller types: d (dealer), p (private)",
            "items": {
              "type": "string"
            }
          },
          "transmissionCodes": {
            "title": "Transmission",
            "type": "array",
            "description": "Transmission types: AUT (Automatic), MAN (Manual)",
            "items": {
              "type": "string"
            }
          },
          "driveGroups": {
            "title": "Drive Type",
            "type": "array",
            "description": "Drivetrain: AWD4WD, FWD, RWD",
            "items": {
              "type": "string"
            }
          },
          "vehicleStyleCodes": {
            "title": "Body Style",
            "type": "array",
            "description": "Body styles: CONVERT, COUPE, HATCH, SEDAN, SUVCROSS, TRUCKS, VANMV, WAGON",
            "items": {
              "type": "string"
            }
          },
          "engineCodes": {
            "title": "Engine Cylinders",
            "type": "array",
            "description": "Engine codes: 3CLDR, 4CLDR, 6CLDR, 8CLDR, etc.",
            "items": {
              "type": "string"
            }
          },
          "fuelTypeGroups": {
            "title": "Fuel Type",
            "type": "array",
            "description": "Fuel types: DSL, ELE, GSL, HYB, PIH",
            "items": {
              "type": "string"
            }
          },
          "doorCodes": {
            "title": "Doors",
            "type": "array",
            "description": "Number of doors: 2, 3, 4, 5",
            "items": {
              "type": "string"
            }
          },
          "exteriorColors": {
            "title": "Exterior Color",
            "type": "array",
            "description": "Exterior colors: BLACK, WHITE, BLUE, RED, SILVER, etc.",
            "items": {
              "type": "string"
            }
          },
          "interiorColors": {
            "title": "Interior Color",
            "type": "array",
            "description": "Interior colors: BLACK, BEIGE, GRAY, etc.",
            "items": {
              "type": "string"
            }
          },
          "mpgRanges": {
            "title": "MPG Range",
            "type": "array",
            "description": "Fuel economy: 0, 10-MPG, 20-MPG, 30-MPG, 40-MPG",
            "items": {
              "type": "string"
            }
          },
          "featureCodes": {
            "title": "Features",
            "type": "array",
            "description": "Feature/option codes from Autotrader (e.g., 1013, 1033, AT0001). Copy from a filtered search URL on autotrader.com.",
            "items": {
              "type": "string"
            }
          },
          "dealType": {
            "title": "Deal Type",
            "type": "string",
            "description": "Deal indicator filter such as greatprice"
          },
          "dateRange": {
            "title": "Date Range",
            "type": "string",
            "description": "Listing age filter from Autotrader (copy from a filtered search URL, e.g. last-7-days)"
          },
          "vin": {
            "title": "VIN",
            "type": "string",
            "description": "Optional filter for a specific vehicle VIN"
          },
          "listingId": {
            "title": "Listing ID",
            "type": "string",
            "description": "Optional filter for a specific Autotrader listing ID"
          },
          "newSearch": {
            "title": "New Search Session",
            "type": "boolean",
            "description": "Send newSearch=true on the first listing API request (Autotrader default behavior)"
          },
          "sortBy": {
            "title": "Sort By",
            "enum": [
              "relevance",
              "price_desc",
              "price_asc",
              "newest",
              "mileage_asc",
              "year_desc",
              "year_asc"
            ],
            "type": "string",
            "description": "Sort order for results"
          },
          "maxItems": {
            "title": "Max Items",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum number of listings to scrape (0 = all available from this search). Autotrader's API returns at most ~330 listings per search query regardless of totalResultCount — use narrower filters or multiple runs for more data."
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Proxy settings for anti-bot protection. Use Apify Residential proxies 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}