{
  "openapi": "3.0.1",
  "info": {
    "title": "CarGurus Scraper — US, Canada & UK Listings with Deal Ratings",
    "description": "Used-car listings from CarGurus (US, Canada, UK): price, mileage, deal rating, market value, VIN and dealer phone. No login. Several makes and models per run. From $2.50 per 1,000 cars; pay only for cars found.",
    "version": "1.1",
    "x-build-id": "1B5UUkQB3ezWQetzi"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/khadinakbar~cargurus-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-khadinakbar-cargurus-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/khadinakbar~cargurus-scraper/runs": {
      "post": {
        "operationId": "runs-sync-khadinakbar-cargurus-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/khadinakbar~cargurus-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-khadinakbar-cargurus-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",
        "required": [
          "country"
        ],
        "properties": {
          "country": {
            "title": "Country / marketplace",
            "enum": [
              "US",
              "CA",
              "UK"
            ],
            "type": "string",
            "description": "Which CarGurus marketplace to search. Use 'US' for cargurus.com, 'CA' for cargurus.ca, 'UK' for cargurus.co.uk. Defaults to US. This is NOT a proxy region — it picks the website domain and the postal-code format expected below.",
            "default": "US"
          },
          "postalCode": {
            "title": "Postal / ZIP code",
            "type": "string",
            "description": "Center of the location search. Use a US ZIP (e.g. '10001'), a Canadian forward sortation area or postal code (e.g. 'M5V'), or a UK outcode/postcode (e.g. 'SW1A'). Ignored when 'searchUrls' is provided. Defaults to '10001'.",
            "default": "10001"
          },
          "postalCodes": {
            "title": "More ZIP / postal codes",
            "type": "array",
            "description": "Extra ZIP or postal codes searched in the same run with the same filters, e.g. '10001', '60601', '90012'. Listings found from several codes are de-duplicated and maxResults applies to the whole run. Up to 25 codes. Ignored when searchUrls are set.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "distance": {
            "title": "Search radius",
            "minimum": 10,
            "maximum": 500,
            "type": "integer",
            "description": "Radius around the postal code, in miles (US and UK) or kilometres (Canada). Accepts 10 to 500. Only cars inside the radius are returned unless 'Include cars outside the radius' is on. Defaults to 50. Ignored when 'searchUrls' is provided.",
            "default": 50
          },
          "includeDistantListings": {
            "title": "Include cars outside the radius",
            "type": "boolean",
            "description": "CarGurus mixes far-away cars into nearby results (cars offered with nationwide delivery, or a nationwide list when nothing is close by). Off (default): only cars inside the radius are returned and charged. On: keep them; their distance is in the 'distance' field.",
            "default": false
          },
          "includeDetails": {
            "title": "Add car details",
            "type": "boolean",
            "description": "Optional extra, starts on 24 November 2026: adds all photos, price history, accident and owner counts (US), days at the dealer, dealer rating, dealer address and hours, the seller's full description, dealer fees and specification sections to each car. Costs $0.0015 more per car on every plan, only for cars where details were found (the 'Listing details added' charge on the Pricing tab). Before 24 November 2026 a run that switches this on stops with a clear message and nothing is charged. Accident and owner counts are US only.",
            "default": false
          },
          "make": {
            "title": "Make (brand) filter",
            "type": "string",
            "description": "Optional brand to search, e.g. 'Toyota'. In the US and Canada the Actor looks up the brand in the CarGurus catalog and CarGurus returns only that brand, which is much faster than scanning everything. Case does not matter; a partial name also works ('mercedes' finds Mercedes-Benz). In the UK the brand is checked on each listing instead. Leave empty for all makes."
          },
          "model": {
            "title": "Model filter",
            "type": "string",
            "description": "Optional model to search, e.g. 'Camry' or 'F-150'. Matches every model whose name contains it ('Camry' also finds Camry Hybrid). Add the make too: with a make, CarGurus filters the model itself; without one, the model is checked on each listing, which is slower. Leave empty for all models."
          },
          "makes": {
            "title": "More makes",
            "type": "array",
            "description": "Extra brands searched in the same run, e.g. 'Honda', 'Ford'. Same rules as 'make'. Up to 10 makes in total.",
            "items": {
              "type": "string"
            }
          },
          "models": {
            "title": "More models",
            "type": "array",
            "description": "Extra models searched in the same run, e.g. 'Accord', 'Civic'. Each model is matched within the makes you entered. Up to 20 models in total.",
            "items": {
              "type": "string"
            }
          },
          "minPrice": {
            "title": "Minimum price",
            "minimum": 0,
            "type": "integer",
            "description": "Lowest total price to keep, in the marketplace's local currency (USD/CAD/GBP). Sent to CarGurus (which filters on list price) and checked again on each listing's totalPrice (price + dealer fees). Leave empty for no floor."
          },
          "maxPrice": {
            "title": "Maximum price",
            "minimum": 0,
            "type": "integer",
            "description": "Highest total price to keep, in local currency. Sent to CarGurus (list price) and checked again on totalPrice. Leave empty for no ceiling. Set with 'minPrice' to define a band (e.g. 15000 to 30000)."
          },
          "minYear": {
            "title": "Minimum model year",
            "minimum": 1950,
            "maximum": 2027,
            "type": "integer",
            "description": "Oldest model year to keep (e.g. 2018). Sent to CarGurus and checked again on each listing. Leave empty for no limit. Model year, not the registration date."
          },
          "maxYear": {
            "title": "Maximum model year",
            "minimum": 1950,
            "maximum": 2027,
            "type": "integer",
            "description": "Newest model year to keep (e.g. 2024). Sent to CarGurus and checked again on each listing. Leave empty for no limit. Set with 'minYear' for a year band."
          },
          "maxMileage": {
            "title": "Maximum mileage",
            "minimum": 0,
            "type": "integer",
            "description": "Highest odometer reading to keep, in miles (US) or kilometres (CA/UK). Sent to CarGurus and checked again on each listing. Leave empty for no limit."
          },
          "sortBy": {
            "title": "Sort order",
            "enum": [
              "deal_score",
              "price_asc",
              "price_desc",
              "mileage_asc",
              "year_desc",
              "distance"
            ],
            "type": "string",
            "description": "Order CarGurus returns listings in. 'deal_score' (best deals first) is the CarGurus default and most useful. Price sorts use the total price (price + dealer fees). Other options sort by mileage, year, or distance. Defaults to 'deal_score'.",
            "default": "deal_score"
          },
          "searchUrls": {
            "title": "CarGurus search URLs (advanced)",
            "type": "array",
            "description": "Optional. Paste one or more CarGurus search result URLs copied from your browser (e.g. a filtered cargurus.com results page). When set, the Actor reuses each URL's exact filters and ignores postal code and distance above; make, model, year, price and mileage fields, if you also fill them, are checked on each listing. Use this for filters the fields above don't cover (trim, body type, colour). Each item is a full https URL.",
            "items": {
              "type": "string"
            }
          },
          "maxResults": {
            "title": "Max listings",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum number of listings to return per run (after filtering), summed across all search inputs. Controls cost: you are charged per listing returned. Accepts 1 to 10000. Defaults to 100.",
            "default": 100
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxy used to reach CarGurus. Defaults to Apify datacenter, which works for the US, Canada and UK. If a page is blocked, the Actor retries it on a backup route automatically. Leave as default.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}