npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

talordata-serp

v0.1.1

Published

JavaScript SDK for TalorData SERP API

Readme

TalorData for JavaScript/TypeScript

TalorDataofficial JavaScript SDK for integrating search data into your AI workflow, RAG / fine-tuning, or JavaScript application. TalorData helps developers and AI applications connect to real-time, structured, and reliable search data through a single SERP API. With support for Google, Bing, News, Images, Shopping, Maps, Scholar, Trends, and more, TalorData makes it easier to build AI agents, search copilots, SEO workflows, and data-driven automations powered by live search results.

Install

npm install talordata-serp

Quick Start

Sign up at TalorData and get your API key from the dashboard.

const { Client } = require("talordata-serp");

async function main() {
  const client = new Client({ apiToken: process.env.TALORDATA_API_TOKEN });

  const result = await client.search({
    engine: "google",
    q: "car",
  });

  console.log(result.search_metadata?.status);
  console.log(result.search_information?.query_displayed);
}

main().catch(console.error);

Examples

  • examples/basic-search.js: basic json=1 search example.

  • examples/json-plus-html.jsjson=2 example with both HTML and parsed JSON.

  • examples/html-output.jsjson=3 example that prints HTML output.

You can also set the token once in your shell:

export TALORDATA_API_TOKEN=your_token

Then use the top-level helper:

const talordata = require("talordata-serp");

async function main() {
  const result = await talordata.search({
    engine: "google",
    q: "car",
  });

  console.log(result);
}

main().catch(console.error);

API Design

  • new Client({ apiToken }): create a reusable client.

  • client.search(...): send a form-encoded POST request to /serp/v1/request and return the parsed result.

  • client.searchJson(...): alias of search(...).

  • client.searchHtml(...): return the HTML string for json=3.

  • client.rawSearch(...): return the raw HTTP response body.

JSON Modes

  • json=1: returns parsed JSON data. This is the default mode used by client.search(...).

  • json=2: returns both html and json. The SDK automatically parses data.json into an object when possible.

  • json=3: returns HTML. The SDK unwraps the HTML string from the API response.

Example With URL

const { Client } = require("talordata-serp");

async function main() {
  const client = new Client({ apiToken: process.env.TALORDATA_API_TOKEN });

  const result = await client.search({
    url: "https://www.google.com/search",
    q: "car",
    json: 1,
  });

  console.log(result);
}

main().catch(console.error);

Notes

  • Auth uses the Authorization: Bearer <token> header.

  • Requests are sent as application/x-www-form-urlencoded.

  • Boolean params are normalized to "1" and "0" before sending.

Learn more

Explore TalorData SERP API integrations and use cases:

Quick Start

View Documentation