{
  "openapi": "3.0.1",
  "info": {
    "title": "CarGurus Used Car Listings, Deal Ratings & Price Drops",
    "description": "Search CarGurus.com used cars by make, model and ZIP code, or from a CarGurus address, and get one flat row per listing: price, deal rating, price drop, mileage, dealer, VIN, URL. Newest listings first, for inventory and price-drop alerts.",
    "version": "0.1",
    "x-build-id": "1fAtgGlJpU2UQlbA1"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/superslowsloth~cargurus-listings/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-superslowsloth-cargurus-listings",
        "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/superslowsloth~cargurus-listings/runs": {
      "post": {
        "operationId": "runs-sync-superslowsloth-cargurus-listings",
        "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/superslowsloth~cargurus-listings/run-sync": {
      "post": {
        "operationId": "run-sync-superslowsloth-cargurus-listings",
        "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": "The make to search, as CarGurus names it (for example Honda, Ford, Mercedes-Benz). Case, spaces and hyphens do not matter. The actor reads CarGurus' own list of makes to find it, and stops with that list when the make is not on it. Needs the ZIP code. Use this with Model, or Start URLs, or both."
          },
          "model": {
            "title": "Model",
            "type": "string",
            "description": "Optional. Only this model of the make, as CarGurus names it (for example Civic, CR-V, F-150). Looked up in CarGurus' list of that make's models near your ZIP code. Leave empty for every model of the make."
          },
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "CarGurus used-car search addresses copied from your browser, one per line, for example https://www.cargurus.com/Cars/l-Used-Honda-Civic-d586 or a https://www.cargurus.com/search?... address with filters. The make or model id at the end of the address and the filters in it are kept; page, ZIP code, distance and sort are set from the fields below. Only cargurus.com addresses are accepted.",
            "items": {
              "type": "string"
            }
          },
          "zipCode": {
            "title": "ZIP code",
            "type": "string",
            "description": "A five-digit US ZIP code, for example 60601. Listings are searched around it and each row carries its distance from it. Required for Make and Model; for a Start URL it may come from the address instead. CarGurus places a search with no ZIP code by the address of the machine asking, which is not repeatable, so the actor never sends one without it. A ZIP code CarGurus does not recognise stops the run before anything is charged."
          },
          "distance": {
            "title": "Search radius",
            "enum": [
              "10",
              "25",
              "50",
              "75",
              "100",
              "150",
              "200",
              "500",
              "nationwide",
              "as-in-url"
            ],
            "type": "string",
            "description": "Only listings at dealers within this many miles of the ZIP code, or nationwide (every dealer in the country, with the distance in each row). 'As in the start URL' keeps the distance of a start URL and uses 50 miles when it has none.",
            "default": "50"
          },
          "sort": {
            "title": "Sort order",
            "enum": [
              "newest-listings",
              "oldest-listings",
              "best-deals",
              "price-asc",
              "price-desc",
              "mileage-asc",
              "mileage-desc",
              "nearest",
              "year-desc",
              "year-asc",
              "best-match",
              "as-in-url"
            ],
            "type": "string",
            "description": "The order CarGurus lists the results in. 'Newest listings first' orders by how long a listing has been up and is the one to schedule for new-inventory alerts; 'Best deals first' orders by CarGurus' deal score. CarGurus puts its paid placements (featured and priority listings) at the top of a page whatever the sort. The actor checks that CarGurus really applied the sort and stops the run, at no charge, when it did not. 'As in the start URL' sends no sort, so a start URL keeps its own.",
            "default": "newest-listings"
          },
          "priceDropsOnly": {
            "title": "Only listings with a price drop",
            "type": "boolean",
            "description": "Keep only listings with a price-drop record: the actor asks CarGurus for its 'recent price drops' filter and drops the few listings that filter lets through without a drop record (7 of 22 on a sampled page). Each row then carries the size of the drop, the price before it and when it was recorded. Combine with 'Newest listings first' for a price-drop alert.",
            "default": false
          },
          "minPrice": {
            "title": "Minimum price (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Optional. Only listings asking at least this many US dollars."
          },
          "maxPrice": {
            "title": "Maximum price (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Optional. Only listings asking at most this many US dollars."
          },
          "maxMileage": {
            "title": "Maximum mileage",
            "minimum": 0,
            "type": "integer",
            "description": "Optional. Only cars with at most this many miles on the odometer."
          },
          "minYear": {
            "title": "Earliest model year",
            "minimum": 1900,
            "maximum": 2100,
            "type": "integer",
            "description": "Optional. Only cars of this model year or newer, for example 2018."
          },
          "maxYear": {
            "title": "Latest model year",
            "minimum": 1900,
            "maximum": 2100,
            "type": "integer",
            "description": "Optional. Only cars of this model year or older, for example 2022."
          },
          "maxItems": {
            "title": "Max listings per search",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Read at most this many listings for each make/model and each start URL. CarGurus serves about 22 listings per result page and each page is 1.6 to 3 MB, so 100 listings take 5 pages. Up to 2,000 are accepted per search; a listing that two searches both find is returned and charged once.",
            "default": 100
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify proxy (automatic datacenter exits) is the default. CarGurus refuses some exit addresses (HTTP 403 or 406, or a page without listings); the request is retried from a fresh address and, if three in a row are refused, continues from the platform's own address. The residential proxy is never used: a result page is 2 to 3 MB and residential traffic is billed per byte. Switch the proxy off, or supply your own proxies, to use exactly that and nothing else.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}