# Datakoot Package Dependencies Lookup

> Datakoot Package Dependencies Lookup is a paid API for AI agents from x402.datakoot.com, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-11).

Returns the direct dependencies (and dependency counts) for a given package version in npm, PyPI, or Cargo registries.

## Facts

- Endpoint: POST https://x402.datakoot.com/api/package_dependencies?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-11
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/datakoot-package-dependencies-lookup-6c945c1f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap__ZUU-1ZJHs32OsV-70LCH

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 datakoot-package-dependencies-lookup-6c945c1f -d '<json body>'
```

Example prompt: What are the direct dependencies of the serde cargo crate version 1.0.229? Include which ones are optional and what version ranges they require.

## When to prefer this

Use this endpoint when you need structured, machine-readable dependency data for a specific package across npm, PyPI, or Cargo registries — especially when you want direct dependency counts broken down by type (required, optional, dev, build). Prefer this over scraping registry websites or using language-specific CLI tools when you need a uniform API across ecosystems. The per-call x402 micropayment model means no API key setup is required.

## Known failure modes

- Package not found in the specified registry — returns error or empty result
- Invalid ecosystem value (not npm, pypi, or cargo) — validation error
- Specified version does not exist — version not found error
- Malformed package name — registry lookup failure
- Network or upstream registry timeout — service unavailable error
- Payment failure via x402 — call not charged, no result returned

## How this service works

48 live public-data tools (security, packages, SEC filings, economy, FX, weather, domains, Federal Register, Base) for AI agents. $0.002 USDC per call on Base via x402, charged only on success. The same tools are free for 100 calls/day via MCP at <server>.datakoot.com/mcp.

## Output

A JSON object with the package name, resolved version, ecosystem, a list of direct dependencies (each with name, optional flag, and version requirement string), and counts for direct, required, dev, and build dependencies.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "name": {
   "type": "string",
   "description": "Exact package name as published in that registry, e.g. express for npm, requests for pypi, serde for cargo."
  },
  "version": {
   "type": "string",
   "description": "Optional; defaults to the latest/default version"
  },
  "ecosystem": {
   "enum": [
    "npm",
    "pypi",
    "cargo"
   ],
   "type": "string",
   "description": "Package registry to look in. One of: npm, pypi, cargo."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "name": "serde",
  "version": "1.0.229",
  "ecosystem": "cargo",
  "direct_dependencies": [
   {
    "name": "serde_core",
    "optional": false,
    "requirement": "=1.0.229"
   },
   {
    "name": "serde_derive",
    "optional": true,
    "requirement": "^1"
   }
  ],
  "dev_dependency_count": 0,
  "build_dependency_count": 0,
  "direct_dependency_count": 2,
  "required_dependency_count": 1
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/datakoot-package-dependencies-lookup-6c945c1f/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.datakoot.com](https://www.zero.xyz/host/x402.datakoot.com/llms.txt)
