Endpoints

Quotes

Fetch quotes from the API

Quotes Endpoint

Retrieve quotes with optional filtering and pagination.

Get Multiple Quotes

GET /api/quotes

Query Parameters

ParameterTypeDefaultDescription
limitnumber10Number of quotes (max: 10)
languagestringallFilter by language (en, tr, etc.)
categorystringallFilter by category
author_idstringallFilter by author UUID
randombooleanfalseRandomize results

Example Request

curl "https://quotegallery.nl/api/quotes?limit=5&language=en&category=philosophical"

Example Response

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

V1 API (Advanced)

The V1 API offers more advanced features including pagination.

GET /api/v1/quotes

Additional Parameters

ParameterTypeDefaultDescription
pagenumber1Page number
sortstringnewestSort order: newest, oldest, most_liked, least_liked, random
orderstringdescOrder direction: asc, desc
exclude_idsstring-Comma-separated quote IDs to exclude
min_likesnumber-Minimum like count
max_likesnumber-Maximum like count
include_htmlbooleanfalseInclude HTML formatting in text

Example with Pagination

curl "https://quotegallery.nl/api/v1/quotes?page=2&limit=10&sort=most_liked"

Response with Pagination

{
  "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 Single Quote

GET /api/v1/quotes/:id

Path Parameters

ParameterTypeDescription
idstringQuote UUID

Example

curl "https://quotegallery.nl/api/v1/quotes/550e8400-e29b-41d4-a716-446655440000"

Response

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