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

@x402jobs/sdk

v0.2.2

Published

The official SDK for x402.jobs — trust, discovery, and resource management for x402

Readme

@x402jobs/sdk

The official SDK for x402.jobs — trust, discovery, and resource management for the x402 ecosystem.

Install

npm install @x402jobs/sdk

Quick Start

import { X402Jobs } from '@x402jobs/sdk'

const x402 = new X402Jobs({ apiKey: 'your-api-key' })

Check if a resource is reliable

const score = await x402.check('https://api.example.com/resource')
// {
//   url: "https://api.example.com/resource",
//   success_rate: 0.94,
//   calls: 1240,
//   value_processed: "$12.4k",
//   last_called: "2m ago"
// }

Browse top resources

const top = await x402.check.top({ limit: 20 })

Search resources

const results = await x402.resources.search({
  query: 'image generation',
  minSuccessRate: 0.9
})

Register your resource

await x402.resources.register({
  url: 'https://my-api.com/endpoint',
  name: 'My API',
  price: '$0.01'
})

Why?

You can index x402 endpoints all day. Doesn't mean they work.

x402jobs gives you reliability scores backed by real paid usage — not synthetic pings.

We ran the transactions. We paid the fees. Now you get the data.

API Reference

Constructor

const x402 = new X402Jobs({
  apiKey: 'sk_...',           // API key for authenticated access
  baseUrl: 'https://...',     // Custom API URL (optional)
})

Trust / Verification (x402.check)

| Method | Description | |--------|-------------| | check(url) | Get reliability score for a resource | | check.many(urls) | Check multiple resources | | check.exists(url) | Check if resource is indexed | | check.top(options) | Get top-ranked resources |

Resources (x402.resources)

| Method | Description | |--------|-------------| | resources.list() | Get all resources | | resources.get(url) | Get single resource | | resources.search(options) | Search resources | | resources.register(input) | Register new resource | | resources.update(id, input) | Update resource | | resources.delete(id) | Delete resource |

Error Handling

import { X402Jobs, X402Error } from '@x402jobs/sdk'

const x402 = new X402Jobs({ apiKey: 'sk_...' })

try {
  const score = await x402.check(url)
} catch (err) {
  if (err instanceof X402Error) {
    console.log(err.code)     // Error code
    console.log(err.message)  // Human readable
    console.log(err.status)   // HTTP status
  }
}

Error Codes

| Code | Description | |------|-------------| | NOT_FOUND | Resource not indexed | | PAYMENT_REQUIRED | x402 payment failed | | RATE_LIMITED | Too many requests | | UNAUTHORIZED | Invalid or missing API key | | FORBIDDEN | Not allowed | | VALIDATION_ERROR | Invalid input | | SERVER_ERROR | x402jobs API error |

TypeScript

Full TypeScript support with exported types:

import { X402Jobs } from '@x402jobs/sdk'
import type { Score, Resource, ClientOptions } from '@x402jobs/sdk'

Docs

Full documentation at x402.jobs/docs

License

MIT