search query is where personalization happens. Pass in a guest’s dietary restrictions, allergen exclusions, and nutritional preferences—we traverse our entire ingredient hierarchy to find dishes that are safe and satisfying for them.
Results come back grouped by match quality: full matches, almost matches (with explanations), and non-matches. This gives you everything you need to build interfaces that help guests find exactly what they’re looking for—while being transparent about dishes that come close but don’t quite fit.
This query requires an API key scoped to your chain in the
Authorization header. Optionally include X-Session-ID for analytics and personalization; you do not need to pass chain or session in the GraphQL query itself.Query
Parameters
All parameters are optional. Chain context comes from yourAuthorization header; restaurant and session context are provided via restaurantId (argument) and X-Session-ID (header).
| Parameter | Type | Description |
|---|---|---|
restaurantId | ID | Scope search to a single restaurant. If omitted, the search runs in the chain’s widget scope (all widget dishes). |
preferences | PreferencesInput | Dietary filters (see below) |
searchTerm | String | Text search (dish name, description) |
category | String | Filter by menu category |
pagination | PaginationArgs | Pagination controls |
PreferencesInput
PaginationArgs
- Forward pagination (
first/after): Whenafteris omitted, the resolver returns the first page. When present,afteris treated as the cursor for the current page and the resolver returns the next page. - Backward pagination (
last/before): When both are present,beforeis treated as the cursor for the current page and the resolver returns the previous page. When onlylastis provided, the resolver returns the last page. - Cursors should be treated as opaque strings; clients should not rely on the encoding details.
Response
Match Groups
Results are grouped into three categories:| Group | Description | Use Case |
|---|---|---|
matches | Fully meets all preferences | Display prominently |
almostMatches | Partial match with exceptions | Display with warnings |
notMatches | Does not meet critical preferences | Display greyed out or hide |
MatchStatus Enum
Match Reasons
ForalmostMatches and notMatches, the matchReasons array explains why:
Example
Examples
Basic Search (No Filters)
Example Response
Example Response
Search with Dietary Preferences
Example Response
Example Response
Text Search with Category Filter
Example Response
Example Response
Paginated Results
Full Example Response
Complete Response
Complete Response

