Skip to content

Get search results

Request

Run a full-text search and get results grouped by category (for example, Documentation, API Reference).

Bodyapplication/jsonrequired
querystringrequired

Full-text search query.

localestringrequired

Locale code for the content to search (for example, en, default_locale). Must match a locale configured in your project. Locales are set in redocly.yaml under the l10n option.

filterArray of objects(FacetFilter)

List of facet filters. Omit or use [] for no filters.

loadMoreobject

For pagination within a result group.

curl -i -X POST \
  https://redocly.com/_mock/docs/realm/customization/search-api/openapi/_search \
  -H 'Content-Type: application/json' \
  -d '{
    "query": "getting started",
    "filter": [],
    "locale": "default_locale"
  }'

Responses

Search results grouped by category.

Bodyapplication/json
facetsobject

Facet field names to arrays of value and count. Keys may include: redocly_category, redocly_product, redocly_version, redocly_teams, httpMethod, httpPath, apiTitle, apiVersion, and any custom facet fields.

documentsobject

Category names (e.g. Documentation, API Reference) to arrays of search items.

Response
{ "facets": { "redocly_category": [], "redocly_product": [], "redocly_version": [], "redocly_teams": [], "httpMethod": [], "httpPath": [], "apiTitle": [], "apiVersion": [] }, "documents": { "Documentation": [] } }