Welcome to the Quote API

Get random motivational quotes!

Get a Random Quote

How to Use This API

Follow these steps to integrate the Quote API into your project:

1. Endpoint URL

Use the following endpoint to fetch a random quote:

GET /api/random

2. Sample Response

A successful response will return a JSON object like this:

{
    "content": "The only way to do great work is to love what you do.",
    "author": "Steve Jobs"
}

3. Example Integration

Use this example code to fetch quotes in JavaScript:

fetch('/api/random')
    .then(response => response.json())
    .then(data => console.log(data))
    .catch(error => console.error('Error:', error));

4. CORS Configuration

If you plan to call this API from another domain, make sure CORS is properly configured in your application.