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

@adobe/mysticat-shared-seo-client

v1.6.0

Published

Shared modules of the SpaceCat Services - SEO Client

Readme

Mysticat Shared - SEO Client

An SEO API client for SpaceCat services.

Installation

npm install @adobe/mysticat-shared-seo-client

Usage

Creating an instance from Helix UniversalContext

const client = SeoClient.createFrom(context);

Constructor

import SeoClient from '@adobe/mysticat-shared-seo-client';

const config = {
  apiKey: '<API_KEY>',
  apiBaseUrl: '<API_BASE_URL>',
};

const client = new SeoClient(config, fetch);

API Methods

getTopPages(url, opts)

Returns the top organic pages for a given URL prefix, sorted by traffic. Fans out across multiple databases to aggregate traffic globally.

Parameters:

| Parameter | Type | Default | Description | |-----------|------|---------|-------------| | url | string | (required) | A prefix URL scoping which pages to return. Can include protocol (e.g., https://www.example.com) or omit it (e.g., www.example.com, example.com/us). | | opts.limit | number | 200 | Maximum number of pages to return (capped at 2000). | | opts.region | string | (optional) | ISO 3166-1 alpha-2 region code (e.g., CZ). Added to the default database list if not already present. |

Prefix URL filtering:

The url parameter acts as a prefix filter, not just a plain domain. This ensures that only pages belonging to the intended hostname (and optional path prefix) are returned. For example, passing https://www.example.com excludes pages from subdomains like blog.example.com or shop.example.com.

  • www prefixes (e.g., https://www.example.com): The method applies a server-side Bw (begins with) display filter on the SEO API call. This reliably scopes results to the correct hostname.
  • Non-www prefixes (e.g., https://example.com, example.com/us): The Bw API filter is unreliable for non-www domains because it can match subdomains (e.g., a filter for https://example.com also matches https://example.com.au). To handle this, the method over-fetches (2x the requested limit) and applies client-side filtering, keeping only pages whose URL equals the prefix or starts with {prefix}/.
  • If client-side filtering for non-www prefixes cannot meet the requested limit, a warning is logged (when the API returned a full result set, suggesting more pages exist but were filtered out) or a debug message is logged (when the provider simply has fewer matching pages).

Returns: { result: { pages: Array<{ url, sum_traffic, top_keyword }> }, fullAuditRef }

Example:

// Fetch top 100 pages for www.example.com (API-level filtering)
const { result } = await client.getTopPages('https://www.example.com', { limit: 100 });

// Fetch top 50 pages for a subfolder prefix (client-side filtering)
const { result: subResult } = await client.getTopPages('example.com/us', { limit: 50 });

// Fetch with a specific region database
const { result: czResult } = await client.getTopPages('https://www.example.cz', { limit: 100, region: 'CZ' });

Testing

npm run test

Linting

npm run lint

Additional Information