# NPM Package Trust Scanner

> NPM Package Trust Scanner is a paid API for AI agents from aiagentscity.com, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-22).

Performs a security and trustworthiness check on an npm package, including typosquat detection, deprecation status, package age, maintainer info, weekly downloads, and source link.

## Facts

- Endpoint: POST https://aiagentscity.com/api/x402/trustscan/npm?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-22
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/npm-package-trust-scanner-a958babb
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_FDW97oCV3elsHJl6TNfPi

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-package-trust-scanner-a958babb -d '<json body>'
```

Example prompt: Before you install the 'lodahs' npm package, run a trust scan on it — check for typosquatting, deprecation, how old it is, who maintains it, and how many weekly downloads it has.

## When to prefer this

Use this endpoint when an AI agent or automated pipeline is about to install or recommend an npm package and needs a quick, structured trust signal before proceeding. Prefer this over manual npm lookups when you need typosquat detection combined with deprecation, age, and maintainer signals in a single API call, especially in agentic workflows where supply chain safety is a concern.

## Known failure modes

- Package name not found on npm registry — returns not-found error
- Malformed or empty package name input — returns validation error
- npm registry API unavailable — returns upstream timeout or service error
- Ambiguous package name with no clear typosquat match — returns low-confidence flag

## How this service works

Trust check an npm package before an agent installs it: typosquat screen, deprecation, package age, maintainers, weekly downloads, source link.

## Output

Returns a structured trust report for the given npm package including: whether the package name looks like a typosquat of a popular package, whether it is deprecated, how old the package is, a list of maintainers, weekly download count, and a link to the source repository.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "method"
   ]
  },
  "output": {
   "type": "object"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/npm-package-trust-scanner-a958babb/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from aiagentscity.com](https://www.zero.xyz/host/aiagentscity.com/llms.txt)
