Constructor-IO JavaScript Client
Constructor.io provides search as a service that optimizes results using artificial intelligence (including natural language processing, re-ranking to optimize for conversions, and user personalization).
Documentation
For the most up-to-date documentation for this library, please visit our API Documentation.
Installation
With npm:
npm install constructorio
Usage
Create a new instance with your API token and API key (available from the Customer Dashboard):
var ConstructorIO = ;var constructorio = apiToken: "your API token" apiKey: "your API key";
To add an item to your index:
constructorio;
To remove an item from your index:
constructorio;
To modify an item in your index:
constructorio;
To get autocomplete results:
const userParams = i: 'user device identifier' s: 1; constructorio;
To get search results:
const userParams = i: 'user device identifier' s: 1; constructorio;