Skip to content

Carlosaac23/Stoic-API

Repository files navigation

Stoic API

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)


📌 Endpoints

All quotes

GET https://stoic-api-red.vercel.app/api/quotes

By 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=50

Random Quotes

GET https://stoic-api-red.vercel.app/api/quotes/random

Quotes by Author

GET 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/zeno

Random Quote by Author

GET https://stoic-api-red.vercel.app/api/quotes/marcus?random

⚡ Example Usage

const res = await fetch("https://stoic-api-red.vercel.app/api/quotes?max=5");
const data = await.res.json();
console.log(data)

🤝 Contributing

Contributions are welcome! If you'd like to help improve the API:

  1. Fork the repository
  2. Create a new branch (git checkout -b new-branch)
  3. Commit your changes (git commit -m 'feat: add new feature')
  4. Push to your branch (git push origin new-branch)
  5. Open a Pull Request

You can also open issues if you find bugs or want to suggest new features.

📜 License

This project is licensed under the MIT License.

About

A basic REST API that gives you a bunch of stoic quotes from the most famous stoics that have lived.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published