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

data-4-seo-cli

v1.0.1

Published

Agent-first DataForSEO CLI for keyword research, SERP analysis, and competitor intelligence

Readme

data-for-seo-cli

Agent-first DataForSEO CLI. Keyword research, SERP analysis, competitor intelligence from your terminal. TSV by default - compact, structured, optimized for agent context windows.

Install

npm install -g data-4-seo-cli

Binary aliases: dataforseo and dfs.

Setup

# Interactive
dfs login

# Non-interactive
dfs login --login YOUR_LOGIN --password YOUR_PASSWORD

# Or use environment variables (no login needed)
export DATAFORSEO_LOGIN=your_login
export DATAFORSEO_PASSWORD=your_password

Credentials stored in ~/Library/Application Support/dataforseo-cli/credentials.json (macOS) with restrictive file permissions.

Commands

volume

Search volume, CPC, keyword difficulty, competition, intent, and 12-month trend.

dfs volume "seo tools" "keyword research"
dfs volume "seo verktyg" --location 2752 --language sv
keyword           volume  cpc   difficulty  competition  intent         trend
seo tools         12500   2.35  45          HIGH         commercial     14800,13900,12500,...
keyword research  8100    3.10  52          MEDIUM       informational  8100,7900,8100,...

suggestions

Keyword suggestions from a seed keyword.

dfs suggestions "seo tools" -n 10

related

Semantically related keywords.

dfs related "keyword research" -n 10

difficulty

Bulk keyword difficulty scores.

dfs difficulty "seo tools" "keyword research" "backlink checker"

serp

Live SERP analysis with feature detection (AI Overview, Featured Snippet, PAA, Video, Images).

dfs serp "best seo tools" --target yourdomain.com

Features and PAA go to stderr, organic results to stdout:

features: ai_overview, featured_snippet, people_also_ask    (stderr)
yourdomain.com: #3 https://yourdomain.com/seo-tools         (stderr)

position  domain          title                              url
1         ahrefs.com      Best SEO Tools...                  https://ahrefs.com/...
2         semrush.com     Top SEO Software...                https://semrush.com/...

ranked

Keywords a domain ranks for, sorted by volume.

dfs ranked ahrefs.com -n 10

overlap

Keyword intersection between two domains.

dfs overlap ahrefs.com semrush.com -n 10

competitors

Who competes for a set of keywords.

dfs competitors "seo tools" "keyword research tool" -n 10

content

Fetch and parse page content (title, headings, word count).

dfs content "https://example.com/page" --table
dfs content "https://example.com/page" --full --json

locations / languages

Look up location and language codes for --location and --language.

dfs locations sweden
dfs languages swedish

Output Formats

| Flag | Format | Use Case | |------|--------|----------| | (default) | TSV | Agent pipelines - fewest tokens | | --json | JSON | Structured parsing | | --table | Table | Human reading |

Global Options

-l, --location <code>    Location code (default: 2840 = US)
    --language <code>     Language code (default: en)
-n, --limit <n>          Max results (default: 50)
    --json               JSON output
    --table              Human-readable table
    --no-cache           Skip cache read
    --clear-cache        Purge all cached data
    --debug              Show request details

Caching

Results are cached to avoid duplicate API calls (and costs). Cache location:

  • macOS: ~/Library/Caches/dataforseo-cli/
  • Linux: ~/.cache/dataforseo-cli/

TTL by data type: keyword data (7 days), competitor data (3 days), SERP (1 day), locations/languages (30 days).

dfs volume "seo tools"          # hits API
dfs volume "seo tools"          # cached - no API cost
dfs volume "seo tools" --no-cache  # force fresh
dfs --clear-cache               # purge all

Why TSV?

JSON keys and brackets burn tokens. TSV is the most compact structured format - easy to parse, minimal overhead, fits more data in a context window. Ideal for AI agents and automation pipelines.

License

MIT