sajari
v0.20.0
Published
JavaScript SDK for the Sajari search API
Downloads
1,871
Readme
Sajari Javascript SDK (Browser only) ·
The Sajari Javascript SDK provides a basic API for querying Sajari search services from web browsers.
If you are want to create a search UI for your website then checkout our React SDK or generate a search interface from our Console.
Table of Contents
Install
npm install --save sajari
Getting Started
A quick search example using the website
search pipeline.
import { Client, Tracking } from "sajari";
const client = new Client("<project>", "<collection>");
const tracking = new Tracking();
tracking.clickTokens("url");
client.searchPipeline(
"website",
{ q: "Foo Bar", resultsPerPage: "10" },
tracking,
(err, res) => {
console.log(err || res);
}
);
The Client
object handles making requests and callbacks.
Documentation
Full documentation can be found at https://sajari.github.io/sajari-sdk-js/.
License
We use the MIT license