Looking things up
Every row answers to more than one name, and all of them reach the same row. Which names depends on the API.
On Tibia: article id, slug or title
curl https://api.tibia.dev/v1/items/2119 # the wiki article id
curl https://api.tibia.dev/v1/items/gold-coin # the slug
curl "https://api.tibia.dev/v1/items/Gold%20Coin" # the title, URL-encodedAll three answer the Gold Coin. Use whichever you happen to be holding; there is no lookup table to consult first.
The number is the wiki article id, published as wiki_article_id in every payload. It is never this API's database key: the database is rebuilt from scratch on every import, and the article id survives it. Store the article id or the slug; both are stable.
The article id is not the game's client id. The Gold Coin is article
2119and client3031: two numbers for one item. Items, effects, missiles and tiles carry the client id asclient_id, and a bare number in a URL always means the article id, because 450 numbers are valid as both and name different things.
Ask for a client id by name:
curl https://api.tibia.dev/v1/items/client:3031A client id asked for as a bare number answers 404, with a hint saying what it is:
{
"message": "Not found.",
"hint": "3031 is not a wiki article id. It is the client id of Gold Coin (wiki_article_id 2119). Ask for it by that id, or by client:3031."
}Around thirty sprites are shared by two articles. For those the detail route has no single row to give, and the listing answers with both: /v1/items?filter[client_id]=694.
On Huntera: key or slug
curl https://huntera.tibia.dev/v1/hunts/rat-hunt # the game's own key
curl https://huntera.tibia.dev/v1/hunts/rat-cellars # the slug, from its nameBoth answer the Rat Cellars. The key is the identifier the game itself uses, so when the game renames something, the name and the slug change and the key stays put. Store the key. It is matched without regard to case, and a name works too, since anything that is not a key is slugged: /v1/creatures/Acolyte%20of%20the%20Cult finds acolyteOfTheCult.
Outfits are the one exception. The game gives an outfit two looktypes and no id of its own, so an outfit's key is the slug of its name, and renaming an outfit moves its key.
Slugs are forgiving
The slug in a URL is slugged again before the lookup, and slugging is idempotent. So a title with punctuation works either way round:
curl "https://api.tibia.dev/v1/creatures/Dragon%20Lord"
curl https://api.tibia.dev/v1/creatures/dragon-lordThe same rule applies to filters that name an article or a vocabulary: ?filter[class]=The%20Undead and ?filter[class]=the-undead are one query.
Nested listings
On Tibia, relations worth browsing get a listing of their own, so you rarely have to page a big detail payload:
curl https://api.tibia.dev/v1/creatures/dragon-lord/drops
curl https://api.tibia.dev/v1/items/gold-coin/dropped-by
curl https://api.tibia.dev/v1/cities/thais/housesThese are ordinary listings; everything in Narrowing a listing applies to them too. Huntera has none: its detail routes carry their relations, and its listings take them through include.
What is not there
An article the wiki has retired (deleted, or merged into another page) stays out of listings and answers 404. There is no flag to bring it back; the API will not serve you rows the wiki itself no longer has.
That is different from an article whose status says it has left the game. Those are still on the wiki, so they are served like any other row, and filter[status] narrows to them on the listings that offer it:
curl "https://api.tibia.dev/v1/items?filter%5Bstatus%5D=deprecated"Updated about 2 months ago