# ScrapeMole Pkgs – npm Package Metadata Lookup

> ScrapeMole Pkgs – npm Package Metadata Lookup is a paid API for AI agents from pkgs.scrapemole.workers.dev, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-30).

Fetches structured metadata for a named npm package, including latest version, download counts, license, maintainers, and repository info.

## Facts

- Endpoint: GET https://pkgs.scrapemole.workers.dev/v1/npm/package?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-30
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/scrapemole-pkgs-npm-package-metadata-lookup-12cf6abf
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_KoPM7uhMOxvB6hWmTYkvL

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability scrapemole-pkgs-npm-package-metadata-lookup-12cf6abf
```

Example prompt: Look up the npm package metadata for lodash — I want to know its latest version, weekly download count, license, and who maintains it.

## When to prefer this

Use this endpoint when an AI agent needs quick, structured npm package metadata (version, downloads, license, maintainers) without setting up npm registry authentication or scraping. Prefer it over raw npm registry calls when you need consistent, cleaned output with emails and tokens stripped, pay-per-call pricing with no account setup, and USDC micro-payment via x402.

## Known failure modes

- Package not found — returns an error if the package name does not exist on npm
- Scoped package name malformed — missing @ or / may cause lookup failure
- Rate or payment failure — x402 payment not verified, request rejected before work begins
- Transient registry unavailability — upstream npm registry timeout causes error response

## How this service works

Pay-per-call package registry lookups: npm package metadata, version details, search, and download counts; PyPI project metadata, releases, and name lookup. Public registry data only (no auth, no private packages, no scraping of user profiles). Emails and tokens are stripped. USDC via x402, no accounts.

Payments: x402 v2, scheme "exact", USDC on Base (eip155:8453). The payment is verified before the work and settled only when the response is 200. Terms: https://pkgs.scrapemole.workers.dev/terms

## Output

Returns a JSON object with the package name, latest version string, total version count, license identifier, homepage URL, repository type and URL, list of maintainer usernames, associated keywords, ISO timestamps for creation and last modification, weekly download count, and a link to the source registry entry.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "name"
     ],
     "properties": {
      "name": {
       "type": "string",
       "examples": [
        "lodash"
       ],
       "description": "npm package name, optionally scoped (@scope/name)."
      }
     },
     "additionalProperties": false
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "name": "lodash",
  "times": {
   "latest": "2026-…",
   "created": "2012-04-23T…",
   "modified": "2026-…"
  },
  "latest": "4.18.1",
  "source": "https://registry.npmjs.org/lodash",
  "license": "MIT",
  "homepage": "https://lodash.com/",
  "keywords": [
   "modules",
   "stdlib",
   "util"
  ],
  "repository": {
   "url": "git+https://github.com/lodash/lodash.git",
   "type": "git"
  },
  "description": "Lodash modular utilities.",
  "maintainers": [
   "jdalton"
  ],
  "versionCount": 117,
  "downloadsLastWeek": 163000000
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/scrapemole-pkgs-npm-package-metadata-lookup-12cf6abf/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from pkgs.scrapemole.workers.dev](https://www.zero.xyz/host/pkgs.scrapemole.workers.dev/llms.txt)
