Nimbu Developer Docs
ReferenceSearch

Search across site content

GET
/search

Cross-content full-text search over the site's pages, products, channel entries and collections, and — only when named explicitly — customers and orders.

  • types defaults to page,product,entry,collection. customer and order carry personal data and are searched only when listed in types.
  • Each requested type is filtered by what the token may read (page → read_content, product/collection → read_products, entry → read_channels, customer → read_customers, order → read_orders). Types the token cannot read are dropped silently; the response's types echoes what was actually searched. When no requested type is readable the request is refused (401 without credentials, 403 with insufficient scope).
  • per_page applies per type: a three-type search with per_page=20 can return up to 60 results.
  • Results only include records the matching show route would return (unpublished pages, hidden products, ACL-protected entries and sensitive channels without access are filtered out).
  • A type whose search fails contributes no results and sets degraded: true instead of failing the whole request.
  • Articles are not searchable here.

Authorization

AuthorizationBearer <token>

Personal access token tied to a user account. Requires the X-Nimbu-Site header to scope requests.

In: header

X-Nimbu-Site<token>

Identifier of the site context when authenticating with a personal access token.

In: header

Query Parameters

q*string

Search text. Required and must not be blank.

types?string

Comma-separated result types. One or more of page, product, entry, collection, customer, order. Default: page,product,entry,collection. customer and order are opt-in. Unknown types return 400.

page?integer

Page number (per type).

Default1
Range1 <= value
per_page?integer

Results per type. Clamped to 1..50.

Default20
Range1 <= value <= 50

Response Body

application/json

application/json

application/json

curl -X GET "https://example.com/search?q=string"
{
  "query": "contact",
  "types": [
    "page"
  ],
  "degraded": false,
  "results": [
    {
      "id": "page:64f1c2a9e4b0a1b2c3d4e5f6",
      "type": "page",
      "title": "Contact us",
      "url": "https://example.com/contact",
      "snippet": null
    }
  ]
}

{
  "message": "The 'q' parameter is required and cannot be blank"
}

Empty
{
  "message": "Insufficient scope: searching customer, order requires read_customers or read_orders"
}