UNPKG

@serptech/api

Version:

Library for work with SERP API

40 lines (28 loc) 586 B
# Serp API JS library ## Installation ### NPM ```bash npm i --save @serp/api ``` ### Yarn ```bash yarn add @serp/api ``` ## Usage ```js // ES2015 module import: import { createSerpRestApi, createSerpWsApi } from "@serp/api"; // CommonJS module require: const { createSerpRestApi, createSerpWsApi } = require("@serp/api"); // REST const SerpRestApi = createSerpRestApi({ version: 1, token: "YOUR_SERP_TOKEN", }); // WebSocket const SerpWsApi = createSerpWsApi({ version: 1, token: "YOUR_SERP_TOKEN", }); SerpWsApi.connect(); ```