vtex.local – Search-API
Check the new . We created this guide to improve the onboarding experience for developers at VTEX. It assembles all documentation on our Developer Portal about Search and is organized by focusing on the developer's journey.
This API lets you search and sort products in the Catalog using Fulltext, Category and Brand search terms.
Retrieve product data to create custom searches and product shelves.
- Homepage
- https://api.apis.guru/v2/specs/vtex.local:Search-API/1.0.json
- Provider
- vtex.local:Search-API / Search-API
- OpenAPI version
- 3.0.0
- Spec (JSON)
- https://api.apis.guru/v2/specs/vtex.local/Search-API/1.0/openapi.json
- Spec (YAML)
- https://api.apis.guru/v2/specs/vtex.local/Search-API/1.0/openapi.yaml
Tools (17)
Extracted live via the executor SDK.
-
autocomplete.autoCompleteRetrieves product's information related to the searched string.
{{searchString}} is the part of string the user is looking for. E.g.:ref|refrig|refrigerator` -
crossSelling.productSearchAccessoriesRetrieves general information about the product's accessories.
-
crossSelling.productSearchShowTogetherRetrieves general information about the products that are show together with the product in question.
-
crossSelling.productSearchSimilarsRetrieves general information about related product searches.
-
crossSelling.productSearchSuggestionsRetrieves general information about other product suggestions related to the product.
-
crossSelling.productSearchWhoBoughtAlsoBoughtRetrieves general information about other related products that the user also bought.
-
crossSelling.productSearchWhoSawAlsoBoughtRetrieves general information about other related products that the users saw and also bought.
-
crossSelling.productSearchWhoSawAlsoSawRetrieves general information about other related products that the users also saw.
-
facets.facetscategoryRetrieves products by store facets.
⚠️ This endpoint returns a maximum of 50 items per response, so the difference between
_fromand_toshould not exceed this number. The result order is descending, from the highest product ID to the lowest.Response body example:
{ "Departments": [ { "Quantity": 2, "Position": null, "Name": "Beers Beers Mesmo", "Link": "/Beers-Beers-Mesmo/1?map=c,b", "LinkEncoded": "/Beers-Beers-Mesmo/1?map=c,b", "Map": "c", "Value": "Beers-Beers-Mesmo" }, { "Quantity": 2, "Position": null, "Name": "Merch Integration Category ||", "Link": "/Merch-Integration-Category-||/1?map=c,b", "LinkEncoded": "/Merch-Integration-Category-%7C%7C/1?map=c,b", "Map": "c", "Value": "Merch-Integration-Category-||" }, { "Quantity": 1, "Position": null, "Name": "Jogos", "Link": "/Jogos/1?map=c,b", "LinkEncoded": "/Jogos/1?map=c,b", "Map": "c", "Value": "Jogos" }, { "Quantity": 3, "Position": null, "Name": "189", "Link": "/189/1?map=c,b", "LinkEncoded": "/189/1?map=c,b", "Map": "c", "Value": "189" }, { "Quantity": 1, "Position": null, "Name": "Tests", "Link": "/Tests/1?map=c,b", "LinkEncoded": "/Tests/1?map=c,b", "Map": "c", "Value": "Tests" }, { "Quantity": 1, "Position": null, "Name": "Accessories", "Link": "/Accessories/1?map=c,b", "LinkEncoded": "/Accessories/1?map=c,b", "Map": "c", "Value": "Accessories" }, { "Quantity": 2, "Position": null, "Name": "Bars", "Link": "/Bars/1?map=c,b", "LinkEncoded": "/Bars/1?map=c,b", "Map": "c", "Value": "Bars" }, { "Quantity": 5, "Position": null, "Name": "Categoria Teste Timeout", "Link": "/Categoria-Teste-Timeout/1?map=c,b", "LinkEncoded": "/Categoria-Teste-Timeout/1?map=c,b", "Map": "c", "Value": "Categoria-Teste-Timeout" } ], "Brands": [ { "Quantity": 2, "Position": null, "Name": "Merch XP", "Link": "/1/1234600/1/Merch-XP?map=c,c,b,b", "LinkEncoded": "/1/1234600/1/Merch-XP?map=c,c,b,b", "Map": "b", "Value": "Merch-XP" }, { "Quantity": 2, "Position": null, "Name": "Zé", "Link": "/1/1234600/1/Ze?map=c,c,b,b", "LinkEncoded": "/1/1234600/1/Ze?map=c,c,b,b", "Map": "b", "Value": "Ze" }, { "Quantity": 1, "Position": null, "Name": "Odin", "Link": "/1/1234600/1/Odin?map=c,c,b,b", "LinkEncoded": "/1/1234600/1/Odin?map=c,c,b,b", "Map": "b", "Value": "Odin" }, { "Quantity": 2, "Position": null, "Name": "Hoegaarden", "Link": "/1/1234600/1/Hoegaarden?map=c,c,b,b", "LinkEncoded": "/1/1234600/1/Hoegaarden?map=c,c,b,b", "Map": "b", "Value": "Hoegaarden" }, { "Quantity": 1, "Position": null, "Name": "Teste marcas", "Link": "/1/1234600/1/Teste-marcas?map=c,c,b,b", "LinkEncoded": "/1/1234600/1/Teste-marcas?map=c,c,b,b", "Map": "b", "Value": "Teste-marcas" }, { "Quantity": 1, "Position": null, "Name": "Bitmap Bureau", "Link": "/1/1234600/1/Bitmap-Bureau?map=c,c,b,b", "LinkEncoded": "/1/1234600/1/Bitmap-Bureau?map=c,c,b,b", "Map": "b", "Value": "Bitmap-Bureau" }, { "Quantity": 1, "Position": null, "Name": "Sega", "Link": "/1/1234600/1/Sega?map=c,c,b,b", "LinkEncoded": "/1/1234600/1/Sega?map=c,c,b,b", "Map": "b", "Value": "Sega" }, { "Quantity": 3, "Position": null, "Name": "Technogym", "Link": "/1/1234600/1/Technogym?map=c,c,b,b", "LinkEncoded": "/1/1234600/1/Technogym?map=c,c,b,b", "Map": "b", "Value": "Technogym" }, { "Quantity": 3, "Position": null, "Name": "Aptany", "Link": "/1/1234600/1/Aptany?map=c,c,b,b", "LinkEncoded": "/1/1234600/1/Aptany?map=c,c,b,b", "Map": "b", "Value": "Aptany" }, { "Quantity": 1, "Position": null, "Name": "Tectoy", "Link": "/1/1234600/1/Tectoy?map=c,c,b,b", "LinkEncoded": "/1/1234600/1/Tectoy?map=c,c,b,b", "Map": "b", "Value": "Tectoy" } ], "SpecificationFilters": {}, "CategoriesTrees": [ { "Id": 1, "Quantity": 4, "Position": null, "Name": "Beers Beers Mesmo", "Link": "/Beers-Beers-Mesmo/1?map=c,b", "LinkEncoded": "/Beers-Beers-Mesmo/1?map=c,b", "Map": "c", "Value": "Beers-Beers-Mesmo", "Children": [ { "Id": 2, "Quantity": 1, "Position": null, "Name": "Lager Beers", "Link": "/Beers-Beers-Mesmo/Lager-Beers/1?map=c,c,b", "LinkEncoded": "/Beers-Beers-Mesmo/Lager-Beers/1?map=c,c,b", "Map": "c", "Value": "Lager-Beers", "Children": [] } ] }, { "Id": 1234571, "Quantity": 2, "Position": null, "Name": "Jogos", "Link": "/Jogos/1?map=c,b", "LinkEncoded": "/Jogos/1?map=c,b", "Map": "c", "Value": "Jogos", "Children": [] }, { "Id": 1234579, "Quantity": 3, "Position": null, "Name": "189", "Link": "/189/1?map=c,b", "LinkEncoded": "/189/1?map=c,b", "Map": "c", "Value": "189", "Children": [] }, { "Id": 1234587, "Quantity": 1, "Position": null, "Name": "Tests", "Link": "/Tests/1?map=c,b", "LinkEncoded": "/Tests/1?map=c,b", "Map": "c", "Value": "Tests", "Children": [] }, { "Id": 1234595, "Quantity": 1, "Position": null, "Name": "Accessories", "Link": "/Accessories/1?map=c,b", "LinkEncoded": "/Accessories/1?map=c,b", "Map": "c", "Value": "Accessories", "Children": [ { "Id": 1234596, "Quantity": 1, "Position": null, "Name": "Foam rollers", "Link": "/Accessories/Foam-rollers/1?map=c,c,b", "LinkEncoded": "/Accessories/Foam-rollers/1?map=c,c,b", "Map": "c", "Value": "Foam-rollers", "Children": [] } ] }, { "Id": 1234597, "Quantity": 2, "Position": null, "Name": "Bars", "Link": "/Bars/1?map=c,b", "LinkEncoded": "/Bars/1?map=c,b", "Map": "c", "Value": "Bars", "Children": [ { "Id": 1234598, "Quantity": 1, "Position": null, "Name": "Training Bars", "Link": "/Bars/Training-Bars/1?map=c,c,b", "LinkEncoded": "/Bars/Training-Bars/1?map=c,c,b", "Map": "c", "Value": "Training-Bars", "Children": [] }, { "Id": 1234599, "Quantity": 1, "Position": null, "Name": "Curl Bars", "Link": "/Bars/Curl-Bars/1?map=c,c,b", "LinkEncoded": "/Bars/Curl-Bars/1?map=c,c,b", "Map": "c", "Value": "Curl-Bars", "Children": [] } ] }, { "Id": 15, "Quantity": 1, "Position": null, "Name": "Coronas", "Link": "/Coronas/1?map=c,b", "LinkEncoded": "/Coronas/1?map=c,b", "Map": "c", "Value": "Coronas", "Children": [ { "Id": 13, "Quantity": 1, "Position": null, "Name": "não tem limite!", "Link": "/Coronas/nao-tem-limite-/1?map=c,c,b", "LinkEncoded": "/Coronas/nao-tem-limite-/1?map=c,c,b", "Map": "c", "Value": "nao-tem-limite-", "Children": [] } ] }, { "Id": 4, "Quantity": 4, "Position": null, "Name": "Merch Integration Category ||", "Link": "/Merch-Integration-Category-||/1?map=c,b", "LinkEncoded": "/Merch-Integration-Category-%7C%7C/1?map=c,b", "Map": "c", "Value": "Merch-Integration-Category-||", "Children": [] } ], "PriceRanges": [], "Summary": { "Departments": { "DisplayedItems": 8, "TotalItems": 8 }, "CategoriesTrees": { "DisplayedItems": 13, "TotalItems": 13 }, "Brands": { "DisplayedItems": 10, "TotalItems": 10 }, "PriceRanges": { "DisplayedItems": 0, "TotalItems": 0 }, "SpecificationFilters": {} }} -
facets.getApiCatalogSystemPubFacetsCategoryCategoryIdRetrieves the names and IDs of the categories facets.
⚠️ This endpoint returns a maximum of 50 items per response, so the difference between
_fromand_toshould not exceed this number. The result order is descending, from the highest product ID to the lowest.Response body example:
[ [ { "Name":"Tamanho Global", "Id":45 }, { "Name":"Percentuals", "Id":25 } ]] -
offers.getApiCatalogSystemPubProductsOffersProductIdRetrieves existing offers of a specific product.
-
offers.getApiCatalogSystemPubProductsOffersProductIdSkuSkuIdRetrieves existing offers of a specific SKU.
-
search.productSearchRetrieves general information about the products related to the term searched. This is the main search used by the store. The user can type anything to be searched.
For example, if they search for a "decanter", this is the URL:
https://{{accountName}}.{{environment}}.com.br/api/catalog_system/pub/products/search/decanter.Note that maybe the response can be HTTP 200 or 206, 206 means that it's a partial content response.
If it is a 206 take a look at the Headers, will be an entry called resources. E.g.: resources → 0-9/19. This means that the response is showing items from 0 to 9, 10 items, but there were 19 items found. See more information at the paging route example.
-
search.productSearchFilteredandOrderedRetrieves general information about the store products. This information can be filtered and ordered by a number of options. It also can be paginated, filtered and ordered.
Filters
-
Filter by full text -
ft={searchWord}
E.g.:ft=television -
Filter by category -
fq=C:/{a}/{b}
{a}and{b}are Category IDs
E.g.:fq=C:/1000041/1000049/ -
Filter by brand -
fq=B:/{a}/{b}
{a}and{b}are Brand IDs E.g.:fq=B:/189385/189387/ -
Filter by specification -
fq=specificationFilter_{a}:{b}
{a}is the specification ID{b}is the specification value E.g.: To filter products where the color is Blue, find the specification ID for color. Suppose it is 123, then the query will be:fq=specificationFilter_123:Blue -
Filter by price range -
fq=P:[{a} TO {b}]
{a}is the minimum price "from"{b}is the highest price "to"
E.g.:fq=P:[0 TO 20]will search products between 0.00 and 20.00. -
Filter by collection -
fq=productClusterIds:{{productClusterId}}productClusterIdis the same ascollectionId
For more information about collections, read . -
Filter by product ID -
fq=productId:{{productId}} -
Filter by SKU ID -
fq=skuId:{{skuId}} -
Filter by referenceId -
fq=alternateIds_RefId:{{referenceId}} -
Filter by EAN13 -
fq=alternateIds_Ean:{{ean13}} -
Filter by availability at a specific sales channel -
fq=isAvailablePerSalesChannel_{{sc}}:{{bool}}
{{sc}}is the desired sales channel
{{bool}}is true ou false, 1 or 0.
E.g.: seaching available products for the sales channel 4 would befq=isAvailablePerSalesChannel_4:1 -
Filter by available at a specific seller -
fq=sellerId:{{sellerId}}The search does not include White Label Sellers.
Pagination
- Initial item number -
_from={{first}} - Final item number -
_to={{last}}
⚠️ This endpoint returns a maximum of 50 items per response, so the difference between
_fromand_toshould not exceed this number. The result order is descending, from the highest product ID to the lowest.Sorting
-
Price
O=OrderByPriceDESC
O=OrderByPriceASC -
Top Selling Products
O=OrderByTopSaleDESC -
Best Reviews
O=OrderByReviewRateDESC -
Name
O=OrderByNameASC
O=OrderByNameDESC -
Release Date
O=OrderByReleaseDateDESC -
Best Discounts
O=OrderByBestDiscountDESC -
Score
O=OrderByScoreDESC
-
-
search.searchbyproducturlRetrieves general information about the product of the URL you searched for.
-
openapi.previewSpecPreview an OpenAPI document before adding it as a source
-
openapi.addSourceAdd an OpenAPI source and register its operations as tools