# 1gateway Package Health Check

> 1gateway Package Health Check is a paid API for AI agents from 1gateway.dev, paid per call via x402, $0.01/call, status unknown (last checked 2026-11-13).

Checks a package from npm, PyPI, or crates.io for health signals including deprecation, vulnerabilities, license issues, and staleness

## Facts

- Endpoint: GET https://1gateway.dev/v1/dev/package?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/1gateway-package-health-check-75824eb3
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_ROX0murFHSboIMTUIBSAJ

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 1gateway-package-health-check-75824eb3
```

Example prompt: Before I add it to my project, can you check whether the npm package 'request' is deprecated, vulnerable, or missing a license — and tell me the latest version and how many maintainers it has?

## When to prefer this

Use this endpoint when an AI agent needs to make a go/no-go decision about adding or upgrading a dependency in npm, PyPI, or crates.io. It aggregates deprecation, vulnerability (OSV), license, staleness, and popularity signals in a single call. Prefer it over raw registry APIs (npmjs.com, PyPI JSON API) because it normalizes data across ecosystems and surfaces actionable risk flags in one structured response. It's especially useful in CI pipelines, PR review bots, or interactive coding assistants that need a quick health verdict on a package.

## Known failure modes

- Unknown package name returns 404 and no charge
- Unknown/nonexistent version returns 404 and no charge
- Unsupported ecosystem returns validation error
- Registry API unavailability may cause timeout or 503
- Scoped npm packages (@scope/name) must be URL-encoded properly

## How this service works

Use when an agent must decide whether to add or keep a dependency. Input: package, ecosystem (npm, PyPI, crates.io), optional version (default latest). Output: JSON flags (deprecated, yanked, outdated, vulnerable, no_license, no_release_2y), latest version, license, publish dates, maintainer count, downloads, repository, OSV advisories. Example: ?package=request&ecosystem=npm

## Output

A JSON object containing: a boolean 'ok' field, an array of risk flag strings (deprecated, yanked, outdated, vulnerable, no_license, no_release_2y), package metadata (name, version, ecosystem), registry details (latest version, license, homepage, repository, publish dates, download counts, maintainer count, versions count, days since latest release, yanked/deprecated status), and a vulnerabilities object with OSV advisory data.

## 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": [
      "package",
      "ecosystem"
     ],
     "properties": {
      "package": {
       "type": "string",
       "maxLength": 214,
       "description": "Package name as in its registry (npm scopes allowed: @scope/name)"
      },
      "version": {
       "type": "string",
       "maxLength": 64,
       "description": "Exact released version (default: latest); unknown version → 404, not charged"
      },
      "ecosystem": {
       "enum": [
        "npm",
        "PyPI",
        "crates.io"
       ],
       "type": "string",
       "description": "Registry (case-insensitive; pip/python, cargo/rust also accepted)"
      }
     },
     "additionalProperties": false
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "package",
      "ok",
      "flags",
      "registry",
      "vulnerabilities",
      "attribution"
     ],
     "properties": {
      "ok": {
       "type": "boolean"
      },
      "flags": {
       "type": "array",
       "items": {
        "type": "string"
       }
      },
      "package": {
       "type": "object",
       "properties": {
        "name": {
         "type": "string"
        },
        "version": {
         "type": "string"
        },
        "ecosystem": {
         "type": "string"
        },
        "requested": {
         "type": "string"
        }
       },
       "additionalProperties": true
      },
      "registry": {
       "type": "object",
       "properties": {
        "license": {
         "type": "string"
        },
        "isLatest": {
         "type": "boolean"
        },
        "publishedAt": {
         "type": "string"
        },
        "latestVersion": {
         "type": "string"
        },
        "latestPublishedAt": {
         "type": "string"
        },
        "daysSinceLatestRelease": {
         "type": "integer"
        }
       },
       "additionalProperties": true
      },
 
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/1gateway-package-health-check-75824eb3/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from 1gateway.dev](https://www.zero.xyz/host/1gateway.dev/llms.txt)
