Skip to content

Bodek API documentation

Every Bodek API follows the same rules: one GET per collection, JSON in and out, and the same four query conventions for filtering, searching, sorting and paging. Learn them once and every dataset on this site works the same way.

Bodek API is part of your Bodek subscription. Every endpoint needs a key, and a key works for as long as the account that owns it has access to the API.

Quickstart

Create a key on your keys page, then call a collection. Every endpoint takes the same bearer header.

export BODEK_API_KEY=bk_live_…

curl "https://api.bodek.us/v1/vehicles/makes?limit=3" \
  -H "Authorization: Bearer $BODEK_API_KEY"

The catalogue is the one endpoint that needs no key: it lists every published API, so you can see what is available before you have one.

curl "https://api.bodek.us/v1"

Authentication

Every endpoint except /v1 and /v1/health needs a key, sent as a bearer token. Sign in to create one.

curl "https://api.bodek.us/v1/vehicles/makes" \
  -H "Authorization: Bearer $BODEK_API_KEY"

X-API-Key: <your_key> works too. A key in the query string does not: query strings end up in server logs, browser history and Referer headers, so ?key= is rejected with a 400 rather than quietly accepted.

A key carries the list of APIs it may read, an optional expiry, its own rate limits, and an optional restriction to specific domains or IP addresses. Treat it like a password: it is shown once, stored only as a hash, and can be revoked at any time.

A key is only as live as the account behind it. If that account's access to Bodek API ends — the subscription lapses, the plan changes, or an owner revokes the grant — its keys stop working at once and answer 402 subscription_required, without anyone having to go and revoke them one by one.

Response shape

A collection returns a data array and a pagination object.

{
  "data": [
    { "id": 1, "name": "Acura", "slug": "acura" }
  ],
  "pagination": {
    "limit": 50,
    "offset": 0,
    "total": 163,
    "has_more": true,
    "next": "https://api.bodek.us/v1/vehicles/makes?limit=50&offset=50"
  }
}

A single record returns just data, as an object.

{
  "data": { "id": 1, "name": "Acura", "slug": "acura" }
}

Add ?pretty=1 to any request to get indented JSON while you explore.

Filtering

Any field marked filterable on an API's reference page can be used as a query parameter. Bare equality needs no operator; everything else uses a __ suffix.

OperatorExampleMeaning
(none)?make=toyotaexactly equal
__ne?make__ne=toyotanot equal
__gt __gte?year__gte=2015greater than (or equal)
__lt __lte?year__lte=1999less than (or equal)
__in?body_type__in=SUBN,PICKany of a comma-separated list
__nin?body_type__nin=MCY,ATVnone of a list
__contains?name__contains=civsubstring (text fields)
__starts __ends?name__starts=camprefix / suffix (text fields)
__null?years__null=trueis (or is not) empty

Filters combine with AND. A parameter that names an unknown or non-filterable field is an error rather than being ignored, so a typo never silently returns the whole table. At most 12 filters and 50 values per list.

q matches a substring across every field marked searchable on that collection. Use it for type-ahead and lookup boxes; use filters when you know the exact value.

curl "https://api.bodek.us/v1/vehicles/makes?q=accord&limit=5"

Sorting

sort takes up to 3 comma-separated field names. Prefix a name with - for descending. Results are always given a stable tiebreaker, so the same record never appears on two pages.

curl "https://api.bodek.us/v1/vehicles/makes?sort=-year_max,name"

Choosing fields

fields trims the response to the columns you actually use.

curl "https://api.bodek.us/v1/vehicles/makes?fields=id,name&limit=3"

Images and files

Some records carry a file as well as columns — the Vehicles API publishes every manufacturer's logo this way. A collection's files are listed on its reference page and in GET /v1/{api} under files, and each one appears on every record as an object named after the file.

{
  "id": 20,
  "name": "BMW",
  "slug": "bmw",
  "logo": {
    "available": true,
    "generated": false,
    "url": "https://api.bodek.us/v1/vehicles/makes/20/logo",
    "content_type": "image/png",
    "bytes": 2731,
    "width": 128,
    "height": 128,
    "checksum": "sha256:9f2c…",
    "updated_at": "2026-08-10T23:12:52Z"
  }
}

url returns the file itself. It is part of the API, not a public CDN link, so it takes the same key as everything else and answers 401, 402 or 403 under exactly the same rules as the JSON. Nothing about a record is readable through its files that is not readable through its row.

