API Documentation
Everything you need to integrate QuoteDay into your application.
Authentication
All API requests require authentication using an API key. Include your API key in the request header.
X-API-KEY: your_api_key_here
Getting your API Key
Create an account to get your free API key. Your key is shown only once upon creation, so store it securely.
API Endpoints
Base URL
/quote/today
Get today's quote of the day. Returns the same quote for all requests on the same day.
Headers
| Name | Required | Description |
|---|---|---|
| X-API-KEY | Yes | Your API key |
Example Request
curl -X GET "https://quoteday.dev/api/quote/today" \
-H "X-API-KEY: your_api_key_here"
Response
{
"quote": "The only way to do great work is to love what you do.",
"author": "Steve Jobs",
"category": "motivation",
"date": "2026-02-22"
}
/register
Register a new user account and receive an API key. No authentication required.
Request Body
| Field | Type | Description |
|---|---|---|
| name | string | User's full name |
| string | Valid email address | |
| password | string | Minimum 8 characters |
Example Request
curl -X POST "https://quoteday.dev/api/register" \
-H "Content-Type: application/json" \
-d '{
"name": "John Doe",
"email": "john@example.com",
"password": "securepassword123"
}'
Response
{
"message": "Registration successful",
"user": {
"id": 1,
"name": "John Doe",
"email": "john@example.com"
},
"api_key": "qd_live_abc123...",
"warning": "Store this API key securely. It will not be shown again."
}
Rate Limits
| Limit Type | Value |
|---|---|
| Requests per minute | 60 |
| Daily requests | Unlimited |
| Quote refresh | Daily at midnight UTC |
Rate Limit Exceeded
If you exceed the rate limit, you'll receive a 429 Too Many Requests response.
Wait 60 seconds before retrying.
Error Handling
The API uses standard HTTP status codes to indicate success or failure.
| Status Code | Meaning |
|---|---|
| 200 | Success |
| 401 | Unauthorized - Invalid or missing API key |
| 403 | Forbidden - Access denied |
| 422 | Validation Error - Check request body |
| 429 | Too Many Requests - Rate limit exceeded |
| 500 | Server Error - Try again later |
Error Response Format
{
"error": "Invalid API key",
"message": "The provided API key is invalid or has expired"
}
Code Examples
JS JavaScript / Node.js
// Using fetch (Browser / Node 18+)
const response = await fetch('https://quoteday.dev/api/quote/today', {
headers: {
'X-API-KEY': 'your_api_key_here'
}
});
const data = await response.json();
console.log(`"${data.quote}" - ${data.author}`);
PY Python
import requests
response = requests.get(
'https://quoteday.dev/api/quote/today',
headers={'X-API-KEY': 'your_api_key_here'}
)
data = response.json()
print(f'"{data["quote"]}" - {data["author"]}')
PHP PHP / Laravel
// Using Laravel HTTP Client
$response = Http::withHeaders([
'X-API-KEY' => 'your_api_key_here'
])->get('https://quoteday.dev/api/quote/today');
$data = $response->json();
echo "\"{$data['quote']}\" - {$data['author']}";
RB Ruby
require 'net/http'
require 'json'
uri = URI('https://quoteday.dev/api/quote/today')
request = Net::HTTP::Get.new(uri)
request['X-API-KEY'] = 'your_api_key_here'
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http|
http.request(request)
end
data = JSON.parse(response.body)
puts "\"#{data['quote']}\" - #{data['author']}"
GO Go
package main
import (
"encoding/json"
"fmt"
"net/http"
)
func main() {
req, _ := http.NewRequest("GET", "https://quoteday.dev/api/quote/today", nil)
req.Header.Set("X-API-KEY", "your_api_key_here")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
var data map[string]string
json.NewDecoder(resp.Body).Decode(&data)
fmt.Printf("\"%s\" - %s\n", data["quote"], data["author"])
}
Ready to Get Started?
Create your free account and get your API key in seconds.
Get Your Free API Key