GET /api/search
Public endpoint for searching FAQ entries.
Base URL
- Production:
https://faq.dlapolakow.app
Request
- Method:
GET - Path:
/api/search
Query params
q(string, optional): search phrase.lang(string, optional):pl,en,nl. Default ispl.
Request example
bash
curl -X GET "https://faq.dlapolakow.app/api/search?q=test&lang=en"Postman
Response 200
json
{
"ok": true,
"items": [
{
"id": "8b96f5ef2b2f4be8a77d6c6f3a8de9f1",
"slug": "test",
"seo_title": "Test entry",
"seo_description": "Test description",
"published_at": 1746482400,
"tags": {
"pl": ["faq", "test"],
"en": ["faq", "test"],
"nl": ["faq", "test"]
},
"version": "8b96f5ef"
}
],
"total": 1
}Endpoint behavior
- If
qis empty, it returns up to 50 latest published entries. - Search is performed over:
slug,seo_title,seo_description,pl,en,nl,tags. seo_titleandseo_descriptionare returned as localized strings forlang.tagsare returned as a localized object:pl,en,nl.
Error codes
500server error:
json
{
"ok": false,
"error": "Unknown error"
}