curl "https://api.bodek.us/v1/vehicles/makes/20/logo" \
  -H "Authorization: Bearer $BODEK_API_KEY" -o bmw.png

Fetch each file once

checksum is the SHA-256 of the bytes, and it is also the response's ETag. Two records that share artwork — a model's make_logo and that make's own logo — carry the same checksum because they are the same file: we store one copy and serve it from where it lives, so you can key your own cache on checksum and download each distinct image exactly once. Send the ETag back as If-None-Match for an empty 304.

File responses are Cache-Control: private — they needed a key, so no shared proxy may keep them — and carry X-Asset-Checksum, X-Asset-Width and X-Asset-Height for clients that only make a HEAD request.

Showing an image in a browser

An <img src> cannot send an Authorization header, and putting your key in a URL would leak it into history, logs and Referer headers. Add ?sign=1 and each file also comes back with a signed_url: a link that works on its own for a few minutes.

curl "https://api.bodek.us/v1/vehicles/makes?limit=50&sign=1&expires_in=900" \
  -H "Authorization: Bearer $BODEK_API_KEY"

A signature covers one file, for one key, until one expiry — editing any part of the URL voids it. It is bound to the key that asked for it, so revoking that key, or losing access to the API, kills every link it ever signed on the next request. expires_in is in seconds, up to 86,400 (600 by default). Treat a signed URL as a short-lived secret: a response that contains one is never cached, by us or by you.

Missing files and skipping files

Where a collection says placeholder, a record with no file on hand still answers with an image — its initials, drawn on demand — and the record's generated flag is true so you can tell it from real artwork. Add ?fallback=none to the file URL to get a 404 instead.

Fetching a file is a request like any other and counts against the key's rate limit, so a page showing fifty logos costs fifty calls the first time and nothing after that, once your client honours the ETag. If you only want columns, ?assets=0 leaves files out entirely, and naming a file in ?fields= works the same way it does for a column (the record's identifier always comes with it).

curl "https://api.bodek.us/v1/vehicles/makes?fields=id,name,logo&limit=5"

Everything here is read-only, like the rest of the API: there is no endpoint that uploads, replaces or deletes a file.

Pagination

limit (max 200, default 50) with either offset or page. Follow pagination.next until it is null rather than building the URL yourself.

Paging stops at offset 50,000. Past that, narrow the query with a filter — deep offsets get slower for everyone and there is almost always a better filter available.

Caching

Reference data changes rarely, so responses carry Cache-Control and an ETag. Send the ETag back as If-None-Match and an unchanged response comes back as an empty 304, which does not count against your rate limit's payload.

curl "https://api.bodek.us/v1/vehicles/makes" \
  -H 'If-None-Match: "a1b2c3…"'

Rate limits

Every response carries the current ceilings:

HeaderMeaning
X-RateLimit-Limit-Minuterequests allowed per minute
X-RateLimit-Limit-Dayrequests allowed per day
Retry-Afterseconds to wait, sent with a 429

Limits are set per key when you create it, with a ceiling of 600 requests a minute and 200,000 a day. Give each application its own key so one noisy job cannot use up another's budget.

Errors

Every failure uses the same envelope. code is stable and safe to branch on; message is for humans.

{
  "error": {
    "code": "unknown_parameter",
    "message": "Unknown query parameter 'colour'.",
    "details": { "filterable": ["make", "body_type", "year_min"] },
    "request_id": "3f9c1a2b7d4e5f60"
  }
}
StatusWhen
400A parameter is unknown, the wrong type, or out of range.
401A key is required, missing, malformed, revoked or expired.
402The account that owns the key no longer has access to Bodek API.
403The key is valid but not allowed to read this API, origin or IP.
404No such API, collection or record.
405Anything other than GET, HEAD or OPTIONS.
429Rate limited. Wait for Retry-After seconds.
503The dataset's source is briefly unavailable. Retry.

A 500 carries a request_id, also sent as the X-Request-Id header. Quote it to support and we can find the exact request in our logs.

OpenAPI

Each API publishes an OpenAPI 3.1 description, generated from the same definition that serves the data.

curl "https://api.bodek.us/v1/vehicles/openapi.json"

Point a client generator at it, or load it into Postman or Insomnia.