Documentation
Feedback
Guides
API Reference

Guides
Integration Guides
Search Protocol
VTEX Search Protocol

A search engine is a crucial part of e-commerce. It can drive more sales if the search results are good and it can worsen the user experience if they are bad.

Changing the search provider usually involved changing code both in the frontend and in the backend, creating unnecessary friction.

The idea behind the VTEX search protocol is to provide a clear contract between any VTEX store on VTEX IO and a search provider defined by a GraphQL schema. This contract enables low-effort switching between different search engines. And it also helps to speed up the development process of integration with a new search provider, because the integration will be completely decoupled from the frontend components.

Search protocol benefits both developers and VTEX stores!

How it Works

The VTEX Search Protocol is a set of definitions and GraphQL schemas that allows VTEX IO applications to serve e-commerce search results that can be used by VTEX Store Framework.

{"base64":"  ","img":{"width":2000,"height":1205,"type":"png","mime":"image/png","wUnits":"px","hUnits":"px","length":642913,"url":"https://cdn.jsdelivr.net/gh/vtexdocs/dev-portal-content@main/docs/guides/Integration-Guides/search-integration-guide/b4ac10c-search-protocol_22.png"}}
Creating a search-resolver service app on VTEX IO, which implements VTEX Search Protocol, allows any VTEX Account using VTEX IO to install such an application and, instantly, change the store's provider for search results. This is really useful as no frontend modification is required. It's also possible to distribute the search provider on VTEX App Store to make the installation process even simpler.

Search Schema

The GraphQL schema for VTEX Search Protocol defines the set of queries necessary for Store Framework to retrieve search information. This also includes the appropriate GraphQL types that any search resolver app should respond to.

You can check this schema on the vtex.search-graphql app here. The schema definition is on graphql/schema.graphql but there's also a reference on the repository's README.md.

Implementation Pre-requisites

  • Access to a user in a VTEX account, with permissions to link and install apps
  • TypeScript and Node.js familiarity
  • GraphQL familiarity
Contributors
2
Photo of the contributor
Photo of the contributor
+ 2 contributors
Was this helpful?
Yes
No
Suggest edits (Github)
Contributors
2
Photo of the contributor
Photo of the contributor
+ 2 contributors
On this page