{"uid":"cap_BVlCwrnk67zlCCMysWz3C","slug":"package-health-dependency-weight-a57d5bac","name":"Package Health – Dependency Weight","description":"Dependency weight of a package version: direct and transitive dependency counts and a light/moderate/heavy verdict.","url":"https://package-health.x402tookit.com/package-deps?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"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":["system","name"],"properties":{"name":{"type":"string","description":"Package name"},"system":{"type":"string","description":"npm, pypi, go, maven, cargo or nuget"},"version":{"type":"string","description":"Version; default is the registry's default version"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"asOf":{"type":["null","string"]},"name":{"type":["null","string"]},"direct":{"type":["null","number"]},"source":{"type":["null","string"]},"system":{"type":["null","string"]},"reasons":{"type":["array","null"],"items":{"type":"string"}},"summary":{"type":["null","string"]},"verdict":{"type":["null","string"]},"version":{"type":["null","string"]},"degraded":{"type":["boolean","null"]},"sourceUrl":{"type":["null","string"]},"disclaimer":{"type":["null","string"]},"notChecked":{"type":["array","null"],"items":{"type":"string"}},"thresholds":{"type":["null","object"],"properties":{"lightUpTo":{"type":["null","number"]},"moderateUpTo":{"type":["null","number"]}}},"transitive":{"type":["null","number"]},"unresolvedNodes":{"type":["null","number"]},"distinctPackages":{"type":["null","number"]}}}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.02","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.02/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_tih2nEZxs6OYkPaO1rtK2","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.02","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns the direct and transitive dependency counts for a package version and classifies its dependency footprint as light, moderate, or heavy.","exampleAgentPrompt":"Can you check the dependency weight of the npm package 'express' version 4.18.2 — I want to know how many direct and transitive dependencies it has and whether its footprint is considered light, moderate, or heavy?","exampleUseCases":[{"title":"Pre-adoption dependency vetting","prompt":"Before we add 'lodash' version 4.17.21 from npm to our project, can you tell me how many direct and transitive dependencies it drags in and whether it's considered light or heavy?"},{"title":"Comparing Python packages by bloat","prompt":"I'm choosing between a few PyPI packages — can you check the dependency weight of 'requests' on PyPI and tell me if it's light, moderate, or heavy and how many total packages it pulls in?"},{"title":"Auditing a Cargo crate for bloat","prompt":"We're adding a Rust crate called 'tokio' from Cargo to our embedded project and I'm worried about bloat — how many direct and transitive dependencies does its latest version have, and what's the verdict?"}],"resultDescription":"Returns an object with the package name, version, ecosystem, direct dependency count, transitive dependency count, distinct package count, unresolved node count, a light/moderate/heavy verdict, human-readable reasons explaining the verdict, a summary, threshold values used, data source URL, and a timestamp. May include a degraded flag if analysis was incomplete.","failureModes":["Unknown package name returns null or error response","Unsupported ecosystem value causes validation failure","Specific version not found falls back to default or returns null","Dependency graph too large may produce unresolved nodes or degraded result","Network timeout from upstream registry causes degraded or partial data"],"whenToPreferThis":"Use this endpoint when you need a quick, structured assessment of how heavy a package's dependency tree is — especially when evaluating whether to add a new dependency to a project, comparing package alternatives by bloat, or auditing supply-chain surface area. It covers npm, PyPI, Go, Maven, Cargo, and NuGet, making it a multi-ecosystem solution. Prefer it over manual dependency tree inspection or package manager CLI tools when you need a machine-readable verdict in an automated pipeline.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:20:08.399Z","isFirstParty":false,"canonicalSlug":"package-health-dependency-weight-a57d5bac"}