Search

Read and change the store's storefront search settings and rebuild its search index through the Store API.

Search settings turn storefront search and predictive search on or off and choose the result types search returns. They apply to every storefront in the store. Reads require read_search; changes require write_search. Send back the revision you read when you update, so a change made in the meantime is never overwritten.

The search index follows product, collection, page and other edits on its own. Rebuilding it re-indexes every searchable resource in every store language in the background; storefront search keeps answering from the current index while it runs, and only one rebuild runs at a time. Follow a rebuild with its job. Synonyms are managed under Search synonyms.

Endpoints#

Get search settings

GET read_search

Get the store's storefront search settings.

Returns whether storefront search and predictive search are on, the result types search returns, and revision: send it back when you update. options.result_types lists every selectable result type.

Headers

Name Type Description
Authorization required string

Bearer Store API token.

Errors

  • 401 UNAUTHORIZED

    Authorization header missing, malformed, or token invalid/expired.

  • 402 SUBSCRIPTION_REQUIRED

    The store does not have an active or trialing subscription.

  • 403 STORE_API_SCOPE_REQUIRED

    Token is valid but lacks the required scope for this call.

  • 429 RATE_LIMITED

    The token's request allowance is exhausted. Retry after the Retry-After header.

Update search settings

PUT write_search

Change the store's storefront search settings.

Send revision from Get search settings and at least one setting; omitted settings stay unchanged. search_result_types replaces the whole list; repeats count once. A save that changes nothing returns the current settings. A change made since revision was read returns SEARCH_SETTINGS_CHANGED_DURING_EDIT: read the settings again before saving.

Headers

Name Type Description
Authorization required string

Bearer Store API token.

Body parameters

Name Type Description
revision required string

revision from Get search settings.

Example: 2026-07-08T13:10:00.123456Z
search_enabled boolean

Turn storefront search on or off.

Example: true
predictive_search_enabled boolean

Show suggestions while shoppers type.

Example: true
search_result_types array<string>

Result types storefront search returns, in any order.

Allowed values
productscollectionscategoriesvendorsbrandspagesblog_postsblog_categoriespolicies
Example: ["products","collections"]

Errors

  • 401 UNAUTHORIZED

    Authorization header missing, malformed, or token invalid/expired.

  • 402 SUBSCRIPTION_REQUIRED

    The store does not have an active or trialing subscription.

  • 403 STORE_API_SCOPE_REQUIRED

    Token is valid but lacks the required scope for this call.

  • 429 RATE_LIMITED

    The token's request allowance is exhausted. Retry after the Retry-After header.

  • 400 STORE_API_INVALID_REQUEST_BODY

    The body has an unknown field or a field has the wrong type.

  • 400 SEARCH_SETTINGS_REVISION_REQUIRED

    revision is missing.

  • 400 INVALID_INPUT

    No setting was sent.

  • 400 STOREFRONT_SEARCH_RESULT_TYPE_INVALID

    A result type is not one of options.result_types.

  • 409 SEARCH_SETTINGS_CHANGED_DURING_EDIT

    The settings changed since revision was read.

  • 400 STORE_API_BODY_PROPERTY_UNKNOWN

    The body has a property this request does not accept. The message and error.details.properties list the allowed and required properties (nested for each object or list of objects).

  • 400 STORE_API_BODY_PROPERTY_INVALID

    A body property has the wrong type (error.details.expected_type). The message and error.details.properties list the allowed and required properties.

Rebuild the search index

POST write_search

Rebuild the store's storefront search index.

Starts a background rebuild of every searchable resource in every store language and returns its job_id. Storefront search keeps answering from the current index while it runs. Only one rebuild runs at a time, and a store can start one rebuild per hour; follow it with Get a search index rebuild. A rebuild rewrites only documents whose content changed and removes documents for resources no longer shown. Product, page and other edits already reach the index on their own; a rebuild is for repairing it.

Headers

