Skip to the content.

License Version Contributions welcome Docs

↳ Stargazers

Stargazers repo roster for @Armanidrisi/quote-generator-api

Quote Generator API

The Quote Generator API provides endpoints to retrieve quotes from various categories. It allows you to get multiple quotes with a limit, a random quote, and a random quote by category.

Base URL

The base URL for the API is https://quote-generator-api-six.vercel.app.

Authentication

No authentication is required to access the endpoints of this API.

Endpoints

Get Multiple Quotes

Retrieves multiple quotes with a specified limit.

GET /api/quotes/?limit=<limit>

Parameters:

Response:

Get a Random Quote

Retrieves a random quote.

GET /api/quotes/random

Response:

Get Random Quote by Category

Retrieves a random quote from a specific category.

GET /api/quotes/random?category=<category name>

Parameters:

Response:

Example Usage

Get Multiple Quotes

Request:

GET /api/quotes/?limit=5

Response:

{
  "status": true,
  "data": [
    {
      "quote": "The only way to do great work is to love what you do.",
      "category": "Motivation"
    },
    {
      "quote": "Innovation distinguishes between a leader and a follower.",
      "category": "Innovation"
    },
    {
      "quote": "Your time is limited, don't waste it living someone else's life.",
      "category": "Life"
    },
    {
      "quote": "Stay hungry, stay foolish.",
      "category": "Motivation"
    },
    {
      "quote": "The best way to predict the future is to create it.",
      "category": "Innovation"
    }
  ],
  "total": 5
}

Get a Random Quote

Request:

GET /api/quotes/random

Response:

{
  "status": true,
  "quote": "The greatest glory in living lies not in never falling, but in rising every time we fall.",
  "category": "Inspiration"
}

Get Random Quote by Category

Request:

GET /api/quotes/random?category=Motivation

Response:

{
  "status": true,
  "quote": "The only way to do great work is to love what you do.",
  "category": "Motivation"
}

If no category is provided in the request, a random quote from any category will be returned.

Error Handling

Rate Limiting

The API does not impose any rate limiting restrictions at the moment. You can make requests to the API freely without any rate limitations.

Conclusion

The Quote Generator API provides a convenient way to retrieve quotes from various categories. Whether you need multiple quotes with a limit, a random quote, or a random quote from a specific category, this API has you covered. Feel free to integrate these endpoints into your applications or services to enrich your content with inspiring and motivational quotes.

If you have any further questions or need assistance, please don’t hesitate to contact our support team at idrisiarman19@gmail.com!

## Contributing 🤝

We welcome contributions to the quote generator API! If you would like to contribute, please follow these steps:

1. Fork this repository. 2. Make your changes in a new branch. 3. Submit a pull request.