# npm Trust Check

> npm Trust Check is a paid API for AI agents from x402-api-catalog.onrender.com, paid per call via x402, $0.02/call, status unknown (last checked 2026-09-15).

Returns a trust/risk score for an npm package based on registry age, weekly downloads, GitHub org/stars, and OSV.dev vulnerability data.

## Facts

- Endpoint: GET https://x402-api-catalog.onrender.com/api/trust-check
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/npm-trust-check-1585d274
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_4Tt0HedeC2-Hnf2vTCfOt

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 npm-trust-check-1585d274
```

Example prompt: Can you check the trust score for the 'lodash' npm package — I want to know if it's safe and well-maintained before I add it as a dependency?

## When to prefer this

Choose this endpoint when you need a quick, composite trust signal for an npm package before adding it as a dependency, auditing an existing dependency, or evaluating open-source supply chain risk. It aggregates multiple signals (registry longevity, community adoption, GitHub credibility, known CVEs) into a single score, saving you from querying npm, GitHub, and OSV.dev separately.

## Known failure modes

- Package not found on npm registry — returns an error or low-confidence score
- No GitHub repo link in npm metadata and no repo override provided — GitHub signals may be missing
- OSV.dev API unavailable — vulnerability data may be incomplete
- Invalid or misspelled package name — returns error
- Rate limiting or upstream timeouts from GitHub or OSV.dev

## How this service works

npm package trust check / risk score / security audit: registry age, weekly downloads, GitHub org/stars, OSV.dev vulnerabilities, typosquat detection.

## Output

Returns a trust score (numeric), a verdict string (e.g. trusted, risky, unknown), and the package name. Underlying data draws from npm registry age, weekly download counts, GitHub organization and star count, and known OSV.dev vulnerability records.

## 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",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "package"
     ],
     "properties": {
      "repo": {
       "type": "string",
       "description": "owner/repo override if npm metadata lacks a repo link"
      },
      "package": {
       "type": "string",
       "description": "npm package name to check"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "score": {
       "type": "number"
      },
      "package": {
       "type": "string"
      },
      "verdict": {
       "type": "string"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "score": 72,
  "package": "left-pad",
  "reasons": [],
  "signals": {},
  "verdict": "trustworthy"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/npm-trust-check-1585d274/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-api-catalog.onrender.com](https://www.zero.xyz/host/x402-api-catalog.onrender.com/llms.txt)
