Explore the DarkerDB API documentation, your gateway to harnessing Dark and Darker game data. Use our APIs to track in-game market trends, analyze live player stats, and access detailed item data, including stats, descriptions, and market data. Download game assets like item icons to enhance your apps or generate interactive tooltips. Feel free to get in touch with us in our Discord for support or to request new features or data!

Pagination

There are two pagination modes. Cursor is the default on most list endpoints (items, monsters, quests, …): it is efficient because it leverages database indexes, but it does not report a total count. Page is offset-based and used by a smaller set of endpoints (patches, changelog, leaderboards); it reports a total count, which is convenient on smaller resources. Both accept an additional &limit=# parameter — it defaults to 50 and may be between 1 and 200. Every paginated response carries a pagination block in the envelope with the request meta and the next cursor.

Cursor

Cursor pagination resumes where the previous request left off. Each response's pagination.next is the cursor for the next page — pass it straight back as &cursor=<next>. When next is null you have reached the end. Cursors are opaque (for most endpoints, the last row's id) — read them from the response rather than constructing them by hand.

Paged

Page-based endpoints accept &page=# and add page, num_pages, and total to the pagination block. Endpoints that don't support paging (most of the high-volume catalogs, e.g. /v2/items) ignore the parameter and report these fields as null.

On very large collections (/v2/market), total and num_pages are estimates once a result set exceeds ~50,000 rows. Smaller (e.g. filtered) result sets report exact counts.

Sort

sort is a global parameter on every list endpoint. Two forms:

  • ?sort=<field>:<order> — sort by a named field, where order is asc or desc (e.g. ?sort=gear_score:desc).
  • ?sort=asc / ?sort=desc — order only; sorts by the endpoint's default sort field in that direction.

Omitting sort uses the endpoint's default field and order. The sortable fields are per-endpoint — most catalogs sort on id only, while richer lists add a sensible few (items: gear_score; monsters: max_health, adventure_points; market: price, price_per_unit, created_at). An unknown field returns 400. Cursor pages stay correct under any sort — the cursor encodes the (sort value, id) pair so there are no duplicates or gaps. (Single field for now; comma-separated multi-field sort is reserved — only the first field:order is applied.)