×

Node.js client library

Use Node.js client library to integrate AutoComplete API into your Node.js application

const u = require("unirest"); //intsall from: http://unirest.io/nodejs.html

//Replace the following string value with your valid X-RapidAPI-Key.

Your_X_RapidAPI_Key = "XXXXXXXXXXXXXXXXXXXX";

//The query parameters: Update according to your search query.
q = "tay"; #the search query

u.get("https://contextualwebsearch-websearch-v1.p.rapidapi.com/api/spelling/AutoComplete?text=" + q)
    .header("X-RapidAPI-Key", Your_X_RapidAPI_Key)
    .end(function(result) {
        console.log("HTTP status code: " + result.status);
    });