TanqoryDocs

predictiveSearch

  • Query
  • Storefront

Returns type-ahead suggestions for a partly typed query: matching products, collections and suggested search terms. limit and limitScope cap the results overall or per type.

Arguments

ArgumentTypeRequiredDefaultDescription
limitIntOptional
limitScopePredictiveSearchLimitScopeOptional
queryString!Required
searchableFields[SearchableField!]Optional

Deprecated

types[PredictiveSearchType!]Optional
unavailableProductsSearchUnavailableProductsTypeOptional

Returns

PredictiveSearchResult Type-ahead results for a partly typed search: matching products, collections, pages and articles, and suggested search terms.

FieldTypeDescription
articles[Article!]!
collections[Collection!]!
pages[Page!]!
products[Product!]!
queries[SearchQuerySuggestion!]!

Example request

A starting point: required arguments as variables and a few fields of the result. Replace the placeholders.

Set STORE_ID and TANQORY_STOREFRONT_TOKEN in your environment first (Make your first API call).

curl
curl -X POST "https://$STORE_HOST/api/v1/stores/$STORE_ID/2026-10/graphql" \
  -H "X-Tanqory-Storefront-Access-Token: $TANQORY_STOREFRONT_TOKEN" \
  -H "Content-Type: application/json" \
  --data '{"query":"query PredictiveSearch($query: String!) {\n  predictiveSearch(query: $query) {\n    articles { id }\n    collections { id }\n    pages { id }\n    products { id }\n  }\n}","variables":{"query":""}}'

Built from commit c0b3fb3fdef7 · API version 2026-10