GET /api/search
Publiek endpoint voor het zoeken in FAQ-items.
Base URL
- Productie:
https://faq.dlapolakow.app
Request
- Methode:
GET - Pad:
/api/search
Query params
q(string, optional): zoekterm.lang(string, optional):pl,en,nl. Standaard ispl.
Request voorbeeld
bash
curl -X GET "https://faq.dlapolakow.app/api/search?q=test&lang=nl"Postman
Response 200
json
{
"ok": true,
"items": [
{
"id": "8b96f5ef2b2f4be8a77d6c6f3a8de9f1",
"slug": "test",
"seo_title": "Test item",
"seo_description": "Test beschrijving",
"published_at": 1746482400,
"tags": {
"pl": ["faq", "test"],
"en": ["faq", "test"],
"nl": ["faq", "test"]
},
"version": "8b96f5ef"
}
],
"total": 1
}Endpoint gedrag
- Als
qleeg is, retourneert het endpoint maximaal 50 nieuwste gepubliceerde items. - Zoeken gebeurt op:
slug,seo_title,seo_description,pl,en,nl,tags. seo_titleenseo_descriptionworden als gelokaliseerde string teruggegeven voorlang.tagsworden teruggegeven als gelokaliseerd object:pl,en,nl.
Foutcodes
500serverfout:
json
{
"ok": false,
"error": "Unknown error"
}