Name Type Description
Authorization required string

Bearer Store API token.

Errors

  • 401 UNAUTHORIZED

    Authorization header missing, malformed, or token invalid/expired.

  • 402 SUBSCRIPTION_REQUIRED

    The store does not have an active or trialing subscription.

  • 403 STORE_API_SCOPE_REQUIRED

    Token is valid but lacks the required scope for this call.

  • 429 RATE_LIMITED

    The token's request allowance is exhausted. Retry after the Retry-After header.

  • 409 SEARCH_REINDEX_IN_PROGRESS

    A rebuild is already running.

  • 429 SEARCH_REINDEX_COOLDOWN

    A rebuild started less than an hour ago; the message says how many minutes remain.

Search index rebuild limits

GET read_search

Get the rebuild list page sizes.

jobs_list_page_size is the default limit; jobs_list_max_limit is the largest accepted.

Headers

Name Type Description
Authorization required string

Bearer Store API token.

Errors

  • 401 UNAUTHORIZED

    Authorization header missing, malformed, or token invalid/expired.

  • 402 SUBSCRIPTION_REQUIRED

    The store does not have an active or trialing subscription.

  • 403 STORE_API_SCOPE_REQUIRED

    Token is valid but lacks the required scope for this call.

  • 429 RATE_LIMITED

    The token's request allowance is exhausted. Retry after the Retry-After header.

List search index rebuilds

GET read_search

List the store's search index rebuilds, newest first.

Finished rebuilds are kept for a limited time. Each rebuild carries status_display, its status named in the request language (English by default). A failed rebuild carries failure_message with a support reference. completed_types of total_types resource types are done; document_count is the number of documents indexed so far.

Query parameters

Name Type Description
limit integer

Page size, up to jobs_list_max_limit.

Example: 20
offset integer

Number of rebuilds to skip.

Default: 0
Example: 0

Headers

Name Type Description
Authorization required string

Bearer Store API token.

Errors

  • 401 UNAUTHORIZED

    Authorization header missing, malformed, or token invalid/expired.

  • 402 SUBSCRIPTION_REQUIRED

    The store does not have an active or trialing subscription.

  • 403 STORE_API_SCOPE_REQUIRED

    Token is valid but lacks the required scope for this call.

  • 429 RATE_LIMITED

    The token's request allowance is exhausted. Retry after the Retry-After header.

Get the running search index rebuild

GET read_search

Get the rebuild that is running now.

job is null when no rebuild is running.

Headers

Name Type Description
Authorization required string

Bearer Store API token.

Errors

  • 401 UNAUTHORIZED

    Authorization header missing, malformed, or token invalid/expired.

  • 402 SUBSCRIPTION_REQUIRED

    The store does not have an active or trialing subscription.

  • 403 STORE_API_SCOPE_REQUIRED

    Token is valid but lacks the required scope for this call.

  • 429 RATE_LIMITED

    The token's request allowance is exhausted. Retry after the Retry-After header.

Get a search index rebuild

GET read_search

Get one search index rebuild.

status is processing, completed or failed; status_display names it in the request language (English by default).

Path parameters

Name Type Description
job_id required uuid

Rebuild job id from Rebuild the search index or List search index rebuilds.

Example: 7d3e9a51-2c4b-4f6e-8a1d-9b0c2e4f6a83

Headers

Name Type Description
Authorization required string

Bearer Store API token.

Errors

  • 401 UNAUTHORIZED

    Authorization header missing, malformed, or token invalid/expired.

  • 402 SUBSCRIPTION_REQUIRED

    The store does not have an active or trialing subscription.

  • 403 STORE_API_SCOPE_REQUIRED

    Token is valid but lacks the required scope for this call.

  • 429 RATE_LIMITED

    The token's request allowance is exhausted. Retry after the Retry-After header.

  • 404 SEARCH_JOB_NOT_FOUND

    No rebuild with this id exists for the store, or it is past retention.