Docs / API reference
Search a long list of items
POST /v1/items/search: the filters of GET /v1/items in a JSON body, for lists of up to 2,000 item IDs, like two shelves put together.
POST /v1/items/searchNo key needed while the catalog is public; with a key you get photo links on every page and a higher rate limit.
Everything GET /v1/items does, with its parameters in the body instead of the address, so ids can hold up to 2,000. Numbers are JSON numbers here: "players": 5, not "5", and null is an error rather than "no filter".
Request body
JSON.
| Field | Type | Required | Description |
|---|---|---|---|
q | string, up to 200 characters | No | Search names (alternate titles too, typos forgiven) and descriptions |
kind | one of: board_game, card_game, rpg, rpg_supplement, rpg_adventure, card_set, miniatures_game, expansion, edition, accessory, other | No | Editions and card sets are left out unless asked for |
players | integer, at least 1 | No | Playable with exactly this many |
max_playtime | integer, at least 1 | No | Minutes |
age | integer, at least 0 | No | Suitable for a player of this age |
year | integer | No | |
term | string, up to 200 characters | No | Term slug, e.g. deck-building |
entity | string, up to 200 characters | No | Credited person or organization: its id or slug, e.g. uwe-rosenberg |
external_id | string, up to 300 characters | No | ID in another system, e.g. a Wikidata QID or BoardGameGeek ID |
external_source | string, up to 100 characters | No | Narrow external_id to one source, e.g. gtin, wikidata, bgg |
belongs_to | UUID | No | Everything that belongs to this game: its expansions, editions, sets, and accessories, and theirs |
sort | one of: relevance, popular, name, year, updated | No | Defaults to relevance with a search, the order of ids with ids, and popular otherwise: well-linked, photographed, complete items first. |
limit | integer, 1–200 | No | Page size: 50, or up to 200 with ids |
offset | integer, at least 0, default 0 | No | |
ids | array of string, up to 2000 | No | Only these items, up to 2000, listed in this order. Merged-away ids give their survivor (see moved); unknown ones are listed in missing. |
Example
curl -X POST "https://tablearchive.dev/v1/items/search" \
-H "Authorization: Bearer $TA_KEY" \
-H "Content-Type: application/json" -d '{"ids":["9dde0e9c-530a-4d31-80f7-38637d823f59","f68a1b33-33b2-43aa-90a0-4f305312458d"],"players":5,"max_playtime":60}'const res = await fetch('https://tablearchive.dev/v1/items/search', {
method: 'POST',
headers: { Authorization: `Bearer ${process.env.TA_KEY}`, 'Content-Type': 'application/json' },
body: JSON.stringify({
"ids": [
"9dde0e9c-530a-4d31-80f7-38637d823f59",
"f68a1b33-33b2-43aa-90a0-4f305312458d"
],
"players": 5,
"max_playtime": 60
}),
})
const data = await res.json()import os, requests
res = requests.post(
"https://tablearchive.dev/v1/items/search",
headers={"Authorization": f"Bearer {os.environ['TA_KEY']}"},
json={
"ids": [
"9dde0e9c-530a-4d31-80f7-38637d823f59",
"f68a1b33-33b2-43aa-90a0-4f305312458d"
],
"players": 5,
"max_playtime": 60
},
)
data = res.json()Response
The same as GET /v1/items: total, items, and with ids, moved and missing. Pages still hold at most 200 items; send offset for the rest.
Notes
- Built for "what can we play tonight?": put everyone's shelves together and filter. See the worked example.
- Used in the guide Build a collection app.
Errors
| Status | When |
|---|---|
400 | A parameter or field is missing or invalid; details names each one |
429 | Rate limited; wait for Retry-After seconds |
Every error is JSON with an error message. See Rate limits and errors.