# Package Metadata: npm and PyPI versions, licenses, dependencies (`examsens.ai/package-metadata`) Actor

Fetches npm and PyPI package metadata from the official registries: latest version, license, versions with release dates, dependencies, repository and homepage, npm download counts and PyPI vulnerability advisories. No maintainer or author contact data.

- **URL**: https://apify.com/examsens.ai/package-metadata.md
- **Developed by:** [Ed Rayyis](https://apify.com/examsens.ai) (community)
- **Categories:** Developer tools
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.90 / 1,000 package fetcheds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Package Metadata: npm and PyPI versions, licenses, dependencies

Give it a list of npm packages and PyPI projects and get one clean row per package from the official registries: what the latest version is, its license, when it was published, what it depends on, and how it has been released over time. Useful for license audits, dependency reviews, release tracking and ecosystem research.

For each package you get:

- Latest version, description, license, homepage, repository link and keywords
- First release date, last publish date and number of versions
- Versions with their release dates, newest first (npm deprecation notes and PyPI yanked flags included)
- Dependencies of the latest version: npm runtime, peer and optional dependencies, the number of dev dependencies and supported engines; PyPI required packages, optional extras and the supported Python versions
- npm: dist tags, deprecation notice, module type, whether types ship with the package, unpacked size, and downloads for the last week and last month
- PyPI: classifiers, project links, yanked state, and the known vulnerabilities PyPI lists for the latest release, with their ids, aliases, and the versions that fix them

### Input

- npm packages: names such as `react`, scoped names such as `@types/node`.
- PyPI projects: names such as `requests` or `Django`.
- Version history on or off (on by default), and how many of the newest versions to list (default 50).
- npm download counts on or off (on by default). PyPI publishes no download counts, so there are none for PyPI projects.

### Output

One dataset item per package, with `ecosystem`, `input`, `name`, `latestVersion`, `description`, `license`, `homepage`, `repository`, `keywords`, `created`, `lastPublished`, `versionCount`, `versions` and `dependencies`, plus the npm or PyPI fields listed above. A name that is not valid for its registry, or a package the registry does not hold, gives an item with `error`. A package named twice is fetched once.

Maintainer, author and owner details are never collected. Only the package and project facts are kept.

### Sources

- npm: the public registry at registry.npmjs.org and npm's download counts API at api.npmjs.org. npm's terms allow copying data from the public registry through its public APIs.
- PyPI: the JSON API for project details and vulnerabilities, and the Index API for versions and upload times, as PyPI's documentation recommends.

Requests go one at a time with a short gap. The actor is not affiliated with or endorsed by npm, GitHub or the Python Software Foundation.

### Pricing

Pay per event: one `package-fetched` event per package returned. Errors are not charged. The run stops when it reaches the maximum charge you set.

### Support

Questions and problems: the Issues tab on this page. Replies are written by an AI assistant on behalf of the developer and reviewed by the developer.

# Actor input Schema

## `npmPackages` (type: `array`):

npm package names, scoped names included, such as react or @types/node.

## `pypiPackages` (type: `array`):

PyPI project names, such as requests or django.

## `includeVersions` (type: `boolean`):

Include the versions with their release dates, newest first.

## `maxVersions` (type: `integer`):

How many of the newest versions to list.

## `includeDownloads` (type: `boolean`):

Include last week and last month downloads for npm packages. PyPI publishes no download counts.

## Actor input object example

```json
{
  "npmPackages": [
    "react",
    "@types/node"
  ],
  "pypiPackages": [
    "requests"
  ],
  "includeVersions": true,
  "maxVersions": 50,
  "includeDownloads": true
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "npmPackages": [
        "react",
        "@types/node"
    ],
    "pypiPackages": [
        "requests"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("examsens.ai/package-metadata").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "npmPackages": [
        "react",
        "@types/node",
    ],
    "pypiPackages": ["requests"],
}

# Run the Actor and wait for it to finish
run = client.actor("examsens.ai/package-metadata").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "npmPackages": [
    "react",
    "@types/node"
  ],
  "pypiPackages": [
    "requests"
  ]
}' |
apify call examsens.ai/package-metadata --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,examsens.ai/package-metadata"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/e8iyU3BXuFJNY6ndh/builds/DodVmVaQKgoG5q5Pd/openapi.json
