Docs

Below you'll find examples using Fetch API but you can use any other http library out there.


Important Notes

  1. Default rate limit is 100 requests per hour.
  2. Default number of quotes returned from query endpoints is 10.
  3. If you don't find the anime you are looking for then submit a request here.

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 titleNew

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 characterNew

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"
]

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"
]

Created ❤️ by rocktimsaikia © 2022