Docs
The examples below utilize the Fetch API but feel free to use any other http library.
Important Notes
- Default rate limit is 100 per hour
- Specific games or characters can be requested here
- See how many quotes are available with "/api/available/" route with params i.e. "game?title=nier"
Routes Available
- Get Quote by Id
- Get a random quote
- Get a random quote by character name
- Get a random quote by game title
- Get 5 random quotes
- Get 5 quotes by character name
- Get 5 quotes by game title
Get Quote by ID
fetch("https://ultima.rest/api/quote?id=6").then(response => response.json()).then(quote => console.log(quote))
➡️Output➡️
{
id: ...,
quote: "...",
character: "...",
title: "..."
esrb: "...",
release: ...,
}
Get Random Quote
fetch("https://ultima.rest/api/random").then(response => response.json()).then(quote => console.log(quote))
➡️Output➡️
{
id: ...,
quote: "...",
character: "...",
title: "..."
esrb: "...",
release: ...,
}
Get Random Quote by Character
fetch("https://ultima.rest/api/quote/character?name=kratos").then(response => response.json()).then(quote => console.log(quote))
➡️Output➡️
{
id: ...,
quote: "...",
character: "...",
title: "..."
esrb: "...",
release: ...,
}
Get Random Quote by Game
fetch("https://ultima.rest/api/quote/game?title=nier+automata").then(response => response.json()).then(quote => console.log(quote))
➡️Output➡️
{
id: ...,
quote: "...",
character: "...",
title: "..."
esrb: "...",
release: ...,
}
Get 5 Random Quotes
fetch("https://ultima.rest/api/quotes/random").then(response => response.json()).then(quote => console.log(quote))
➡️Output➡️
[ {
id: ...,
quote: "...",
character: "...",
title: "..."
esrb: "...",
release: ...,
}, {...}, * 4 ]
Get 5 Random Quotes by Characters
fetch("https://ultima.rest/api/quotes/character?name=sephiroth").then(response => response.json()).then(quote => console.log(quote))
➡️Output➡️
[ {
id: ...,
quote: "...",
character: "...",
title: "..."
esrb: "...",
release: ...,
}, {...}, * 4 ]
Get 5 Random Quotes by Game
fetch("https://ultima.rest/api/quotes/game?title=final+fantasy+VII").then(response => response.json()).then(quote => console.log(quote))
➡️Output➡️
[ {
id: ...,
quote: "...",
character: "...",
title: "..."
esrb: "...",
release: ...,
}, {...}, * 4 ]