dummyapi
💡

Quotes

3 endpoints

200 inspirational quotes by famous authors. Includes a random quote endpoint.

Base URLhttps://dummyapi.codesmash.in/api
GET

Get all quotes.

🔗

GET https://dummyapi.codesmash.in/api/quotes

?limit?skip
fetch('https://dummyapi.codesmash.in/api/quotes')
.then(res => res.json())
.then(console.log);
ℹ️
Pagination — By default you will get 30 items. Use ?limit and ?skip to paginate through all items. Max limit is 200.
?limit=10Number of items to return (default: 30, max: 200)
?skip=10Number of items to skip (default: 0)
// By default you get 30 items
fetch('https://dummyapi.codesmash.in/api/quotes?limit=10&skip=0')
.then(res => res.json())
.then(console.log);
// Get next page (items 11–20)
fetch('https://dummyapi.codesmash.in/api/quotes?limit=10&skip=10')
.then(res => res.json())
.then(console.log);
// Get ALL 200 at once
fetch('https://dummyapi.codesmash.in/api/quotes?limit=200')
.then(res => res.json())
.then(console.log);
GET

Get a single quote.

🔗

GET https://dummyapi.codesmash.in/api/quotes/:id

fetch('https://dummyapi.codesmash.in/api/quotes/:id')
.then(res => res.json())
.then(console.log);
GET

Get a random quote.

🔗

GET https://dummyapi.codesmash.in/api/quotes/random

fetch('https://dummyapi.codesmash.in/api/quotes/random')
.then(res => res.json())
.then(console.log);
Buy me a coffee