JSPM

serpnode-js

0.1.2
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 9
  • Score
    100M100P100Q62913F
  • License MIT

Serpnode.com API client for Node.js

Package Exports

  • serpnode-js

Readme

Serpnode Node.js SDK

Minimal Node.js client for the Serpnode API. Supports authentication via apikey header (default) or as a query parameter, and exposes the core endpoints: status, search, options, and locations.

  • Requires Node.js >= 18 (uses global fetch).

Install

npm install serpnode-js

Usage

import { SerpnodeClient } from "serpnode-js";

const client = new SerpnodeClient({
  apiKey: process.env.SERPNODE_API_KEY,
  // baseUrl: "https://api.serpnode.com/v1",
  // authInQuery: false,
});

const status = await client.status();
console.log(status);

const search = await client.search({ q: "site:example.com" });
console.log(search);

const opts = await client.options();
console.log(opts);

const locs = await client.locations({ q: "United States" });
console.log(locs);

Authentication

  • Default: apikey: <API_KEY> header
  • Alternative: set authInQuery: true to send apikey=<API_KEY> query parameter

License

MIT