Tags

How the data and the API work, and why.

Tags form a tree. Filter by a tag id and you get every series tagged with that tag or anything below it. Each tag on a series also has a weight that says how central it is to the story.

The tag tree#↑

Every tag has an id, a parent_id (null for a root), a level (1 for a root) and a name_path such as Themes > Horror > Body Horror. Get the tree from Get all tags:

curl "https://api.mangabaka.org/v1/tags?depth=1"
Parameter What it does
q Rank tags by name and path. Use it to find an id from a word.
parent Only this tag and everything below it.
depth Levels to include, 1 to 6. Counted from parent when given, else the roots.
id Exactly these tags, up to 100. Descendants are NOT included.
is_genre true for genres only, false for everything but genres.

parent=44&depth=1 returns Horror and its direct children:

curl "https://api.mangabaka.org/v1/tags?parent=44&depth=1"

A tag filter matches the whole subtree#↑

In Search for series, tag takes tag ids, and each id also matches every tag below it. tag=44 (Horror) returns Delicious in Dungeon, which carries Body Horror and Cosmic Horror but not Horror itself. There is no way to ask for a tag without its descendants.

tag_not works the same way. This returns nothing, because every Body Horror series is inside the Horror subtree:

curl "https://api.mangabaka.org/v2/series/search?tag=421&tag_not=44"

Several tag ids are combined with AND. Pass tag_mode=or to match any of them. tag and tag_not each take up to 100 ids.

The id parameter on the tags endpoint is the exception: it resolves exactly the ids you send.

Genres#↑

A genre is a tag with is_genre: true. Genres sit inside the tree like any other tag, for example Themes > Horror or Settings > Fantasy. List them with:

curl "https://api.mangabaka.org/v1/tags?is_genre=true"

The v2 search has no separate genre parameter. Filter by the genre's tag id in tag.

Weights#↑

Each tag on a series, as returned by Get a series by its ID (v2) with schema=full, has a weight:

Weight Meaning
core What the series is really about
defining A big part of the series
recurrent Comes up, but not the focus
incidental A minor mention
unweighted Not rated yet

A tag filter matches every weight, and search has no weight filter. A series that mentions a theme once still matches it. Read weight on the series when you only want the strong matches.

curl "https://api.mangabaka.org/v2/series/1995?schema=full"

Tag content rating#↑

Each tag has its own content_rating. The Sexual Content root, for example, is pornographic. The content_rating parameter on the tags endpoint filters on the tag's rating, not on series. See Content rating.