{
  "openapi": "3.0.1",
  "info": {
    "title": "CarGurus Listings Scraper · US, CA, UK search · $1/1K",
    "description": "Get CarGurus car listings for used-car price research, inventory tracking and dealer analysis. Prices, mileage, specifications, VIN, dealer details and photos from US, Canada and UK searches. Filter by ZIP, distance, make and model. $1/1K listings.",
    "version": "0.1",
    "x-build-id": "uoHTEgCwVkTl247er"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/mlg14~cargurus-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-mlg14-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/mlg14~cargurus-scraper/runs": {
      "post": {
        "operationId": "runs-sync-mlg14-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/mlg14~cargurus-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-mlg14-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",
        "properties": {
          "startUrls": {
            "title": "Search URLs",
            "type": "array",
            "description": "Optional CarGurus search URLs on the US, Canada or UK site. Example: https://www.cargurus.com/search?distance=50&sortType=BEST_MATCH&zip=10001. Leave empty to build the search from searchCountry and zip; when set, URLs replace those filters.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "searchCountry": {
            "title": "Country",
            "enum": [
              "US",
              "CA",
              "UK"
            ],
            "type": "string",
            "description": "Marketplace used when no search URL is provided. Allowed values: US, CA, UK. Example: US. Use CA or UK together with a Canadian or British postal code in zip.",
            "default": "US"
          },
          "zip": {
            "title": "ZIP or postal code",
            "type": "string",
            "description": "Postal code that centres the filter-based search. Example: 10001 (US), M4B 1B4 (Canada) or SW1A 1AA (UK). Use a code matching searchCountry; ignored when startUrls is set.",
            "default": "10001"
          },
          "distance": {
            "title": "Search radius",
            "minimum": 1,
            "type": "integer",
            "description": "Search radius around zip in local distance units (miles in the US and UK). Example: 50. Use a larger radius for rare models or a smaller one for local inventory.",
            "default": 50
          },
          "sortType": {
            "title": "Sort by",
            "enum": [
              "BEST_MATCH",
              "DEAL_SCORE",
              "PRICE",
              "MILEAGE",
              "YEAR",
              "DISTANCE",
              "LISTING_DATE"
            ],
            "type": "string",
            "description": "Order of results. Allowed values: BEST_MATCH, DEAL_SCORE, PRICE, MILEAGE, YEAR, DISTANCE, LISTING_DATE. Example: PRICE. Use LISTING_DATE for fresh listings or DEAL_SCORE for bargains.",
            "default": "BEST_MATCH"
          },
          "sortDirection": {
            "title": "Sort direction",
            "enum": [
              "ASC",
              "DESC"
            ],
            "type": "string",
            "description": "Direction of the sort. Allowed values: ASC (low to high) or DESC (high to low). Example: DESC with sortType YEAR for newest cars first. Use ASC for cheapest first.",
            "default": "ASC"
          },
          "makeModelTrimPaths": {
            "title": "Make and model path",
            "type": "string",
            "description": "Optional make, model or trim path copied from a filtered CarGurus search URL. Example: m4 or m124,m124/d1751. Leave empty for all vehicles; use it to restrict results to one model."
          },
          "maxPages": {
            "title": "Maximum pages per search",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many result pages per search, e.g. 2. Set 0 for all available pages. Use 1 or 2 for quick tests and 0 for complete inventory pulls.",
            "default": 0
          },
          "maxItems": {
            "title": "Maximum listings",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many listings across all searches, e.g. 50. Set 0 for no item cap. Use a small value for tests to keep runs short and cheap.",
            "default": 100
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Proxy settings for search and detail requests. Leave the default Apify proxy.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}