CarBaseCarBaseCarBase
CarBase

Specs, prices and colors of every new US-market car, 2022 to 2025.

Developers

  • Getting started
  • API Reference
  • Pricing
  • Sign in

© 2026 CarBase

  • Documentation
  • API Reference
  • Pricing
CarBase APIGetting startedCompareConventionsData dictionaryErrorsMakesModelsReference dataTrims
powered by apitogo
Documentation

Errors

The API uses standard HTTP status codes. Errors always return a JSON body.

Code
{ "error": "bad_request", "message": "A short explanation of what went wrong" }
FieldDescription
errorError code, stable and safe to check in code
messageHuman-readable explanation. The text may change

Status codes

StatuserrorWhen
200Success
400bad_requestA parameter is invalid, such as a non-numeric ID, an unknown sort field or limit over 100
404not_foundThe make, model or trim does not exist, or the URL is not an API route
500internal_errorUnexpected server error

Examples

Unknown sort field:

TerminalCode
curl "http://localhost:3000/api/trims?sort=bogus"
Code
{ "error": "bad_request", "message": "'sort' must be one of: price, year, make, model, horsepower, torque, mpg, range, weight, towing, seats (prefix '-' for descending)" }

ID that is not a number:

TerminalCode
curl http://localhost:3000/api/trims/abc
Code
{ "error": "bad_request", "message": "'id' must be an integer >= 1" }

Trim that does not exist:

TerminalCode
curl http://localhost:3000/api/trims/1
Code
{ "error": "not_found", "message": "Trim 1 not found" }

Unknown route:

TerminalCode
curl http://localhost:3000/api/nope
Code
{ "error": "not_found", "message": "No route for GET /api/nope" }

A search that matches nothing is not an error. It returns 200 with an empty data array.

Last modified on November 7, 2026
Data dictionaryMakes
On this page
  • Status codes
  • Examples
JSON
JSON
JSON
JSON
JSON