Documentation
Feedback
Guides
API Reference

Guides
Guides
Integration Guides

Headless catalog

Be it through category menus, keyword searches, or product pages, shoppers accessing your headless store will need to browse through your products' information.

Below you can learn more about API endpoints you can use to help shoppers find what they need in your store. See the catalog documentation to learn how to manage products, SKUs and categories, among other things.

You can filter the results of the endpoints below by trade policy with the query parameter sc={tradePolicy}.

Categories

One of the ways shoppers will interact with your product information is by browsing through a categories menu.

Use the following endpoint to fetch category information:

Instead of browsing categories, shoppers may prefer to type a keyword into your store’s search bar to find what they want. VTEX provides two different search solutions for your store. We recommend that you use Intelligent Search, but you have the option to use the Legacy CMS Portal search if you wish.

Learn more about VTEX Intelligent Search.

Before implementing Intelligent Search in your headless storefront, make sure to check this Intelligent Search guide and make the necessary configurations.

To retrieve products with the Intelligent Search API, use this endpoint:

For any given Intelligent Search query, you can get search facets and display them so that your shoppers can narrow their search.

Shoppers may have trouble coming up with the optimal search term for their needs. Use these endpoints to help fill in the gaps:

Banners

You can use the Intelligent Search banners feature with this endpoint:

Intelligent Search autocomplete

You can also improve shopping experience by implementing an autocomplete feature. Use this endpoint to get suggested search terms based on a provided term:

You can also get the most searched terms on your site:

To retrieve products with the Legacy Search, use this endpoint:

Note that this endpoint provides multiple filtering and ordering options that can be made available for the shopper to narrow their search, improving the user’s experience. Handy examples include:

  • Searching within specific category levels (department, category and subcategory): https://{accountName}.vtexcommerce{environment}.com.br/api/catalog_system/pub/products/search/{department}/{category}/{subcategory}
  • Filtering products by collection: query string fq=productClusterIds:{collectionId}
  • Sorting by best discount: query string O=OrderByBestDiscountDESC

See the Search endpoint documentation to learn about all filtering and sorting options.

Legacy Search autocomplete

You can also implement an autocomplete feature to your store’s search bar using Legacu Search. To do this, use this endpoint:

Product details

On product pages and in other sections of your headless store, you will need to retrieve information about specific products.

We recommend using the Intelligent Search API for Product Detail Pages (PDP), as it provides:

  • Better search performance: Optimized for faster response times.
  • Consistent user experience: When using Delivery Promise, using Intelligent Search ensures delivery estimates and availability match between Product Listing Pages (PLP) and Product Detail Pages (PDP).
  • Location-based availability: Supports filtering by ZIP code for accurate product availability.

Use the Get list of products for a query endpoint with the query (or q) parameter to retrieve a specific product by ID. The Intelligent Search API supports the following ID types:

Search by Product ID:


_10
https://{accountName}.myvtex.com/api/io/_v/api/intelligent-search/product_search?query=product:{productId}

Search by SKU ID:


_10
https://{accountName}.myvtex.com/api/io/_v/api/intelligent-search/product_search?query=sku:{skuId}

Search by product slug:


_10
https://{accountName}.myvtex.com/api/io/_v/api/intelligent-search/product_search?query=product.link:{slug}

Other supported ID types:

  • query=product.id:{id} - Product ID (alternative syntax)
  • query=sku.id:{id} - SKU ID (alternative syntax)
  • query=sku.ean:{ean} - SKU EAN
  • query=sku.reference:{refId} - SKU Reference ID

Examples:


_10
https://{accountName}.myvtex.com/api/io/_v/api/intelligent-search/product_search?query=product:1234


_10
https://{accountName}.myvtex.com/api/io/_v/api/intelligent-search/product_search?q=product.link:apple-magic-mouse

For stores using Delivery Promise: You must include the zip-code parameter in all Intelligent Search API requests to ensure accurate delivery estimates and product availability. See the Delivery Promise for headless stores guide for implementation details.

Example with ZIP code (required for Delivery Promise):


_10
https://{accountName}.myvtex.com/api/io/_v/api/intelligent-search/product_search?query=product:1234&zip-code=22250040&hideUnavailableItems=true

The query parameter accepts specific filters like product:{id}, sku:{id}, product.link:{slug}, and other ID types to retrieve individual products. For more details, see the Intelligent Search API reference.

Alternatively, you can use the Legacy Search API endpoints to retrieve product information:

Legacy Search endpoints do not support Delivery Promise features. If your store uses Delivery Promise, you must use the Intelligent Search API as described above.

Cross selling

When a shopper is interested in a product, it may be a good idea to display related products that they may be interested in purchasing as well.

See this guide to learn how to set up cross selling capabilities and use the endpoints below to retrieve this information on your storefront:

Learn more

See these other guides to learn more about building a headless shopping experience using VTEX:

Contributors
2
Photo of the contributor
Photo of the contributor
Was this helpful?
Yes
No
Suggest Edits (GitHub)
Contributors
2
Photo of the contributor
Photo of the contributor
Was this helpful?
Suggest edits (GitHub)
On this page