Retrieve quotes with optional filtering and pagination.
GET /api/quotes
| Parameter | Type | Default | Description |
|---|---|---|---|
limit | number | 10 | Number of quotes (max: 10) |
language | string | all | Filter by language (en, tr, etc.) |
category | string | all | Filter by category |
author_id | string | all | Filter by author UUID |
random | boolean | false | Randomize results |
curl "https://quotegallery.nl/api/quotes?limit=5&language=en&category=philosophical"
const params = new URLSearchParams({
limit: '5',
language: 'en',
category: 'philosophical'
});
const response = await fetch(`https://quotegallery.nl/api/quotes?${params}`);
const { data } = await response.json();
{
"success": true,
"data": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"author": {
"id": "author-uuid",
"name": "Socrates",
"description": "Ancient Greek philosopher",
"categories": ["historical", "philosophical"],
"is_popular": true
},
"categories": ["philosophical"],
"translations": [
{
"id": "trans-uuid",
"quote_id": "550e8400-e29b-41d4-a716-446655440000",
"language": "en",
"text": "The only true wisdom is in knowing you know nothing."
}
],
"likes_count": 156,
"created_at": "2024-01-15T10:30:00Z"
}
],
"count": 1,
"filters": {
"limit": 5,
"language": "en",
"category": "philosophical",
"author_id": "all",
"random": false
}
}
The V1 API offers more advanced features including pagination.
GET /api/v1/quotes
| Parameter | Type | Default | Description |
|---|---|---|---|
page | number | 1 | Page number |
sort | string | newest | Sort order: newest, oldest, most_liked, least_liked, random |
order | string | desc | Order direction: asc, desc |
exclude_ids | string | - | Comma-separated quote IDs to exclude |
min_likes | number | - | Minimum like count |
max_likes | number | - | Maximum like count |
include_html | boolean | false | Include HTML formatting in text |
curl "https://quotegallery.nl/api/v1/quotes?page=2&limit=10&sort=most_liked"
{
"success": true,
"data": [...],
"pagination": {
"page": 2,
"limit": 10,
"total": 1250,
"totalPages": 125,
"hasMore": true
},
"meta": {
"reset_exclusion": false,
"remaining_unseen": 1240,
"total_available": 1250
}
}
GET /api/v1/quotes/:id
| Parameter | Type | Description |
|---|---|---|
id | string | Quote UUID |
curl "https://quotegallery.nl/api/v1/quotes/550e8400-e29b-41d4-a716-446655440000"
{
"success": true,
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"author_id": "author-uuid",
"status": "approved",
"visibility": "public",
"categories": ["philosophical"],
"created_at": "2024-01-15T10:30:00Z",
"authors": {
"id": "author-uuid",
"name": "Socrates",
"description": "Ancient Greek philosopher",
"categories": ["historical", "philosophical"],
"is_popular": true
},
"quote_translations": [
{
"id": "trans-uuid",
"quote_id": "550e8400-e29b-41d4-a716-446655440000",
"language": "en",
"text": "The only true wisdom is in knowing you know nothing."
}
],
"likes_count": 156,
"user_liked": false
}
}