List mechanics
const url = 'https://api.theboardgamedb.com/v1/mechanics?order=name&lang=fr&limit=100';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.theboardgamedb.com/v1/mechanics?order=name&lang=fr&limit=100'The mechanics in the catalog with the number of games linked to each, a page at a time.
Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”name alphabetical, games most games first.
Only names starting with this text. Case is ignored.
Only names with a word starting with this text: rosen finds Uwe Rosenberg. Case is ignored.
A language code (BCP 47) such as “fr”, “ja” or “pt-BR”. A game that has a name in that language is returned with it as name, and its main name as originalName; a regional code falls back on its language (“fr-CA” on “fr”), a language with no name of its own takes a regional one (“pt” shows a name the game only has in “pt-BR”), and a game with no name in the language keeps its main name. A game that has a cover of its own in that language (the box of its French edition) is returned with it as image; otherwise image is its main cover. Only names and covers are localised, and what a mechanic is (description, explanation of a term, in en, fr, de, es, it, pt or ja, else English): game descriptions and summaries stay in English.
Example
frThe nextCursor of the previous page.
Responses
Section titled “Responses”A page of mechanics.
object
object
How many games are linked to it.
What it is, in one or two sentences of our own, in the language of lang (en, fr, de, es, it, pt or ja; English for any other). null when none is written yet: every mechanic has one, other kinds may follow.
How many match, across all pages.
Example
{ "data": [ { "slug": "tile-placement", "name": "Tile placement", "games": 2, "description": "Players take tiles and add them to a shared map or their own area, matching edges or patterns. Where a tile goes decides what it scores and what it opens up." } ], "total": 1, "nextCursor": null}cursor or order is not an accepted value.
object
What went wrong, in plain English words. The wording may change: act on code.
A stable name for this refusal, for programs and for showing the message in another language. A code is never renamed; new ones may be added.
The numbers the sentence names, when it names any: for example { "max": 20 } with daily_photo_limit.
object
On every refusal over a limit (rate_limited, weekly_limit, coverage_limit): where higher limits are to be had. The same pricing address is in the Link header, with rel="payment".
object
The plans and prices page.
The account page, where a member makes a free API token.
Example
{ "error": "Game not found", "code": "game_not_found"}Over a request limit. rate_limited: a minute’s requests (without a token 60 per address; more with a token, see Limits above), or a paid plan’s day. weekly_limit: the week’s requests or game details are used up (params.max is the cap). coverage_limit: as many different games read over 28 days as the plan allows. The retry-after header says how many seconds to wait: 60 for a minute’s limit, until midnight UTC for a day’s, until Monday 00:00 UTC for a week’s.
object
What went wrong, in plain English words. The wording may change: act on code.
A stable name for this refusal, for programs and for showing the message in another language. A code is never renamed; new ones may be added.
The numbers the sentence names, when it names any: for example { "max": 20 } with daily_photo_limit.
object
On every refusal over a limit (rate_limited, weekly_limit, coverage_limit): where higher limits are to be had. The same pricing address is in the Link header, with rel="payment".
object
The plans and prices page.
The account page, where a member makes a free API token.
Example
{ "error": "Game not found", "code": "game_not_found"}