animedex mangadex
MangaDex is a scanlation aggregator hosted at
https://api.mangadex.org. It is the deepest manga
catalogue the project wraps: every series / chapter / cover /
scanlation group / author / custom list, plus an authenticated
/user surface for the caller’s own follows / lists / reading
history. animedex covers 26 anonymous endpoints plus 13
authenticated read endpoints as 39 high-level Python functions.
References
Site |
|
API documentation |
|
Auth flow (Personal Client) |
https://api.mangadex.org/docs/02-authentication/personal-clients/ |
Python module |
|
Rich models |
Backend: MangaDex (api.mangadex.org).
Rate limit: 5 req/sec anonymous; transport bucket matches.
Auth: optional. Anonymous endpoints work without credentials; the
/user/*and/manga/*/ statussurface needs an OAuth2 Bearer token via Personal Clien t password grant. See “Authenticated endpoints” below for the exact flow.
Six anonymous endpoints, in detail
Manga by UUID — show()
animedex mangadex show 801513b a-a712-498c-8f57-cae55b38cc92 \
--jq '.attributes | {title: .title.en, status, year}'
# => {
# "title": "Berserk",
# "status": "ongoing",
# "year": 1989
# }
Title search — search()
animedex mangadex search "Bers erk" --limit 3 --jq '.[].attributes.title.en'
Chapter feed — feed()
animedex mangadex feed 801513b a-a712-498c-8f57-cae55b38cc92 \
--lang en --limit 5 --jq '.[ ].attributes | {chapter, title}'
One chapter — chapter()
animedex mangadex chapter <cha pter-uuid> \
--jq '.attributes | {chapter , title, translatedLanguage, pages}'
Cover record — cover()
animedex mangadex cover <cover -uuid> --jq '.attributes.fileName'
# The full image URL is compos ed as
# https://uploads.mangadex.org /covers/<manga-id>/<fileName>
Random manga — random_manga()
animedex mangadex random-manga --jq '.attributes.title.en'
Authenticated endpoints
The /user/* and /manga/*/status surface requires an OAuth2
Bearer token. MangaDex’s Personal Client flow exchanges
client_id:client_secret:username:password for a 15-minute access
token; animedex caches the token in process memory keyed on
client_id.
Setup
Visit https://mangadex.org/settings → API Clients → “Create”.
Note the
client_id(looks likepersonal-client-<uuid>-<suff ix>) andclient_secret.Provide credentials to animedex via one of:
# Per-call (CLI): animedex mangadex me --cred s "<client_id>:<client_secret>:<username>:<password>" # Per-shell (env var): export ANIMEDEX_MANGADEX_CR EDS="<client_id>:<client_secret>:<username>:<password>" animedex mangadex me # Persistent (token store): animedex auth set mangadex \ "<client_id>:<client_secr et>:<username>:<password>" animedex mangadex me
The four-tuple is colon-separated. The token store goes through the OS keyring per the project’s secret-handling convention.
Authenticated walkthrough
Current user — me()
animedex mangadex me --jq '.at tributes | {username, roles}'
My follows — my_follows_manga()
animedex mangadex my-follows-m anga --limit 5 \
--jq '.[].attributes.title.e n'
Reading history — my_history()
animedex mangadex my-history - -jq '.[]'
Read markers per manga — my_manga_read_markers()
animedex mangadex my-manga-rea d-markers \
801513ba-a712-498c-8f57-cae5 5b38cc92 --jq '.[]'
Endpoint summary
Anonymous reads
Command |
Python entry point |
Returns |
|---|---|---|
|
|
|
|
||
|
|
|
|
||
|
|
|
|
||
|
|
|
|
|
|
|
|
|
|
||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Authenticated reads
Command |
Python entry point |
Returns |
|---|---|---|
|
||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Pagination
MangaDex paginates with ?limit=M&offset=N (JSON:API style). The
high-level helpers expose limit / offset kwargs:
animedex mangadex search "Bers erk" --limit 5 --jq '.[].attributes.title.en'
animedex mangadex search "Bers erk" --limit 5 --offset 5 --jq '.[].attributes.title.en'
Gotchas
Title is language-keyed:
manga.attributes.titleis a{lang: text}map; theto_ common()projection picksenfirst, thenja-ro, then any non-empty entry. Use--jq .attributes.title.jaif you s pecifically want the Japanese title.Bearer tokens expire in 15 minutes: animedex caches per
client_idand re-runs the p assword grant when the cache is stale; long-running shells will see one extra round-trip every ~14 minutes.404 on follow-checks is a feature:
is-following-manga/is-following-group/is-f ollowing-userreturnfalseon 404 (the upstream’s “you are no t following” response shape) and raiseApiErroronly on othe r failure modes.The ``/at-home/server`` endpoint is not wired: the page-image fetcher has its own short-lived base URLs and HTTP/2 concurrency caps; it’s a deferred follow-up .
The Python library page covers the same surface from inside Python.