OpenAny
Get API keyAPI Key
APIDeveloperData

package-registries logo
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.

Selected price
$0.00015 / callPublished pricing
Sellers / APIs
1 / 1
Requests · 30d
2Selected implementation · last 30 days
Success rate · 30d
100.00%Selected implementation · last 30 days
USE THIS API

npm, PyPI & crates.io Metadata API

Prepare your request, then continue with your agent.

Selected price

$0.00015 / call

Provider
Pricing
Connect your agent
On this page

Overview

Overview
npm, PyPI & crates.io Metadata API

npm, PyPI & crates.io Metadata API

Send a package name with ecosystem set to npm, pypi or crates. The response contains one metadata row with version, publication, license and repository fields; downloads are available for crates.io.

Quick Facts

Fact Value
Platform package-registries
Access Methods REST / OpenAny MCP
Pricing Model Pay per call; see Selected price
Authentication OpenAny API key
Core Inputs name; optional ecosystem
Selected Implementation TREG
Available Providers TREG
Returned Data Registry package name; Returned version metadata; License metadata, not a compliance verdict; Repository link, when provided; Publication timestamp; Dependency count, not dependency details

What You Can Build with the npm, PyPI & crates.io Metadata API

  • Maintain a package inventory: Resolve registry names to versions and source links.
  • Prepare dependency research: Compare metadata before opening the full repository or registry page.
  • Track release metadata: Save dated snapshots and compare the returned version and publication fields.

Pass returned records to a downstream Agent for organization, comparison or reporting; additional data retrieval is a separate operation.

npm, PyPI & crates.io Metadata API Returned Data Fields & Response Coverage

The result is a package metadata row, not a dependency tree, vulnerability scan or license-compliance decision. downloads is documented for crates.io only; other fields may be null.

Field Meaning
rows[].name Registry package name
rows[].version Returned version metadata
rows[].license License metadata, not a compliance verdict
rows[].repository Repository link, when provided
rows[].published Publication timestamp
rows[].dependencies Dependency count, not dependency details

Quick Start: Call the npm, PyPI & crates.io Metadata API via REST

  1. Configure OPENANY_API_KEY securely in your local environment and select TREG.
  2. The example looks up requests in the pypi ecosystem; set ecosystem explicitly for another registry.
  3. Check Selected price before running the command; execution sends a real request under the current contract.
bash
curl --request POST \
  "https://api.openany.si/v1/agent-apis/treg/call/crawl4ai.packages.package.info" \
  --header "Authorization: Bearer ${OPENANY_API_KEY}" \
  --header 'Content-Type: application/json' \
  --data '{"ecosystem":"pypi","name":"requests"}'

Understanding Response Examples

Example Provenance and scope
Third-party reference · Testnet excerpt Excerpt of a historical third-party testnet response, showing fields and structure.

Use the documented request as a calling template; consult the public API contract and the actual response for fields and status.

Connect AI Agents via OpenAny MCP

Connect to https://mcp.openany.si, discover with search_apis, then read the current contract and api_version with get_api. Use run_api only after approval of inputs, price and call count; keep the key in secure client configuration.

Agent prompt: Look up the requests package in the pypi ecosystem. Inspect the TREG contract and current cost and request execution approval, then return version, source link, license metadata, repository and dependency count while preserving null values.

Pricing & Billing Rules

  • No subscription; check the selected implementation’s contract and Selected price for the current amount and unit.
  • Browsing, preparing inputs and viewing examples do not execute the API; curl and run_api do.
  • Extra pages, retries and chained requests are separate executions; review their billing and spending limit first.

Frequently Asked Questions

View FAQ

Playground

Run sends a real API request. Charges follow the published API contract.

Request parameters
body* object
default npm
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. Usage limits: Supports npm, pypi and crates. Downloads are available for crates.io only. License metadata is not a license-compliance assessment. Draft retail price: USD 0.000150/successful call, equal to the TREG catalog rate; no markup.

Third-party response reference

Run a request to see the actual response. Published samples are in Examples.

Response result

Sellers

