Quickstart
4min
these instructions work with any javascript environment or framework that supports installing packages through npm installation first install required packages to your project with npm or yarn npm install @klevu/core initialization before making any request it is required to provide the klevu api key and the search server you are targeting this should be done in the index of the application or the initialization of your app url and apikey can be found from your kmc installation import { klevuconfig } from "@klevu/core" klevuconfig init({ url "https //\<your server> ksearchnet com/cs/v2/search", apikey "klevu xxxxxxxxxxxxx", })import { klevuconfig } from "@klevu/core" klevuconfig init({ url "https //\<your server> ksearchnet com/cs/v2/search", apikey "klevu xxxxxxxxxxxxx", }) making a search all queries to klevu are made with klevufetch function inside klevufetch you provide any amount of query functions as parameters in this example we do most basic product search with search term " hoodies " import { klevufetch, search } from "@klevu/core" const result = await klevufetch(search("hoodies")) console log(result queriesbyid("search")? records)import { klevufetch, search } from "@klevu/core" const result = await klevufetch(search("hoodies")) console log(result getqueriesbyid("search")? records) simple playground click here to see a simple example you can play with