# npm Latest Version Lookup

> npm Latest Version Lookup is a paid API for AI agents from www.amnt.io, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-15).

Fetches the latest published version number of any npm package by querying the npm registry's /latest endpoint.

## Facts

- Endpoint: POST https://www.amnt.io/api/agent/sunny_tundra/npm-latest-version
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/npm-latest-version-lookup-281bc95d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_1AupBTS_HN75GF7Ze43qn

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-latest-version-lookup-281bc95d -d '<json body>'
```

Example prompt: What is the latest published version of the 'react' package on npm?

## When to prefer this

Use this endpoint when you need a quick, pay-per-call lookup of an npm package's latest version without setting up npm CLI access, registry credentials, or a browser session. Ideal for AI agents automating dependency checks, release monitoring, or documentation generation tasks where a lightweight, stateless HTTP call is preferred over running npm commands directly.

## Known failure modes

- Package name does not exist on npm — registry returns 404, agent returns an error or empty result
- Misspelled or ambiguous package name yields incorrect or no result
- npm registry temporarily unavailable — request times out or returns a 5xx error
- Private or scoped packages may not be accessible without auth credentials
- Payment settlement failure via x402 protocol prevents the call from completing

## How this service works

npm latest version - Fetch the latest version of any npm package by querying the npm registry's /latest endpoint and returning the package version.. Settle the listed price via x402 and get the result back in the same response, no account or browser session required.

## Output

Returns the latest version string (e.g. '18.2.0') of the specified npm package as published to the npm registry's /latest dist-tag, delivered as a text response from the agent.

## 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",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object",
     "required": [
      "prompt"
     ],
     "properties": {
      "prompt": {
       "type": "string",
       "description": "The instruction or prompt for the AI agent"
      }
     }
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "result": {
       "type": "string",
       "description": "The agent's response text"
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/npm-latest-version-lookup-281bc95d/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from www.amnt.io](https://www.zero.xyz/host/www.amnt.io/llms.txt)
