{
  "openapi": "3.0.1",
  "info": {
    "title": "CarGurus Scraper: Used Car Prices, Deal Ratings, VIN",
    "description": "Scrape CarGurus used car listings by ZIP code and radius: price, deal rating, savings vs market in $ and %, VIN, mileage, days on market, accident and owner history, photos, plus dealer name, rating and business phone for lead lists. Pay per listing, no monthly fee.",
    "version": "0.1",
    "x-build-id": "bXiMFqnNFWi4ve6aJ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/deepurple~cargurus-listings-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-deepurple-cargurus-listings-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/deepurple~cargurus-listings-scraper/runs": {
      "post": {
        "operationId": "runs-sync-deepurple-cargurus-listings-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/deepurple~cargurus-listings-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-deepurple-cargurus-listings-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": {
          "zipCodes": {
            "title": "ZIP codes",
            "type": "array",
            "description": "US ZIP codes to search around (5 digits). Each ZIP is searched separately; duplicate vehicles are returned once.",
            "default": [
              "90210"
            ],
            "items": {
              "type": "string"
            }
          },
          "searchUrls": {
            "title": "CarGurus search URLs (optional)",
            "type": "array",
            "description": "Alternative to ZIP codes: paste cargurus.com search-result URLs. ZIP, radius, year, price and mileage filters in the URL are honored.",
            "items": {
              "type": "string"
            }
          },
          "radiusMiles": {
            "title": "Search radius",
            "enum": [
              "10",
              "25",
              "50",
              "75",
              "100",
              "150",
              "200",
              "250",
              "500",
              "nationwide"
            ],
            "type": "string",
            "description": "Distance around each ZIP code.",
            "default": "50"
          },
          "makes": {
            "title": "Makes",
            "type": "array",
            "description": "Only keep these makes, for example Toyota, Honda, Ford. Leave empty for all makes.",
            "items": {
              "type": "string"
            }
          },
          "models": {
            "title": "Models",
            "type": "array",
            "description": "Only keep these models, for example Camry, Civic, F-150. Leave empty for all models.",
            "items": {
              "type": "string"
            }
          },
          "entityIds": {
            "title": "CarGurus make/model IDs (advanced)",
            "type": "array",
            "description": "Optional CarGurus entity IDs such as m191 (make) or d2103 (model). They narrow the search on the CarGurus side, which saves pages when you target one model.",
            "items": {
              "type": "string"
            }
          },
          "yearFrom": {
            "title": "Year from",
            "minimum": 1950,
            "maximum": 2100,
            "type": "integer",
            "description": "Oldest model year."
          },
          "yearTo": {
            "title": "Year to",
            "minimum": 1950,
            "maximum": 2100,
            "type": "integer",
            "description": "Newest model year."
          },
          "priceMin": {
            "title": "Minimum price (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Skip listings priced below this amount in US dollars. Leave empty for no lower limit."
          },
          "priceMax": {
            "title": "Maximum price (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Skip listings priced above this amount in US dollars. Leave empty for no upper limit."
          },
          "mileageMin": {
            "title": "Minimum mileage",
            "minimum": 0,
            "type": "integer",
            "description": "Skip vehicles with fewer miles than this. Leave empty for no lower limit."
          },
          "mileageMax": {
            "title": "Maximum mileage",
            "minimum": 0,
            "type": "integer",
            "description": "Skip vehicles with more miles than this. Leave empty for no upper limit."
          },
          "dealRatings": {
            "title": "Deal ratings",
            "type": "array",
            "description": "Only keep listings with these CarGurus deal ratings.",
            "items": {
              "type": "string",
              "enum": [
                "GREAT_PRICE",
                "GOOD_PRICE",
                "FAIR_PRICE",
                "HIGH_PRICE",
                "OVERPRICED",
                "NA"
              ],
              "enumTitles": [
                "Great deal",
                "Good deal",
                "Fair deal",
                "High price",
                "Overpriced",
                "No rating"
              ]
            }
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "BEST_DEAL",
              "LOWEST_PRICE",
              "HIGHEST_PRICE",
              "LOWEST_MILEAGE",
              "HIGHEST_MILEAGE"
            ],
            "type": "string",
            "description": "Order in which CarGurus returns listings.",
            "default": "BEST_DEAL"
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Total number of listings to return across all searches. Billing is per returned listing.",
            "default": 50
          },
          "maxPagesPerSearch": {
            "title": "Max result pages per search",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Safety cap on how many result pages are read for one ZIP code (about 15 listings per page).",
            "default": 60
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Residential US proxies are used by default and recommended.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "US"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}