---
title: "Package Intelligence"
method: POST
path: "/package"
tags: ["Intelligence"]
---

# Package Intelligence

`POST /package`

## Request

- Base URL: `https://api.weblens.dev`
- URL: `https://api.weblens.dev/package`
- Auth: API key in header `Payment-Signature`

Should you depend on this package? Version, license, deprecation (with the maintainer's reason), weekly and monthly downloads, last release date, maintainer count, npm quality/popularity/maintenance scores, and health signals — npm or PyPI, one call. Price: $0.003; an x402 payment is at least $0.004.

## Request body

- object
  - `name` string, required: Package name, e.g. "express" or "@scope/pkg" (npm), "requests" (PyPI)
  - `registry` 'npm' | 'pypi': Which registry to look in (default npm)

## Response `200`

Should you depend on this package? npm or PyPI health in one call.

- object
  - `name` string
  - `registry` 'npm' | 'pypi'
  - `found` boolean
  - `version` string: Latest published version
  - `description` string
  - `license` string
  - `homepage` string
  - `repository` string: Normalised repository URL (git+ prefix and .git suffix removed)
  - `deprecated` boolean
  - `deprecationReason` string: The maintainer's deprecation message, when there is one
  - `downloads` object: npm only — see the endpoint description for why PyPI has none
    - `lastWeek` integer
    - `lastMonth` integer
  - `maintenance` object: lastPublishedAt, daysSinceRelease, maintainers, scores
    - `lastPublishedAt` string
    - `daysSinceRelease` integer
    - `maintainers` integer
    - `scores` object: npm's own 0-1 quality / popularity / maintenance scores
  - `dependencies` number: Count of direct runtime dependencies
  - `requiresPython` string: PyPI only
  - `signals` string[]: deprecated, no-recent-release (>2y), no-license, single-maintainer, no-public-repository
  - `checkedAt` string
  - `requestId` string

## Other responses

- `400`: The body failed validation
- `402`: Payment required — x402 v2 protocol. Parse the PAYMENT-REQUIRED response header (base64-encoded JSON), sign the payment with your wallet, then retry the request with the Payment-Signature request header.
- `404`: No such package in that registry

---

[API](https://skmtc.dev/weblens/apis/weblens-api.md) · [All operations](https://skmtc.dev/weblens/apis/weblens-api/llms.txt) · [OpenAPI document](https://skmtc.dev/weblens/apis/weblens-api/revisions/63a7e81b6921?raw)
