Stoic API is a simple and lightweight API that provides quotes from different Stoic philosophers such as Marcus Aurelius, Seneca, and Epictetus.
It is built with Next.js (App Router) and deployed on Vercel.
You can use this API for personal projects, inspiration apps, or simply to learn more about Stoicism. (I'll be adding quotes every day)
GET https://stoic-api-red.vercel.app/api/quotesBy default returns 20 quotes. You can change this with a max query (up to 100).
GET https://stoic-api-red.vercel.app/api/quotes?max=50GET https://stoic-api-red.vercel.app/api/quotes/randomGET https://stoic-api-red.vercel.app/api/quotes/marcus
GET https://stoic-api-red.vercel.app/api/quotes/seneca
GET https://stoic-api-red.vercel.app/api/quotes/epictetus
GET https://stoic-api-red.vercel.app/api/quotes/zenoGET https://stoic-api-red.vercel.app/api/quotes/marcus?randomconst res = await fetch("https://stoic-api-red.vercel.app/api/quotes?max=5");
const data = await.res.json();
console.log(data)Contributions are welcome! If you'd like to help improve the API:
- Fork the repository
- Create a new branch (
git checkout -b new-branch) - Commit your changes (
git commit -m 'feat: add new feature') - Push to your branch (
git push origin new-branch) - Open a Pull Request
You can also open issues if you find bugs or want to suggest new features.
This project is licensed under the MIT License.