CarStat.dev
Connect key
Getting started

Pagination

Three kinds of list use three pagination styles. Pick the endpoint by what you need, not only by the filter set.

Page numbersScroll cursorID cursor
Endpoints/search, /car-options/cars/countries, /locations
Requestpage, perPageFollow next_urlafter_id, per_page
Page size2–50, default 501–2,000, default 5001–1,000, default 100
Depth limitpage × perPage ≤ 10,000None, cursor lives 1–15 minNone
Stop whenlinks.next is nullscroll_id is nullmeta.has_more is false
Use forUser-facing searchFull inventory syncSyncing dictionaries

Two /search quirks to code around. data can hold one more car than perPage (we saw 3 cars for perPage=2), so slice client-side if you need an exact size. And meta.total stops at 10,000: treat that value as "10,000 or more" and call /search/count with the same filters for the exact number.

/search · links and metaLive
{
  "links": {
    "first": "https://api.lotarius.com/search?perPage=2&page=1",
    "last": "https://api.lotarius.com/search?perPage=2&page=5000",
    "prev": null,
    "next": "https://api.lotarius.com/search?perPage=2&page=2"
  },
  "meta": {
    "current_page": 1,
    "from": 1,
    "last_page": 5000,
    "path": "https://api.lotarius.com/search",
    "per_page": 2,
    "to": 3,
    "total": 10000
  }
}
/countries · metaLive
{
  "data": [
    "…3 countries…"
  ],
  "meta": {
    "per_page": 3,
    "has_more": true,
    "next_after_id": 3
  }
}