SellerPricingRequests · 30dPerformanceAccess
tregCurrent
npm, PyPI & crates.io Metadata API · POST · View API reference
$0.00015 / call2
100.00%successP501.8s
Selected implementation traffic · 11/3/2026 – 12/3/2026 (UTC)
Selected pricing · tregUSD / call
Unit price
$0.00015

Statistics use persisted gateway logs from the last 30 days up to now, including today.
Success rate = successful requests / all requests;
P50 = median latency of successful requests.
Prices reflect the published API contract. Contract revision: 4. Price update time: not supplied.

calls

Total $0.015

API

Method
POST
Endpoint
https://api.openany.si/v1/agent-apis/treg/call/crawl4ai.packages.package.info
Content type
application/json
Authentication
Authorization: Bearer $OPENANY_API_KEY
View request and response examples

Input parameters

Fields in this listing; additional options and input encoding can vary by provider.

ParameterLocationTypeRequiredDescription
nameJSON request bodybodystringYes
ecosystemJSON request bodybodystringNo

default npm

enum: "npm", "pypi", "crates"

Required markers inside a nested object or variant apply when that object or variant is used.

Response structure

Inferred from examples
  • metaobject
    • blockedunknown[]
    • elapsed_msinteger
    • from_cacheboolean
    • llm_callsinteger
    • pages_fetchedinteger
    • partialboolean
    • warningsstring[]
  • recipestring
  • rowsobject[]
    • dependenciesinteger
    • descriptionstring
    • downloadsnull
    • ecosystemstring
    • homepagenull
    • licensestring
    • namestring
    • publishedstring
    • repositorystring
    • urlstring
    • versionstring
  • usageobject
    • boxesstring[]
    • cachestring
    • enginestring
    • linesobject[]
      • aboutstring
      • boxesstring[]
      • cachestring
      • callstring
      • enginestring
      • unitsinteger
    • unitsinteger
  • versioninteger

Agent integration

Copy the resource contract without sharing an API key.

Download MDView API Markdown

Error handling

StatusNext step
400Check the offering and request fields.
401 / 403Verify your credentials and access permissions.
402Inspect the selected access mode and returned payment requirements.
429Respect the returned rate limit and retry guidance.
5xxInspect the error and usage record before retrying a paid operation.

Examples

Third-party reference · Testnet 2026-11-04: success (abridged)

Historical third-party reference. It may differ from the current provider response; verify the original contract before use.

  1. Prepare your environment

    Use a terminal with cURL installed.

    Use an OpenAny API key with shared-balance access. Confirm availability and price before running; a call may charge your balance.

    Set the key in your terminal using the hidden prompt below. Keep its value out of source files and logs.

    Terminal · macOS / Linux
    printf 'OpenAny API key: '
    read -r -s OPENANY_API_KEY
    export OPENANY_API_KEY
    printf '\n'
  2. Run the request

    Paste the complete command below into your terminal.

    Values to replace before running 1

    Review these request fields before running. Keep the published provider and request method unchanged.

    body
    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. Usage limits: Supports npm, pypi and crates. Downloads are available for crates.io only. License metadata is not a license-compliance assessment. Draft retail price: USD 0.000150/successful call, equal to the TREG catalog rate; no markup.
    Terminal · cURL
    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"
    }'
  3. Check the response

    Third-party response reference · Documented HTTP 200

    Third-party response reference
    {
      "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
    }

Common questions

Do I need registry credentials or a subscription?

The published input requires no npm, PyPI or crates.io credentials. Use your OpenAny key with per-call billing and no subscription.

Which ecosystem values are accepted?

npm, pypi and crates. The API uses crates as its input value even though the source service is named crates.io.

Can I retrieve download counts for npm and PyPI too?

Not under this contract. Download coverage is documented for crates.io only, and the PyPI sample has downloads: null.

Is license a legal compatibility decision?

No. It is source metadata. Review the actual license and your intended use separately rather than treating a string as a compliance decision.

Does dependencies contain a complete dependency graph?

No. The documented value is a count, not dependency names, versions or a transitive graph.

Can I ask for an arbitrary historical version?

No version selector is exposed by this wrapper. Do not add native registry version parameters unless a separately published contract supports them.

Use npm, PyPI & crates.io Metadata API with your agent

Inspect endpoint contracts and confirm availability and pricing before a paid call.