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.

animedex quote demo — cached random quote, Saitama quotes, anime information

References

API documentation

https://animechan.io/docs

Authentication and limits

https://animechan.io/docs/auth

Python module

animedex.backends.quote

Rich models

animedex.backends.quote.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-cache only 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

random

animedex.backends.quote.random()

one random quote

random-by-anime <title>

animedex.backends.quote.random_by_anime()

one random quote filtered by anime title

random-by-character <name>

animedex.backends.quote.random_by_character()

one random quote filtered by character name

quotes-by-anime <title>

animedex.backends.quote.quotes_by_anime()

one paginated quote list filtered by anime title

quotes-by-character <name>

animedex.backends.quote.quotes_by_character()

one paginated quote list filtered by character name

anime <identifier>

animedex.backends.quote.anime()

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.py documents a conservative capture cadence for extending the fixture corpus.

The Python library page covers the same surface from inside Python.