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

@aiapikey/cli

v0.3.1

Published

CLI tool for the AI API Key unified X/Twitter and Reddit data API

Readme

@aiapikey/cli

Unified API for X/Twitter and Reddit data. Search tweets, get user profiles, fetch Reddit posts — all with one API key.

Install

npm install -g @aiapikey/cli

Quick Start

# Authenticate
aiapikey login --key ua_live_xxxxxxxxxxxx

# Search X
aiapikey x search "AI agents lang:en"
aiapikey x search "build in public" --type Top --format table

# Get user info
aiapikey x user --username elonmusk
aiapikey x followers elonmusk --limit 10

# Get a tweet + its thread
aiapikey x tweet 1840123456789
aiapikey x thread 1840123456789

# Trending topics
aiapikey x trends --country UnitedStates

# Search Reddit
aiapikey reddit search "side project ideas" --subreddit startup
aiapikey reddit posts startup --sort top --time week --limit 10
aiapikey reddit comments 1abc23

Commands

X / Twitter

| Command | Description | |---|---| | x search <query> [--type Top\|Latest\|Media] | Search tweets. Supports X operators: lang:en, from:user, since:2026-01-01 | | x timeline <username> | Get a user's timeline | | x tweet <id> | Get a single tweet by ID | | x tweet-replies <id> | Get replies to a tweet | | x retweets <id> | Get who retweeted a tweet | | x thread <id> | Get a tweet thread | | x user <id> or x user --username <name> | Get user profile by ID or username | | x followers <username> | Get a user's followers | | x following <username> | Get who a user follows | | x media <username> | Get a user's media tweets | | x replies <username> | Get a user's replies | | x trends [--country <name>] | Get trending topics | | x list-members <listId> | Get members of a list | | x list-timeline <listId> | Get tweets from a list |

Reddit

| Command | Description | |---|---| | reddit search <query> [--subreddit <name>] | Search posts by keyword | | reddit subreddit <name> | Get subreddit info (subscribers, description, icon) | | reddit posts <subreddit> [--sort hot\|new\|top] [--time week] | List subreddit posts | | reddit comments <postId> | Get comments for a post |

Other

| Command | Description | |---|---| | login [--key <key>] | Save your API key | | docs | Print command reference |

Options

All commands support:

| Flag | Description | |---|---| | -f, --format <format> | Output format: json (default), table, csv, markdown | | -l, --limit <n> | Limit number of results | | -k, --key <key> | Override API key (global flag) |

Output Formats

json (default) — structured data, ideal for piping:

aiapikey x search "AI" --format json | jq '.tweets[0].text'

table — human-readable terminal output:

aiapikey x search "AI" --format table

csv — for spreadsheets:

aiapikey reddit search "SaaS" --format csv > results.csv

markdown — for docs and AI consumption:

aiapikey x trends --format markdown

Use as SDK

import { searchX, getXUser, searchReddit } from '@aiapikey/cli';

// Search X
const results = await searchX('AI agents lang:en', 'Latest');
console.log(results.tweets[0].text);

// Get user by username
const user = await getXUser({ username: 'elonmusk' });
console.log(user.followers);

// Search Reddit
const posts = await searchReddit('side project ideas', 'startup', 10);
console.log(posts.posts[0].title);

Pricing

Pay per returned result. See aiapikey.ai/pricing for details.

Get your API key at aiapikey.ai/dashboard.

Links