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

@agentseo/sdk

v0.1.1

Published

Official JavaScript SDK for AgentSEO API

Readme

@agentseo/sdk

Official JavaScript SDK for AgentSEO.

Install

npm install @agentseo/sdk

Quickstart (Node.js ESM)

Create demo.mjs:

import { AgentSEO } from "@agentseo/sdk";

const client = new AgentSEO({
  apiKey: process.env.AGENTSEO_API_KEY!,
  baseUrl: "https://www.agentseo.dev",
  projectId: "client-alpha",
  workflowId: "nightly-refresh",
});

const job = await client.analyzeSerp({
  keyword: "seo agency austin",
  location: "Austin, TX",
  location_code: 1026201,
});

console.log(job.jobId);
console.log(await client.getJob(job.jobId));

Run it:

export AGENTSEO_API_KEY="sk_live_your_key"
node demo.mjs

Async Jobs (queue + poll)

By default, requests are queued (sync: false) and return a job object.

const job = await client.contentGap({
  url: "https://example.com/blog/post",
  keyword: "best project management software",
});

const result = await client.getJob(job.jobId);

Set projectId and workflowId once on the client when you want usage, jobs, and budgets grouped by agent workflow. You can also override them per request:

await client.search(
  { query: "best crm software" },
  { projectId: "client-beta", workflowId: "manual-research" },
);

For geo-targeted endpoints, pass location_code when you need deterministic targeting:

await client.search({
  query: "best crm software",
  location: "Austin, TX",
  location_code: 1026201,
  limit: 5,
});

For AI Overview checks, pass target_domain when the agent needs to know whether your site is present in the sampled candidate set:

await client.aiOverviewExtract({
  keyword: "best seo agency",
  location: "Austin, TX",
  location_code: 1026201,
  target_domain: "example.com",
});

Error Handling

import { AgentSEOError } from "@agentseo/sdk";

try {
  await client.search({ query: "agentic seo tools" }, { sync: true });
} catch (error) {
  if (error instanceof AgentSEOError) {
    console.error(error.status, error.message, error.details);
  }
}

API Surface

  • localAudit(input, options?)
  • contentGap(input, options?)
  • search(input, options?)
  • analyzeSerp(input, options?)
  • aiOverviewExtract(input, options?)
  • localVisibilityTrack(input, options?)
  • llmMentionsTrack(input, options?)
  • contentDecayDetect(input, options?)
  • keywordClusterBuild(input, options?)
  • getJob(jobId)
    • pass getJob(jobId, { projectId, workflowId }) if you want poll requests grouped separately from the client default

Request Options

  • sync?: boolean Open a short inline processing window when true. If the job is not ready yet, the API may still return 202 with a job payload.
  • idempotencyKey?: string Prevent duplicate job creation on retries.
  • projectId?: string Group usage and jobs under a project.
  • workflowId?: string Group usage and jobs under a workflow.

Notes

  • This package is ESM-first. Use import, not require.