Global Search

One endpoint, all models. Searches across every content model that opts in via api_config.searchable.

Endpoint

GET /api/v1/search

Query parameters

ParamExampleNotes
qheadless cmsRequired search term
modelsblog-posts,productsRestrict to specific model slugs
localeenLocale filter
per_page10Default 20, capped at 50
page11-based

Example

GET /api/v1/search?q=launch&models=blog-posts,events&per_page=5
X-API-Key:    pk_live_…
X-API-Secret: sk_live_…

200 OK
{
  "data": [
    {
      "model":      "blog-posts",
      "id":         "01H…",
      "slug":       "launch-day",
      "title":      "Launch day",
      "excerpt":    "We are live!",
      "locale":     "en",
      "url":        "/api/v1/blog-posts/launch-day",
      "score":      0.92,
      "published_at": "2026-05-29T10:00:00Z"
    },
    {
      "model":      "events",
      "id":         "01H…",
      "slug":       "launch-meetup",
      "title":      "Launch meetup",
      "excerpt":    "Join us in person",
      "locale":     "en",
      "url":        "/api/v1/events/launch-meetup",
      "score":      0.81,
      "published_at": "2026-05-30T18:00:00Z"
    }
  ],
  "meta": { "page": 1, "per_page": 5, "total": 12, "query": "launch" },
  "error": null
}

How it works

Excluding a model

To remove a model from search, set its api_config.searchable = false in the content model editor. Useful for internal-only models you still want to expose via direct endpoints.

Errors

StatusCodeWhen
422VALIDATION_FAILEDq missing or under 2 chars
404MODEL_NOT_FOUNDA slug in models doesn't exist
PerformanceFor a higher-traffic install, point search at MeiliSearch or Typesense by swapping the controller's resolver — the response envelope is intentionally compatible with both engines' result shapes.