Docs
Below you'll find examples using Fetch API but you can use any other http library out there.
Important Notes
- Default rate limit is 100 requests per hour.
- Default number of quotes returned from query endpoints is 10.
- If you don't find the anime you are looking for then submit a request here.
Available routes
Get a random quote
fetch("https://animechan.vercel.app/api/random").then((response) => response.json()).then((quote) => console.log(quote));
Output
{anime: "...",character: "...",quote: "..."}
Get a random quote by anime title
fetch("https://animechan.vercel.app/api/random/anime?title=naruto").then((response) => response.json()).then((quote) => console.log(quote));
Output
{anime: "Naruto",character: "...",quote: "..."}
Get a random quote by anime character
fetch("https://animechan.vercel.app/api/random/character?name=saitama").then((response) => response.json()).then((quote) => console.log(quote));
Output
{anime: "...",character: "Saitama",quote: "..."}
Get 10 random quotes
fetch("https://animechan.vercel.app/api/quotes").then((response) => response.json()).then((quotes) => console.log(quotes));
Output
[{anime: "...",character: "...",quote: "..."},"...9 more"]
Get 10 quotes by anime title
fetch("https://animechan.vercel.app/api/quotes/anime?title=naruto").then((response) => response.json()).then((quotes) => console.log(quotes));
Output
[{anime: "Naruto",character: "...",quote: "..."},"...9 more"]
Get 10 quotes by anime character
fetch("https://animechan.vercel.app/api/quotes/character?name=saitama").then((response) => response.json()).then((quotes) => console.log(quotes));
Output
[{anime: "...",character: "Saitama",quote: "..."},"...9 more"]
Get all available anime namesNew
fetch('https://animechan.vercel.app/api/available/anime').then(response => response.json()).then(animes => console.log(animes))
Output
["Naruto","One punch man","Bleach","..."]
Get all available character namesNew
fetch('https://animechan.vercel.app/api/available/character').then(response => response.json()).then(characters => console.log(characters))
Output
["Naruto Uzumaki","Saitama","Kurosaki Ichigo","..."]
Pagination
Pagination works only on the query endpoints. Default pagination count is 10 quotes per page.
fetch('https://animechan.vercel.app/api/quotes/anime?title=naruto&page=2').then(response => response.json()).then(quotes => console.log(quotes))// works on character queries too 👇// https://animechan.vercel.app/api/quotes/character?name=luffy&page=2
Output
[{anime: "Naruto",character: "...",quote: "..."},"...9 more"]