Search quotes by text content or author name.
GET /api/v1/search
| Parameter | Type | Required | Description |
|---|---|---|---|
q | string | Yes | Search query (min 2 characters) |
language | string | No | Filter by language |
category | string | No | Filter by category |
author_id | string | No | Filter by author UUID |
author | string | No | Search by author name |
page | number | No | Page number (default: 1) |
limit | number | No | Results per page (max: 50, default: 20) |
curl "https://quotegallery.nl/api/v1/search?q=wisdom&language=en"
const params = new URLSearchParams({
q: 'wisdom',
language: 'en',
limit: '10'
});
const response = await fetch(`https://quotegallery.nl/api/v1/search?${params}`);
const data = await response.json();
import requests
response = requests.get('https://quotegallery.nl/api/v1/search', params={
'q': 'wisdom',
'language': 'en',
'limit': 10
})
data = response.json()
{
"results": [
{
"id": "quote-uuid",
"text": "The only true wisdom is in knowing you know nothing.",
"language": "en",
"author": {
"id": "author-uuid",
"name": "Socrates",
"categories": ["historical", "philosophical"]
},
"categories": ["philosophical"],
"created_at": "2024-01-15T10:30:00Z",
"likes_count": 156,
"relevance": 0.95
}
],
"total": 42,
"page": 1,
"limit": 20,
"total_pages": 3,
"query": "wisdom"
}
curl "https://quotegallery.nl/api/v1/search?q=Einstein"
This will find quotes containing "Einstein" in the text OR quotes by authors named "Einstein".
curl "https://quotegallery.nl/api/v1/search?q=life&category=philosophical&language=en"