{
  "openapi": "3.1.0",
  "info": {
    "title": "Cars API",
    "version": "1.0.0",
    "description": "EPA fuel economy and specs for 50,000 US vehicles since 1984: MPG, CO2, EV range and annual fuel cost.\n\nUS vehicle catalog and fuel-economy specs for 50,000+ vehicles, model years 1984 through the upcoming one — make, model, year, EPA size class, drive, transmission, engine details (cylinders, displacement, turbo/supercharger, start-stop), fuel types including hybrid, plug-in hybrid and EV, city/highway/combined MPG (MPGe for electric vehicles), CO2 grams per mile, greenhouse-gas score, annual fuel cost, 5-year savings vs the average car, EV range and 240V charge time, and gas-guzzler-tax flag. Filter by make, model, year range, vehicle class, drive, fuel, cylinders, minimum MPG or electric-only; aggregate makes and models per year. Self-hosted dataset built from official EPA fueleconomy.gov data, refreshed daily — no third-party calls.",
    "contact": {
      "name": "Data and APIs",
      "url": "https://dataandapis.com/contact"
    },
    "termsOfService": "https://dataandapis.com/terms-of-service",
    "license": {
      "name": "Data and APIs Terms of Service",
      "url": "https://dataandapis.com/terms-of-service"
    },
    "x-logo": {
      "url": "https://dataandapis.com/images/cars.webp"
    }
  },
  "externalDocs": {
    "description": "Documentation, live tester and pricing",
    "url": "https://dataandapis.com/apis/cars"
  },
  "servers": [
    {
      "url": "https://api-cars.dataandapis.com"
    }
  ],
  "tags": [
    {
      "name": "Data",
      "description": "Cars API belongs to the Data category of the Data and APIs catalog."
    }
  ],
  "paths": {
    "/v1/vehicles/{id}": {
      "get": {
        "operationId": "getVehicle",
        "summary": "Get Vehicle",
        "description": "Get Vehicle endpoint of the Cars API. Costs 1 token per call.",
        "externalDocs": {
          "url": "https://dataandapis.com/apis/cars/get-vehicle"
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "49177"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "id": 49177,
                  "year": 2026,
                  "make": "Toyota",
                  "model": "GR Supra",
                  "vehicleClass": "Two Seaters",
                  "drive": "Rear-Wheel Drive",
                  "transmission": "Automatic (S8)",
                  "engine": {
                    "cylinders": 4,
                    "displacementL": 2,
                    "description": "SIDI",
                    "turbocharger": true,
                    "supercharger": false,
                    "startStop": true
                  },
                  "fuel": {
                    "type": "Premium",
                    "primary": "Premium Gasoline",
                    "alternative": null
                  },
                  "mpg": {
                    "city": 25,
                    "highway": 31,
                    "combined": 27
                  },
                  "emissions": {
                    "co2GramsPerMile": 322,
                    "ghgScore": 5
                  },
                  "cost": {
                    "fuelPerYear": 2800,
                    "barrelsPerYear": 11.02,
                    "youSaveSpend5Year": -3000
                  },
                  "ev": {
                    "rangeMiles": null,
                    "rangeCity": null,
                    "rangeHighway": null,
                    "motor": null,
                    "hoursToCharge240v": null
                  },
                  "guzzlerTax": false,
                  "epaCreatedOn": "Thu Sep 25 00:00:00 EDT 2025",
                  "epaModifiedOn": "Tue Oct 28 00:00:00 EDT 2025"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key"
          },
          "402": {
            "description": "Subscription past due; the response carries a payment_url"
          },
          "429": {
            "description": "Monthly token allowance exhausted"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1/vehicles": {
      "get": {
        "operationId": "listVehicles",
        "summary": "List Vehicles",
        "description": "List Vehicles endpoint of the Cars API. Costs 1 token per call.",
        "externalDocs": {
          "url": "https://dataandapis.com/apis/cars/list-vehicles"
        },
        "parameters": [
          {
            "name": "class",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "Two Seaters"
          },
          {
            "name": "cylinders",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "6"
          },
          {
            "name": "drive",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "All-Wheel"
          },
          {
            "name": "electric",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "true"
          },
          {
            "name": "fuel",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "Electricity"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "20"
          },
          {
            "name": "make",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "Toyota"
          },
          {
            "name": "maxYear",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "2027"
          },
          {
            "name": "minCombinedMpg",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "30"
          },
          {
            "name": "minYear",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "2020"
          },
          {
            "name": "model",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "4Runner"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "1"
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "supra"
          },
          {
            "name": "year",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "2026"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "total": 92,
                  "page": 1,
                  "limit": 20,
                  "count": 1,
                  "results": [
                    {
                      "id": 49123,
                      "year": 2026,
                      "make": "Toyota",
                      "model": "4Runner 2WD",
                      "vehicleClass": "Standard Sport Utility Vehicle 2WD",
                      "drive": "Rear-Wheel Drive",
                      "transmission": "Automatic (S8)",
                      "engine": {
                        "cylinders": 4,
                        "displacementL": 2.4,
                        "description": "SIDI",
                        "turbocharger": true,
                        "supercharger": false,
                        "startStop": true
                      },
                      "fuel": {
                        "type": "Regular",
                        "primary": "Regular Gasoline",
                        "alternative": null
                      },
                      "mpg": {
                        "city": 20,
                        "highway": 26,
                        "combined": 22
                      },
                      "emissions": {
                        "co2GramsPerMile": 404,
                        "ghgScore": 4
                      },
                      "cost": {
                        "fuelPerYear": 2100,
                        "barrelsPerYear": 13.5,
                        "youSaveSpend5Year": -750
                      },
                      "ev": {
                        "rangeMiles": null,
                        "rangeCity": null,
                        "rangeHighway": null,
                        "motor": null,
                        "hoursToCharge240v": null
                      },
                      "guzzlerTax": false
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key"
          },
          "402": {
            "description": "Subscription past due; the response carries a payment_url"
          },
          "429": {
            "description": "Monthly token allowance exhausted"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1/vehicles/random": {
      "get": {
        "operationId": "randomVehicles",
        "summary": "Random Vehicles",
        "description": "Random Vehicles endpoint of the Cars API. Costs 1 token per call.",
        "externalDocs": {
          "url": "https://dataandapis.com/apis/cars/random-vehicles"
        },
        "parameters": [
          {
            "name": "amount",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "3"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "count": 2,
                  "results": [
                    {
                      "id": 41234,
                      "year": 2020,
                      "make": "Kia",
                      "model": "Sorento FWD",
                      "vehicleClass": "Small Sport Utility Vehicle 2WD",
                      "mpg": {
                        "city": 22,
                        "highway": 29,
                        "combined": 25
                      }
                    },
                    {
                      "id": 43567,
                      "year": 2021,
                      "make": "Mercedes-Benz",
                      "model": "AMG GLE53 4matic Plus Coupe",
                      "vehicleClass": "Standard Sport Utility Vehicle 4WD",
                      "mpg": {
                        "city": 18,
                        "highway": 23,
                        "combined": 20
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key"
          },
          "402": {
            "description": "Subscription past due; the response carries a payment_url"
          },
          "429": {
            "description": "Monthly token allowance exhausted"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1/vehicles/makes": {
      "get": {
        "operationId": "vehicleMakes",
        "summary": "Vehicle Makes",
        "description": "Vehicle Makes endpoint of the Cars API. Costs 1 token per call.",
        "externalDocs": {
          "url": "https://dataandapis.com/apis/cars/vehicle-makes"
        },
        "parameters": [
          {
            "name": "year",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "2026"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "count": 46,
                  "makes": [
                    {
                      "make": "BMW",
                      "count": 108
                    },
                    {
                      "make": "Toyota",
                      "count": 92
                    },
                    {
                      "make": "Mercedes-Benz",
                      "count": 76
                    },
                    {
                      "make": "Chevrolet",
                      "count": 68
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key"
          },
          "402": {
            "description": "Subscription past due; the response carries a payment_url"
          },
          "429": {
            "description": "Monthly token allowance exhausted"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1/vehicles/models": {
      "get": {
        "operationId": "vehicleModels",
        "summary": "Vehicle Models",
        "description": "Vehicle Models endpoint of the Cars API. Costs 1 token per call.",
        "externalDocs": {
          "url": "https://dataandapis.com/apis/cars/vehicle-models"
        },
        "parameters": [
          {
            "name": "make",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "Porsche"
          },
          {
            "name": "year",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "2026"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "count": 55,
                  "make": "Porsche",
                  "models": [
                    {
                      "model": "911 Carrera",
                      "firstYear": 2026,
                      "lastYear": 2026,
                      "count": 1
                    },
                    {
                      "model": "911 Carrera 4 GTS",
                      "firstYear": 2026,
                      "lastYear": 2026,
                      "count": 1
                    },
                    {
                      "model": "Macan 4 Electric",
                      "firstYear": 2026,
                      "lastYear": 2026,
                      "count": 1
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key"
          },
          "402": {
            "description": "Subscription past due; the response carries a payment_url"
          },
          "429": {
            "description": "Monthly token allowance exhausted"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ApiKey": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Api-Key",
        "description": "Create a free key at https://dataandapis.com/sign-up. 500 tokens a month on the Free plan; this API costs 1 token per call."
      }
    }
  },
  "security": [
    {
      "ApiKey": []
    }
  ]
}