searchVariants( )


Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Search product variants using free-text search with advanced query capabilities.

Use this endpoint for complex queries that include free-text search, aggregations, or when you need faceted search results. For simple filtering, use Query Variants instead.

Supports Wix Query Language (WQL) for structured filtering combined with free-text search.

Note: Non-visible variants, and variants related to non-visible products are filtered from results if you don't have permissions to read hidden products.

PropertyCapabilitiesFilters
optionChoices.optionChoiceIds.choiceIdSearch: ✗
Aggregate: ✓
Sort: ASC, DESC
$hasAll, $hasSome
optionChoices.optionChoiceIds.optionIdSearch: ✗
Aggregate: ✓
Sort: ASC, DESC
$hasAll, $hasSome
barcodeSearch: ✗
Aggregate: ✓
Sort: ASC, DESC
$eq, $ne, $exists, $in, $any, $begins, $gt, $lt, $lte, $gte
internalMetadata.rowStateSearch: ✗
Aggregate: ✓
Sort: ASC, DESC
$eq, $ne, $exists, $in, $any
inventoryStatus.inStockSearch: ✗
Aggregate: ✓
Sort: ASC, DESC
$eq, $ne, $exists, $in, $any
inventoryStatus.preorderEnabledSearch: ✗
Aggregate: ✓
Sort: ASC, DESC
$eq, $ne, $exists, $in, $any
price.actualPrice.amountSearch: ✗
Aggregate: ✓
Sort: ASC, DESC
$eq, $ne, $exists, $in, $any, $begins, $gt, $lt, $lte, $gte
price.compareAtPrice.amountSearch: ✗
Aggregate: ✓
Sort: ASC, DESC
$eq, $ne, $exists, $in, $any, $begins, $gt, $lt, $lte, $gte
productData.directCategoryIdsSearch: ✗
Aggregate: ✓
Sort: ASC, DESC
$eq, $ne, $exists, $in, $any, $all
productData.nameSearch: ✓
Aggregate: ✓
Sort: ASC, DESC
$eq, $ne, $exists, $in, $any, $begins, $gt, $lt, $lte, $gte
productData.productIdSearch: ✗
Aggregate: ✓
Sort: ASC, DESC
$eq, $ne, $exists, $in, $any, $begins, $gt, $lt, $lte, $gte
productData.productTypeSearch: ✗
Aggregate: ✓
Sort: ASC, DESC
$eq, $ne, $exists, $in, $any
productData.slugSearch: ✗
Aggregate: ✓
Sort: ASC, DESC
$eq, $ne, $exists, $in, $any, $begins, $gt, $lt, $lte, $gte
productData.visibleSearch: ✗
Aggregate: ✓
Sort: ASC, DESC
$eq, $ne, $exists, $in, $any
productData.visibleInPosSearch: ✗
Aggregate: ✓
Sort: ASC, DESC
$eq, $ne, $exists, $in, $any
skuSearch: ✗
Aggregate: ✓
Sort: ASC, DESC
$eq, $ne, $exists, $in, $any, $begins, $gt, $lt, $lte, $gte
visibleSearch: ✗
Aggregate: ✓
Sort: ASC, DESC
$eq, $ne, $exists, $in, $any
Authentication
  • When developing websites or building an app with Blocks, this method may require elevated permissions, depending on the identity of the user calling it and the calling user's permissions.
  • When building apps without Blocks or for headless projects, you can only call this method directly when authenticated as a Wix app or Wix user identity. When authenticated as a different identity, you can call this method using elevation.
  • Elevation permits users to call methods they typically cannot access. Therefore, you should only use it intentionally and securely.
Permissions
Manage Stores - all permissions
Read Stores - all read permissions
Manage Orders
Manage Products
Read Products
Manage Restaurants - all permissions
Read v3 catalog
Manage v3 catalog
Manage Stores
Read products in v3 catalog
Product v3 read admin
Learn more about app permissions.
Method Declaration
Copy
Method Parameters
searchCursorSearchRequired

WQL expression for searching variants.


optionsSearchVariantsOptions
Returns
Return Type:Promise<SearchVariantsResponse>
Errors

This method doesn't return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?