# Package Intelligence API (npm / PyPI / crates)

> Package Intelligence API (npm / PyPI / crates) is a paid API for AI agents from api.agentstools.dev, paid per call via x402, $0.005/call, status unknown (last checked 2026-10-10).

Returns version, age, release cadence, deprecation/yank status, license, and download stats with trend for a package on npm, PyPI, or crates.io

## Facts

- Endpoint: GET https://api.agentstools.dev/dev/package?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-10
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/package-intelligence-api-npm-pypi-crates-2b10ac66
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_yY4r35axI6X0jaAZ-oUY-

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 package-intelligence-api-npm-pypi-crates-2b10ac66
```

Example prompt: What's the latest version of the 'axios' npm package, is it deprecated, and is its download trend rising or falling over the last month?

## When to prefer this

Use this endpoint when you need a fast, aggregated snapshot of a package's health and popularity across npm, PyPI, or crates.io — especially when you want version, deprecation, license, and download trend data in a single call without hitting multiple registry APIs yourself. Prefer this over manual registry lookups when building dependency auditing tools, security scanners, or developer dashboards.

## Known failure modes

- Package not found in the specified ecosystem returns a 404 or empty result
- Misspelled package name returns no data
- Ecosystem alias mismatch (e.g. using 'pip' when 'pypi' is required) causes a validation error
- Download stats may lag real-time by 24–48 hours
- Rate limiting or payment failure returns a 402 or 429 error

## How this service works

Package intelligence across npm / PyPI / crates: latest version, age, release cadence, deprecation/yank, license, and download stats (last day/week/month) with a rising/falling trend. Aggregates the official registry + downloads API + deps.dev.

## Output

A structured object containing the latest version, package age, release cadence (time between releases), deprecation or yank flag, SPDX license string, and download counts for the last day, week, and month along with a rising/falling trend indicator — aggregated from the official registry, downloads API, and deps.dev.

## 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",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "ecosystem",
      "name"
     ],
     "properties": {
      "name": {
       "type": "string",
       "description": "Package name (npm scoped @scope/name allowed)"
      },
      "ecosystem": {
       "enum": [
        "npm",
        "pypi",
        "crates"
       ],
       "type": "string",
       "description": "Package ecosystem (aliases: pip/python, cargo/rust, node)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/package-intelligence-api-npm-pypi-crates-2b10ac66/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.agentstools.dev](https://www.zero.xyz/host/api.agentstools.dev/llms.txt)
