Get autosuggestions

This API returns product/category suggestions based on an inputted search query.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
👍

Code sample

Check the demo code sample that demonstrates how to implement Autosuggest.

Query Params
string
required
Defaults to uid%3D7797686432023%3Av%3D11.5%3Ats%3D1428617911187%3Ahc%3D55

A first-party cookie created by the Bloomreach tracking pixel library (BrTrk). This cookie creates a unique, anonymous identifier for every browser or device.

Use the default value provided, which is already encoded.

int32
required
Defaults to 6413

Your site's numerical Bloomreach account ID. Your Bloomreach representative gives your site's account ID to you before or during your integration kickoff meeting.

The example value shown here, 6413, is included for your convenience to send a request with Try It.

string

The authentication key provided by Bloomreach for the account that's sending the request.

Autosuggest API calls are client-side, so you can leave auth_key empty.

string
enum

Indicates whether to return data wrapped in the function for cross-origin requests.

For server-side requests, use the value br_server. For native-app requests, use the value br_app.

Allowed:
string
required
Defaults to pacifichome

A list of catalog views that you want to see in your suggestions. You must specify the catalog name within the catalog view. For Product catalogs, the catalog name is the same value as your domain_key.

A catalog_views value contains the view_ids within a catalog separated by a colon. If you pass multiple catalogs in catalog_views, they must be pipe-separated. Attributes suggestions are enabled for the first two catalogs mentioned as part of catalog_views and only for the first view passed in each of the first two catalogs.

For example, &catalog_views=product:store1,store2|recipe:premium|articles would return text and attribute suggestions for the product catalog in the store1 view, and for the recipe catalog in the premium view; only text suggestions will be displayed for the articles catalog.

The example value shown here, pacifichome, is included for your convenience to send a request with Try It.

string
required
Defaults to cha

Your site visitor's partial search query that Autosuggest should operate on.

You can percent encode spaces between terms as %20, or you can leave the spaces unencoded.

The example value shown here, cha, is included for your convenience to send a request with Try It.

string
required
Defaults to https://example.com

The URL of the page or HTTP referrer where the request is started.

string
required
Defaults to 1703497216731

An ID to track site visitor clicks. We recommend generating unique, random values of 13 digits to enable click-tracking.

Bloomreach doesn't automatically enforce the requirements for this parameter. For example, you can enter test as your value for each instance of the request_id parameter without triggering an error message. However, using a unique value allows us to help you if you encounter a problem.

string
enum
required
Defaults to suggest

The type of API request. Value should be suggest for Autosuggest requests.

Allowed:
string
required
Defaults to https://www.documentation-site.com

The absolute URL of the page where the request is initiated. Do not use a relative URL.

The example value shown here, https://www.documentation-site.com, is included for your convenience to send a request with Try It.

string

The user agent of the browser that's making the search request.

Make sure that this value in your API request is the same as the value in the original request from your user. We optimize pages in part by crawling and gathering data, and the original user_agent lets us distinguish between our internal Bloomreach users who QA pages and everyone else who visits your site.

string

The universal customer ID of the user. You only need to pass this field if your particular integration tracks customers this way. The parameter captures user IDs from the customer side, and reuses the information when powering apps or enhancing cross-device linking. In this way, Bloomreach recognizes users in a way that's aligned with your system.

Use an anonymous string. Don't use email or other personally identifiable information.

If you do not track users this way, then omit this field.

Response

Language
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json

© Bloomreach, Inc. All rights reserved.