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
npm, PyPI & crates.io Metadata API
Prepare your request, then continue with your agent.
Selected price
$0.00015 / call
- Provider
- Pricing
On this page
Overview
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
- Configure OPENANY_API_KEY securely in your local environment and select TREG.
- The example looks up requests in the pypi ecosystem; set ecosystem explicitly for another registry.
- Check Selected price before running the command; execution sends a real request under the current contract.
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
Playground
Run sends a real API request. Charges follow the published API contract.
Sellers
| Seller | Pricing | Requests · 30d | Performance | Access |
|---|---|---|---|---|
tregCurrent npm, PyPI & crates.io Metadata API · POST · View API reference | $0.00015 / call | 2 | 100.00%successP501.8s |
- 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.
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
Input parameters
Fields in this listing; additional options and input encoding can vary by provider.
| Parameter | Location | Type | Required | Description |
|---|---|---|---|---|
name | JSON request bodybody | string | Yes | |
ecosystem | JSON request bodybody | string | No | default npm enum: "npm", "pypi", "crates" |
Required markers inside a nested object or variant apply when that object or variant is used.
Response structure
metaobjectblockedunknown[]elapsed_msintegerfrom_cachebooleanllm_callsintegerpages_fetchedintegerpartialbooleanwarningsstring[]
recipestringrowsobject[]dependenciesintegerdescriptionstringdownloadsnullecosystemstringhomepagenulllicensestringnamestringpublishedstringrepositorystringurlstringversionstring
usageobjectboxesstring[]cachestringenginestringlinesobject[]aboutstringboxesstring[]cachestringcallstringenginestringunitsinteger
unitsinteger
versioninteger
Agent integration
Copy the resource contract without sharing an API key.
Error handling
| Status | Next step |
|---|---|
400 | Check the offering and request fields. |
401 / 403 | Verify your credentials and access permissions. |
402 | Inspect the selected access mode and returned payment requirements. |
429 | Respect the returned rate limit and retry guidance. |
5xx | Inspect 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.
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 / Linuxprintf 'OpenAny API key: ' read -r -s OPENANY_API_KEY export OPENANY_API_KEY printf '\n'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 · cURLcurl \ '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" }'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 }