# npm & PyPI Package Stats & OSV CVE Scraper (`immortal_swale/oss-ecosystem-intelligence`) Actor

Track npm and PyPI package adoption, download velocity, release freshness, license risk, and live Google OSV CVE/GHSA vulnerabilities with health scoring and cross-ecosystem comparison reports. Zero proxies, MCP-ready.

- **URL**: https://apify.com/immortal_swale/oss-ecosystem-intelligence.md
- **Developed by:** [DataPulse Studio](https://apify.com/immortal_swale) (community)
- **Categories:** Developer tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 enriched oss packages

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

## npm & PyPI Package Adoption, Velocity & CVE Intelligence

Track **open-source package adoption, download acceleration, release freshness, license compliance, and live CVE/GHSA vulnerabilities** across **npm and PyPI** in a single normalized schema—powered directly by official public APIs (**zero proxies, fast execution, MCP-ready**).

Built by **DataPulse Studio** for **VCs, DevTools teams, AppSec / Supply-Chain Engineers, and Autonomous AI Agents**.

### Why Teams & AI Agents Use This Actor

| Capability | Manual Registry Checks | OSS Ecosystem Intelligence |
|---|---|---|
| Cross-ecosystem tracking | Separate npm & PyPI scripts | **Unified normalized schema (`npm` + `pypi`)** |
| Adoption velocity | Raw counts only | **`weeklyGrowthRatio` (`(7d × 4.28) / 30d`)** to spot breakout momentum |
| Security & CVE risk | Separate advisories lookup | **Live Google OSV (`api.osv.dev`)** open CVE/GHSA counts & severities |
| License diligence | Unstructured metadata | **Normalized `licenseCategory`** (`permissive`, `copyleft`, `proprietary_or_unknown`) |
| Decision triage | Manual spreadsheets | **`healthScore` (0–100) + `riskLevel` (`low`, `medium`, `high`, `critical`)** |
| Executive comparison | Custom scripts | **Automatic `ECOSYSTEM_REPORT`** (leaders, fastest accelerating, highest risk, stale deps) |

### High-Value Use Cases

- **Venture Capital & Market Intelligence**: Benchmark developer adoption and week-over-week acceleration across competing AI, data, and infrastructure SDKs (`openai` vs. `anthropic` vs. `langchain` vs. `ai`).
- **DevTools & Product Growth**: Monitor your SDK's 7d/30d download trajectory, release cadence, and ecosystem health against alternatives on a weekly schedule.
- **AppSec & Dependency Risk Triage**: Audit critical npm and Python dependencies for active OSV CVE/GHSA vulnerabilities, copyleft license exposure, and stale/unmaintained packages (`daysSinceLastRelease > 180`).
- **AI Agents & MCP Workflows**: Give coding, diligence, or security agents instant live registry + CVE intelligence without brittle scraping or proxy costs.

### Data Sources (100% Official Public APIs)

- **npm Registry & Downloads API**: `registry.npmjs.org` + `api.npmjs.org/downloads/point/last-week` & `last-month`
- **PyPI JSON API & PyPI Stats**: `pypi.org/pypi/{pkg}/json` + `pypistats.org/api/packages/{pkg}/recent` (with graceful fallback if rate-limited)
- **Google OSV Vulnerability Database**: `api.osv.dev/v1/query` for fast, authoritative CVE & GHSA advisory checks against the latest version

### Example Input

```json
{
  "npmPackages": ["openai", "langchain", "ai"],
  "pypiPackages": ["fastapi", "pydantic", "anthropic"],
  "checkVulnerabilities": true,
  "includeComparisonReport": true
}
```

### Example Output (Dataset Item)

```json
{
  "ecosystem": "npm",
  "packageName": "openai",
  "latestVersion": "4.77.0",
  "downloadsLastWeek": 4250000,
  "downloadsLastMonth": 15800000,
  "weeklyGrowthRatio": 1.151,
  "downloadsSource": "npmjs",
  "license": "Apache-2.0",
  "licenseCategory": "permissive",
  "releaseCount": 245,
  "lastReleaseAt": "2026-11-18T19:42:10.000Z",
  "daysSinceLastRelease": 4,
  "maintainerCount": 5,
  "dependenciesCount": 4,
  "openVulnerabilityCount": 0,
  "criticalVulnerabilityCount": 0,
  "highVulnerabilityCount": 0,
  "latestAdvisoryIds": [],
  "healthScore": 100,
  "riskLevel": "low",
  "packageUrl": "https://www.npmjs.com/package/openai"
}
```

When `includeComparisonReport` is enabled, a full cross-ecosystem summary is saved to the Key-Value Store under **`ECOSYSTEM_REPORT`**, including `leaderByDownloads`, `fastestAccelerating`, `highestSecurityRisk`, `stalePackages`, and `ecosystemComparison`.

### Pricing (Pay-Per-Event)

Transparent usage-based pricing with zero proxy overhead:

| Event | Description | Price (USD) |
|---|---|---|
| **Actor Start (`apify-actor-start`)** | Base initialization fee per run | `$0.005` |
| **Enriched Package (`apify-default-dataset-item`)** | Per npm or PyPI package analyzed (`$2.00` per 1,000 packages) | `$0.002` |
| **Ecosystem Comparison Report (`ecosystem-report`)** | Aggregated `ECOSYSTEM_REPORT` saved to Key-Value Store | `$0.015` |

### Use with AI Agents (MCP)

Connect this Actor directly to **Claude Desktop, Cursor, Windsurf, or custom MCP clients** via the Apify MCP Server:

```json
{
  "mcpServers": {
    "apify": {
      "command": "npx",
      "args": ["-y", "@apify/actors-mcp-server", "--actors", "oss-ecosystem-intelligence"],
      "env": {
        "APIFY_TOKEN": "YOUR_APIFY_TOKEN"
      }
    }
  }
}
```

Example agent prompt:

> *"Compare download velocity, release freshness, license risk, and open OSV CVEs across `openai`, `langchain`, and `ai` on npm plus `fastapi`, `pydantic`, and `anthropic` on PyPI, and summarize which SDK is accelerating fastest."*

### More Actors by DataPulse Studio

Explore the full **DataPulse Studio** intelligence suite on Apify Store:

- **[App Store & Google Play Review Intelligence](https://apify.com/store?search=app-review-intelligence)** — Multi-country mobile review extraction with sentiment, issue tagging, churn risk, and version regression alerts.
- **[Google News & RSS Intelligence Monitor](https://apify.com/store?search=news-intelligence-monitor)** — Zero-proxy multi-region news aggregation with wire deduplication and 9 business event catalyst signals.
- **[Prediction Market Intelligence (Polymarket + Kalshi + Manifold)](https://apify.com/store?search=prediction-market-intelligence)** — Unified live prediction market odds, spreads, liquidity, and cross-exchange divergence alerts.

# Actor input Schema

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

List of npm package names to analyze (supports scoped packages such as @modelcontextprotocol/sdk).

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

List of Python (PyPI) package names to analyze for adoption, release velocity, and vulnerabilities.

## `checkVulnerabilities` (type: `boolean`):

Query the Google OSV Vulnerability Database (api.osv.dev) for known CVE and GHSA advisories affecting the latest release.

## `includeComparisonReport` (type: `boolean`):

Save a cross-ecosystem comparison report (ECOSYSTEM_REPORT) to the Key-Value Store highlighting download leaders, fastest accelerating packages, highest security risks, and stale dependencies.

## Actor input object example

```json
{
  "npmPackages": [
    "openai",
    "langchain",
    "ai"
  ],
  "pypiPackages": [
    "fastapi",
    "pydantic",
    "anthropic"
  ],
  "checkVulnerabilities": true,
  "includeComparisonReport": true
}
```

# Actor output Schema

## `dataset` (type: `string`):

No description

## `ecosystemReport` (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": [
        "openai",
        "langchain",
        "ai"
    ],
    "pypiPackages": [
        "fastapi",
        "pydantic",
        "anthropic"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("immortal_swale/oss-ecosystem-intelligence").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": [
        "openai",
        "langchain",
        "ai",
    ],
    "pypiPackages": [
        "fastapi",
        "pydantic",
        "anthropic",
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("immortal_swale/oss-ecosystem-intelligence").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": [
    "openai",
    "langchain",
    "ai"
  ],
  "pypiPackages": [
    "fastapi",
    "pydantic",
    "anthropic"
  ]
}' |
apify call immortal_swale/oss-ecosystem-intelligence --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,immortal_swale/oss-ecosystem-intelligence"
        }
    }
}
```

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/lt41PbZRfvtWOoW0C/builds/MrbLk2VKMqzklxPpb/openapi.json
