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

hi-energy-ai

v0.1.0

Published

Official JavaScript/TypeScript client for the Hi Energy Rocket affiliate marketing API

Readme

hi-energy-ai — Official JavaScript/TypeScript SDK

Official JavaScript/TypeScript client for the Hi Energy Rocket API — affiliate marketing data, coupon deals, advertiser discovery, commissions, click reporting, and MCP integration.

| | | |---|---| | npm | hi-energy-ai | | Staging API | https://staging.hienergyrocket.com/api/v1 | | Production API | https://app.hienergyrocket.com/api/v1 | | Documentation | staging.hienergyrocket.com/api_documentation | | Ruby gem | HiEnergyAgency/hi-energy-ai-ruby |

Installation

npm install hi-energy-ai

Requirements: Node.js 18+ (native fetch)

Quick start

  1. Sign in at Hi Energy Rocket and create an API key on the API Key page.
  2. Install and call the API:
import { Client, PRODUCTION } from "hi-energy-ai";

// Defaults to staging (https://staging.hienergyrocket.com/api/v1)
const client = new Client({ apiKey: process.env.HI_ENERGY_API_KEY! });

// Affiliate advertisers
await client.advertisers.list({ limit: 5 });

// Coupon / promo deals
await client.deals.list({ active: true, country: "US" });

// Universal search
await client.search.query("nike", {
  types: "advertisers,deals",
  per_type_limit: 5,
});

// Prebuilt analytics reports
await client.reports.find("top_advertisers_by_sales", {
  period: "last_90_days",
  limit: 10,
});

Production

import { Client, PRODUCTION } from "hi-energy-ai";

const client = new Client({
  apiKey: process.env.HI_ENERGY_API_KEY!,
  baseUrl: PRODUCTION.baseUrl,
  appOrigin: PRODUCTION.appOrigin,
});

Authentication

API key (recommended):

X-Api-Key: YOUR_API_KEY
const client = new Client({ apiKey: "your_integration_key" });

OAuth bearer token:

const client = new Client({ bearerToken: process.env.AUTH0_ACCESS_TOKEN! });

API resources

Every method maps to the API playground:

| Client | HTTP | Use case | |--------|------|----------| | search | GET /api/v1/search | Universal search | | deals | GET /api/v1/deals | List and filter deals | | advertisers | GET /api/v1/advertisers | Advertiser discovery | | advertisers.searchByDomain | GET .../search_by_domain | Lookup by domain | | contacts | GET, POST /api/v1/contacts | Contact search and create | | transactions | GET /api/v1/transactions | Sales and commissions | | clicks | GET /api/v1/clicks | Click reporting (date range required) | | opportunities | GET /api/v1/opportunities | Publisher opportunities | | verticals | GET /api/v1/verticals | Industry categories | | tags | GET /api/v1/tags | Tags and tagged advertisers | | publishers | CRUD /api/v1/publishers | Publisher accounts | | agencies | GET /api/v1/agencies | Agency directory | | networks | GET /api/v1/networks | Affiliate networks | | reports | GET /api/v1/reports | Analytics reports | | users | /api/v1/users | User management | | statusChanges | GET /api/v1/status_changes | Approval history | | deeplinks | POST /api/v1/deeplinks/generate | Tracking links | | domains | GET /api/v1/domains/search | Domain search | | tools | GET /api/v1/tools | MCP tool catalog | | schema | GET /api/v1/schema | OpenAPI download | | exports | /api/v1/exports | Async exports | | mcp | GET, POST /mcp | MCP bootstrap and JSON-RPC |

Pagination

List responses include data and meta (current_page, next_page, per_page, has_more):

for await (const page of client.paginate("/deals", { limit: 50 })) {
  for (const deal of page.data as unknown[]) {
    // process deal
  }
}

Dry run

Validate wiring without live data:

const client = new Client({ apiKey: key, dryRun: true });
await client.deals.list({ active: true });

MCP and AI agents

MCP routes run on the app origin, not under /api/v1:

await client.mcp.bootstrap();
await client.mcp.integration();
await client.mcp.initializeSession();
await client.mcp.call("tools/list");

Error handling

import { HiEnergyError } from "hi-energy-ai";

try {
  await client.advertisers.find(999);
} catch (error) {
  if (error instanceof HiEnergyError) {
    console.error(error.code, error.message, error.requestId, error.status);
  }
}

Contributing

We welcome bug reports, feature requests, and pull requests.


Development

git clone https://github.com/HiEnergyAgency/hi-energy-ai-js.git
cd hi-energy-ai-js
npm install
npm test
npm run build

License

MIT — see LICENSE.

API access requires a Hi Energy Rocket account and API key.