What is Search?

An AI-driven NLP search, lets users search in the way that comes most naturally to them - and this is just the beginning. Our goal is to challenge the status quo in a space that hasn’t changed for decades, and transition context-powered search from a ‘good-to-have’ to an absolute essential for any growth-focused brand.

Search API

Below is an explanation of the search feature offered by Zevi.ai , along with examples of how it can be used.

Endpoint

GET
Sample Request :
curl --request GET 'https://api.zevi.ai/2023-01/search?limit=25&store=63b5a4f23d3d68e12be783d9&q=gh' -H 'X-Zevi-Org-Id: 63b5a4f23d3d68e12be783d9' \ -H 'X-Zevi-Api-Key: 9a940c8f-4609-4fa8-acab-5f4d55facfef' \ -H 'Content-Type: application/json'
Parameter
Type
Description

store
String
Store name or Org Id (Required)

q
String
Any search string which user enters (Required)

pageno
positive integer
Store name or Org Id (Required)

limit
String
Any search string which user enters (Required)

filter
String
Store name or Org Id (Required)
Sample Response :
{ "ranked_list": [ { "product_id": "11441", "title": "Pure Desi Ghee", "description": "Indulge in the rich and authentic taste of pure desi ghee. Made from the finest quality cow's milk, this ghee is carefully handcrafted to perfection. With its golden color and irresistible aroma, it adds a delectable flavor to your favorite dishes. Use it for cooking, baking, or drizzle it over steaming rice for a heavenly experience.", "category1": "Grocery", "category2": "Cooking Essentials", "subcategory": "Ghee", "handle": "pure-desi-ghee", "store_id": 999, "store_name": "Spice Bazaar" }, { "product_id": "25522", "title": "Clarified Butter (Ghee) Jar", "description": "Discover the essence of traditional cooking with this premium clarified butter, also known as ghee. Crafted from the finest quality butter, it undergoes a meticulous clarifying process to extract pure golden goodness. This rich and aromatic ghee adds depth and flavor to your curries, lentils, and homemade sweets. Experience the authentic taste of India in every dish.", "category1": "Grocery", "category2": "Cooking Essentials", "subcategory": "Ghee", "handle": "clarified-butter-ghee-jar", "store_id": 999, "store_name": "Spice Bazaar" }, ..., ... ], "total_result_count": 10, "filters":[ { "title":"Filter Color", "column_name":"filter_color", "type":"checkbox", "values":[ "Blue", "Green", "Purple", "Black", "Red", "Orange", "Yellow", "Grey" ] }, { "title":"Filter Price", "column_name":"filter_price", "type":"checkbox", "values":[ "501-1000", "0-500", "1001-1500", "1501-2000", "2001-4000" ] }, { "title":"Filter Size", "column_name":"filter_size", "type":"checkbox", "values":[ "S", "M", "L", "XL", "XXL" ] }, ... ] }

Filters API

For each search request, we offer a filter JSON array in our response, similar to the sample responses. This array includes various columns specific to the products and stores in question. To create, modify, or delete filters, you can use the Filter tab on the dashboard. Assuming that you have already created the filters, you may want to refine your search results by using the color=Black filter. The following example of a search request will implement this filter and retrieve only the products that match the search query, and then further narrow down the search results to only include products with the color Black.

Zevi AI

Sample request with filter

Filter parameter format :

filter={filter_column}={value}
curl --request GET 'https://api.zevi.ai/2023-01/search?limit=25&store=63b5a4f23d3d68e12be783d9&q=ha&filter=filter_color=Black' -H 'X-Zevi-Org-Id: 63b5a4f23d3d68e12be783d9' \ -H 'X-Zevi-Api-Key: 9a940c8f-4609-4fa8-acab-5f4d55facfef' \ -H 'Content-Type: application/json'

As filter format mentioned above, you may notice that there is an additional parameter filter=filter_color=Black added to the search request. This parameter enables you to apply any other filter that you have previously created using the following format: filter={filter_column}={value}. You can apply all available filters in a single request, if desired.

Sample request with multiple filters on multiple columns

Filter parameter format :

filter={filter_column1}={value1}&filter={filter_column2}={value2}​
curl --request GET 'https://api.zevi.ai/2023-01/search?limit=25&store=63b5a4f23d3d68e12be783d9&q=ha&filter=filter_color=Black&filter=filter_size=XL' -H 'X-Zevi-Org-Id: 63b5a4f23d3d68e12be783d9' \ -H 'X-Zevi-Api-Key: 9a940c8f-4609-4fa8-acab-5f4d55facfef' \ -H 'Content-Type: application/json'

In this above sample request there are 2 filters applied on two different columns, One one color as filter=filter_color=Black and other is on size as filter=filter_size=XL

Sample request with multiple filters on same columns

Filter parameter format :

filter={filter_column1}={value1}&filter={filter_column2}={value2}​
curl --request GET 'https://api.zevi.ai/2023-01/search?limit=25&store=63b5a4f23d3d68e12be783d9&q=ha&filter=filter_color=Black&filter=filter_color=Green' -H 'X-Zevi-Org-Id: 63b5a4f23d3d68e12be783d9' \ -H 'X-Zevi-Api-Key: 9a940c8f-4609-4fa8-acab-5f4d55facfef' \ -H 'Content-Type: application/json'

In this above sample request there are 2 filters applied on same columns, One one color as filter=filter_color=Black and other is on size as filter=filter_color=Green

Sample request with range based filters​

Filter parameter format :

filter={filter_column}={min_value}-{max_value}
curl --request GET 'https://api.zevi.ai/2023-01/search?limit=25&store=63b5a4f23d3d68e12be783d9&q=ha&filter=filter_price=500-1000' -H 'X-Zevi-Org-Id: 63b5a4f23d3d68e12be783d9' \ -H 'X-Zevi-Api-Key: 9a940c8f-4609-4fa8-acab-5f4d55facfef' \ -H 'Content-Type: application/json'

In this above sample request there is filter filter=filter_price=500-1000 applied on the price column to get products in the price range of 500 to 1000.

The filter parameter is a powerful tool that allows you to refine your search results based on specific criteria such as color, size, price range, and more. It offers a flexible and efficient way to customize your search and find the products that best match your preferences and needs. In short, the filter parameter enables you to create, modify, and apply filters to your search requests, helping you to find exactly what you are looking for.

Configuration

Out of stock products- You can choose to show or hide out-of-stock products. search results to fit your store's requirements. Pagination - You can also determine the number of products displayed per page. These features give you more control over how your customers interact with your store, ultimately enhancing their experience.

Zevi AI