# npm, PyPI & crates.io Metadata API

Get npm, PyPI or crates.io package metadata via REST or OpenAny MCP—with pay-per-use pricing and no subscription. Powered by Treg, pass parameters such as ecosystem, name, and retrieve structured data including registry package name, returned version metadata, repository link, when provided, and publication timestamp to maintain a package inventory, prepare dependency research, and track release metadata.

Documentation: https://openany.si/market/apis/package-registries/get-npm-pypi-or-crates-io-package-metadata/
API ID: 3f2f652e-08c8-44df-8bd3-028ccbd6795d
Provider: treg
Contract revision: 4
Method: POST
Endpoint: https://api.openany.si/v1/agent-apis/treg/call/crawl4ai.packages.package.info
Page update time: 2026-12-03T01:54:37.424Z
Access: OpenAny REST
OpenAny MCP: availability is not supplied by this REST contract. Check get_api on the configured OpenAny MCP server before execution.
Request content type: application/json
Execution mode: sync
Authentication: Authorization: Bearer $OPENANY_API_KEY

## Billing
Price: $0.00015 / call
API-key calls use your shared balance. Review the published billing rules before making a paid request.
Price source: OpenAny public API contract. Price update time: not supplied.
Contract update time: 2026-12-03T01:54:37.424Z. This is not a price-change timestamp.
```json
{
  "currency": "USD",
  "mode": "fixed",
  "priceMicroUsd": "150",
  "rounding": null,
  "unit": "call",
  "unitQuantity": null
}
```

## Request parameters
```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "npm, PyPI & crates.io Metadata API request inputs",
  "$comment": "Declared input types grouped by HTTP location. Path, query and header values describe decoded inputs and are serialized as text on the wire; body is the payload. This is not an exhaustive provider contract or a schema for the raw HTTP request.",
  "type": "object",
  "properties": {
    "path": {
      "type": "object",
      "properties": {}
    },
    "query": {
      "type": "object",
      "properties": {}
    },
    "headers": {
      "type": "object",
      "properties": {}
    },
    "body": {
      "additionalProperties": false,
      "properties": {
        "ecosystem": {
          "description": "default npm",
          "enum": [
            "npm",
            "pypi",
            "crates"
          ],
          "type": "string"
        },
        "name": {
          "description": "",
          "example": "requests",
          "type": "string"
        }
      },
      "required": [
        "name"
      ],
      "type": "object",
      "description": "One row of facts about a package from its registry's public JSON: latest version and when it was published, description, license, homepage, repository, downloads (crates.io only) and the number of dependencies. `ecosystem` is npm, pypi or crates; `name` is the package.\nUsage limits: Supports npm, pypi and crates. Downloads are available for crates.io only. License metadata is not a license-compliance assessment.\nDraft retail price: USD 0.000150/successful call, equal to the TREG catalog rate; no markup."
    }
  },
  "required": [
    "path",
    "query",
    "headers",
    "body"
  ]
}
```

## Response fields
Source: Inferred from examples; not an exhaustive provider schema.
```json
{
  "type": "object",
  "properties": {
    "meta": {
      "type": "object",
      "properties": {
        "blocked": {
          "type": "array",
          "items": {}
        },
        "elapsed_ms": {
          "type": "integer"
        },
        "from_cache": {
          "type": "boolean"
        },
        "llm_calls": {
          "type": "integer"
        },
        "pages_fetched": {
          "type": "integer"
        },
        "partial": {
          "type": "boolean"
        },
        "warnings": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "recipe": {
      "type": "string"
    },
    "rows": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "dependencies": {
            "type": "integer"
          },
          "description": {
            "type": "string"
          },
          "downloads": {
            "type": "null"
          },
          "ecosystem": {
            "type": "string"
          },
          "homepage": {
            "type": "null"
          },
          "license": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "published": {
            "type": "string"
          },
          "repository": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "version": {
            "type": "string"
          }
        }
      }
    },
    "usage": {
      "type": "object",
      "properties": {
        "boxes": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "cache": {
          "type": "string"
        },
        "engine": {
          "type": "string"
        },
        "lines": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "about": {
                "type": "string"
              },
              "boxes": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "cache": {
                "type": "string"
              },
              "call": {
                "type": "string"
              },
              "engine": {
                "type": "string"
              },
              "units": {
                "type": "integer"
              }
            }
          }
        },
        "units": {
          "type": "integer"
        }
      }
    },
    "version": {
      "type": "integer"
    }
  }
}
```

## Request example
Scenario: Third-party reference · Testnet 2026-11-04: success (abridged)
```bash
curl \
  'https://api.openany.si/v1/agent-apis/treg/call/crawl4ai.packages.package.info' \
  -X POST \
  -H "Authorization: Bearer $OPENANY_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "ecosystem": "pypi",
  "name": "requests"
}'
```

## Response example
Historical third-party reference. It may differ from the current provider response; verify the original contract before use.
Third-party response reference · Documented HTTP 200
```json
{
  "meta": {
    "blocked": [],
    "elapsed_ms": 0,
    "from_cache": true,
    "llm_calls": 0,
    "pages_fetched": 0,
    "partial": false,
    "warnings": [
      "module: package-info: pypi requests → \"2.34.2\""
    ]
  },
  "recipe": "package-info",
  "rows": [
    {
      "dependencies": 6,
      "description": "Python HTTP for Humans.",
      "downloads": null,
      "ecosystem": "pypi",
      "homepage": null,
      "license": "Apache-2.0",
      "name": "requests",
      "published": "2026-05-14T19:25:26.443000Z",
      "repository": "https://github.com/psf/requests",
      "url": "https://pypi.org/project/requests/",
      "version": "2.34.2"
    }
  ],
  "usage": {
    "boxes": [
      "gate"
    ],
    "cache": "hit",
    "engine": "recipe",
    "lines": [
      {
        "about": "the call",
        "boxes": [
          "gate"
        ],
        "cache": "miss",
        "call": "recipes",
        "engine": "gate",
        "units": 1
      }
    ],
    "units": 1
  },
  "version": 1
}
```

## Error handling
400: Check the request fields.
401 / 403: Verify credentials and access permissions.
402: Inspect payment requirements and balance.
429: Respect returned retry guidance.
5xx: Inspect the error and usage record before retrying a paid operation.

Integration guide: https://openany.si/docs/
Agent setup: https://openany.si/SKILL.md
