Endpoints

Search

Search quotes by text or author

Search Endpoint

Search quotes by text content or author name.

GET /api/v1/search

Query Parameters

ParameterTypeRequiredDescription
qstringYesSearch query (min 2 characters)
languagestringNoFilter by language
categorystringNoFilter by category
author_idstringNoFilter by author UUID
authorstringNoSearch by author name
pagenumberNoPage number (default: 1)
limitnumberNoResults per page (max: 50, default: 20)

Example Request

curl "https://quotegallery.nl/api/v1/search?q=wisdom&language=en"

Response

{
  "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"
}

Search Tips

Better search results:
  • Use specific keywords from the quote
  • Combine with language filter for accuracy
  • Search by author name to find all their quotes

Search by Author Name

curl "https://quotegallery.nl/api/v1/search?q=Einstein"

This will find quotes containing "Einstein" in the text OR quotes by authors named "Einstein".

Combined Filters

curl "https://quotegallery.nl/api/v1/search?q=life&category=philosophical&language=en"