animedex quote
The Quote backend wraps AnimeChan’s anonymous quote API. The free tier is intentionally small, so high-level commands use the existing SQLite cache by default; repeat calls that hit the cache return before the token bucket and do not consume a live request.
References
API documentation |
|
Authentication and limits |
|
Python module |
|
Rich models |
Backend: AnimeChan (
api.animechan.io/v1).Rate limit: 5 requests per hour on the anonymous free tier, confirmed from the official docs on 2026-05-09 UTC.
Auth: not needed for the free anonymous endpoints that animedex exposes here.
Cache: enabled by default for high-level commands. Pass
--no-cacheonly when the user explicitly needs a fresh live result.
Random Quotes — random()
random returns one quote:
animedex quote random --jq '{quote: .content, anime: .anime.name, character: .character.name}'
# => {
# "quote": "Become strong not just for your own sake, but for your friends.",
# "anime": "Bleach",
# "character": "Kurosaki Ichigo"
# }
Filter variants use AnimeChan’s documented query parameters:
animedex quote random-by-anime Naruto --jq '{quote: .content, character: .character.name}'
animedex quote random-by-character Saitama --jq '{quote: .content, anime: .anime.name}'
Quote Lists — quotes_by_anime()
The list endpoints return one page of five quote records:
animedex quote quotes-by-anime Naruto --page 1 --jq '[.[].character.name]'
animedex quote quotes-by-character Saitama --jq '.[0] | {quote: .content, anime: .anime.name, character: .character.name}'
# => {"quote": "Prophecies don't ever come true.", "anime": "One Punch Man", "character": "Saitama"}
Use --page when the user asks for another page. Do not loop through pages speculatively on the anonymous tier; five live requests exhaust the hourly free budget.
Anime Information — anime()
AnimeChan also exposes anime metadata by ID or name. ID lookup is more precise:
animedex quote anime 188 --jq '{id, name, episodeCount}'
# => {"id": 188, "name": "One Punch Man", "episodeCount": 12}
Endpoint Summary
Command |
Python entry point |
Purpose |
|---|---|---|
|
one random quote |
|
|
one random quote filtered by anime title |
|
|
one random quote filtered by character name |
|
|
one paginated quote list filtered by anime title |
|
|
one paginated quote list filtered by character name |
|
|
AnimeChan anime information by ID or name |
Cross-Source Projection
The rich AnimeChanQuote projects onto Quote via to_common(). The projection maps content to text and carries nested anime and character names when present.
Gotchas
Cache first, rate limit second: the dispatcher checks the cache before acquiring a Quote token. Cached high-level calls do not spend the hourly quota.
Use ``–no-cache`` sparingly: it is a normal transport option, not a safety prompt, but it forces a live request.
Fixture capture should be paced:
tools/fixtures/run_quote.pydocuments a conservative capture cadence for extending the fixture corpus.
The Python library page covers the same surface from inside Python.