# Forest Gas Station – npm/PyPI Package Preflight

> Forest Gas Station – npm/PyPI Package Preflight is a paid API for AI agents from http--forest-gas-station-mainnet--lcjl27p8lmjs.code.run, paid per call via x402, $0.002/call, status unknown (last checked 2026-09-29).

Validates and normalizes metadata for a specific npm or PyPI package (and optional version), returning existence, version resolution, staleness, deprecation/yank state, license, and runtime requirements.

## Facts

- Endpoint: POST https://http--forest-gas-station-mainnet--lcjl27p8lmjs.code.run/package/preflight?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-29
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/forest-gas-station-npm-pypi-package-preflight-56fe2659
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_hJfRcmrAVTW0NrIC7Ldde

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 forest-gas-station-npm-pypi-package-preflight-56fe2659 -d '<json body>'
```

Example prompt: Can you check whether the npm package 'lodash' at version '4.17.21' actually exists on the public registry, and tell me if it's deprecated, what license it uses, and whether there's a newer version available?

## When to prefer this

Use this endpoint when you need a fast, normalized sanity check on a single npm or PyPI package — confirming it exists, whether a specific version is valid or yanked, its current license, and runtime requirements — without needing dependency graph traversal, vulnerability scanning, or private registry access. It is ideal for preflight checks before adding a dependency, auditing a lock file entry, or verifying freshness of a pinned version.

## Known failure modes

- Package not found on the specified registry — existence flag is false, other fields are null
- Version not found — package exists but the specified version does not
- Ecosystem not supported or field is missing — request rejected with validation error
- Registry API timeout or upstream unavailability — may return an error or partial null fields
- Malformed package name or version string exceeding length limits — validation error

## How this service works

Normalize npm or PyPI package reality: existence, requested-version existence, resolved/latest version, staleness, deprecation/yank state when available, license and runtime requirement. No dependency graph or vulnerability analysis. Public registries only; unsupported provider fields are null. Base mainnet USDC

## Output

Returns a normalized object indicating whether the package exists on the registry, whether the requested version exists and/or resolves to a specific version, the latest available version, whether the package or version is deprecated or yanked, its license identifier, and any runtime requirement (e.g. Python version or Node engine). Fields for unsupported registries or unavailable metadata are null. No dependency graph or vulnerability data is included.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "package": {
   "type": "string",
   "maxLength": 214,
   "minLength": 1,
   "description": "Public package name to inspect."
  },
  "version": {
   "type": "string",
   "maxLength": 128,
   "minLength": 1,
   "description": "Package version whose public metadata should be checked."
  },
  "ecosystem": {
   "enum": [
    "npm",
    "pypi"
   ],
   "description": "Public ecosystem value used to scope this lookup."
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/forest-gas-station-npm-pypi-package-preflight-56fe2659/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from http--forest-gas-station-mainnet--lcjl27p8lmjs.code.run](https://www.zero.xyz/host/http--forest-gas-station-mainnet--lcjl27p8lmjs.code.run/llms.txt)
