{"uid":"cap_LjjIr0QNpLC7QIKB4_yTM","slug":"ops-control-hq-npm-health-396186cc","name":"Ops Control HQ npm Health","description":"Current npm package health and dependency-risk snapshot","url":"https://tkoqkknsezxavtxfywkm.supabase.co/functions/v1/npm-health-x402-v2?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":["package"],"properties":{"package":{"type":"string","description":"npm package name, for example react or @scope/name"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","required":["package","latestVersion","publishedAt","daysSincePublish","weeklyDownloads","weeklyDownloadsPeriod","maintainers","dependencies","devDependencies","license","deprecated","deprecationMessage","repository","homepage","riskScore","flags","methodology","checkedAt"],"properties":{"flags":{"type":"array","items":{"type":"string"}},"license":{"type":"string"},"package":{"type":"string"},"homepage":{"type":["string","object","null"]},"checkedAt":{"type":"string"},"riskScore":{"type":"integer","maximum":100,"minimum":0},"deprecated":{"type":"boolean"},"repository":{},"maintainers":{"type":"integer"},"methodology":{"type":"string"},"publishedAt":{"type":["string","null"]},"dependencies":{"type":"integer"},"latestVersion":{"type":"string"},"devDependencies":{"type":"integer"},"weeklyDownloads":{"type":"integer"},"daysSincePublish":{"type":["integer","null"]},"deprecationMessage":{"type":["string","null"]},"weeklyDownloadsPeriod":{"type":"object","required":["start","end"],"properties":{"end":{"type":["string","null"]},"start":{"type":["string","null"]}},"additionalProperties":false}}}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.003","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.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_871Ztra0JSBcRlov1H0wi","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns a health and dependency-risk snapshot for a given npm package, including version, downloads, maintainers, license, deprecation status, and a risk score.","exampleAgentPrompt":"Can you pull the current health snapshot for the react npm package — I want to see its latest version, weekly downloads, risk score, and whether it's deprecated?","exampleUseCases":[{"title":"Vetting a new dependency before adopting","prompt":"I'm thinking about adding got to my project — can you check its npm health score, how recently it was published, how many maintainers it has, and whether it's been deprecated?"},{"title":"Monitoring a critical package in CI","prompt":"Before we cut the release, check the npm health of express and flag anything concerning — risk score, days since last publish, or any deprecation notices."},{"title":"Auditing an existing dependency's license","prompt":"What license is lodash published under on npm, and is it still actively maintained? Give me the latest version and weekly download numbers too."}],"resultDescription":"A JSON object containing the package name, latest version, publish date, days since last publish, weekly download count and period, number of maintainers, direct and dev dependency counts, license string, deprecated boolean, deprecation message, repository and homepage URLs, an integer risk score (0–100), an array of risk flags, the scoring methodology description, and the timestamp the check was performed.","failureModes":["Package not found on npm — returns error or empty result","Invalid or malformed package name — request rejected","Scoped package (@scope/name) may require URL encoding","npm registry temporarily unavailable — upstream timeout","Rate limiting or payment failure for the x402 micropayment"],"whenToPreferThis":"Choose this endpoint when you need a quick, single-call health-and-risk snapshot for one npm package without needing full CVE/vulnerability details. It is ideal for dependency vetting, CI gates, or dashboard widgets where you want version freshness, download popularity, maintainer count, license, deprecation status, and a composite risk score in one response. For deeper vulnerability data (OSV advisories with fixed versions), prefer the sibling 'Ops Control HQ npm Dependency Risk Brief' endpoint instead.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-11T00:31:52.898Z","isFirstParty":false,"canonicalSlug":"ops-control-hq-npm-health-396186cc"}