Global Search

Performs a global search across multiple entity types in the library using Elasticsearch. Returns search results grouped by entity type with pagination support.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Search across multiple entity types

This endpoint provides a unified search interface that searches across multiple entity types in your library using Elasticsearch. You can search for ingredients, recipes, images, albums, menus, recipe albums, purchase orders, stock items, supplier packages, and invoices all in a single request.

Search Query

The q parameter is required for the search to return results. If not provided, the endpoint will return empty results for all entity types.

Entity Type Filtering

Use the entity_types parameter to limit your search to specific entity types. Provide a comma-separated list of valid entity types:

  • ingredients - Search ingredients
  • recipes - Search recipes
  • images - Search images
  • albums - Search image albums
  • menus - Search menus
  • recipe_albums - Search recipe albums
  • purchase_orders - Search purchase orders
  • stock_items - Search stock items
  • supplier_packages - Search supplier packages
  • invoices - Search invoices

If entity_types is not provided, the search will include all available entity types.

Pagination

Results are paginated using the page and page_size parameters:

  • page: Page number starting at 1 (default: 1)
  • page_size: Number of results per page, maximum 200 (default: 15)

Response Structure

The response is organized by entity type, with each type containing:

  • items: Array of matching items with relevant attributes
  • count: Number of matching items found

Each item includes a pk (primary key) and a detail_url when available, which can be used to fetch full details of the item.

Search Behavior

The search uses Elasticsearch's full-text search capabilities with n-gram analysis, allowing for flexible matching:

  • Prefix matching (e.g., "chick" matches "chicken")
  • Infix matching (e.g., "ken" matches "chicken")
  • Exact matching for precise queries

Results are sorted by relevance score, with the most relevant matches appearing first.

Query Params
string

The search query string. If not provided, returns empty results.

string

Comma-separated list of entity types to search. Valid values: ingredients, recipes, images, albums, menus, recipe_albums, purchase_orders, stock_items, supplier_packages, invoices. If not provided, searches all entity types.

int32
Defaults to 1

A page number within the paginated result set. Starts at 1.

int32
≤ 200
Defaults to 15

Number of results per page. Maximum value is 200.

Responses

Language
Credentials
OAuth2
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json