# GitHub Dependency Health Checker (`scrapeworks/github-dependency-health`) Actor

Score the maintenance health and abandonment risk of GitHub dependencies. Returns a 0-100 health score, verdict, and risk flags per repo.

- **URL**: https://apify.com/scrapeworks/github-dependency-health.md
- **Developed by:** [Nicolas van Arkens](https://apify.com/scrapeworks) (community)
- **Categories:** Developer tools, Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 results

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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## GitHub Dependency Health Checker 🩺

Stop guessing whether a dependency is still maintained. This actor scores the **maintenance health and abandonment risk** of any GitHub repository and returns a clear **0-100 health score**, a **verdict** (Healthy, Moderate, At risk, Likely abandoned, Abandoned), and concrete **risk flags** — so you get a judgment, not just raw stats.

Feed it a list of repos, or paste a `package.json` or `requirements.txt` and it will check the GitHub-hosted dependencies for you.

### Why this is different

Most GitHub scrapers hand you raw fields (stars, last commit) and leave the interpretation to you. This one does the interpretation: it blends activity recency, release/age signals, archived status, issue backlog, popularity, and a single-maintainer (bus-factor) check into one transparent score, and tells you *why* in plain language.

### What it checks

- 🕒 **Activity recency** — how long since the last push (the strongest abandonment signal)
- 📦 **Archived / disabled status** — hard risk flags
- 🐛 **Issue backlog pressure** — open issues relative to popularity
- 👤 **Bus-factor** — single-maintainer projects are flagged as supply-chain risk
- 📜 **Licensing** — missing/unclear license is flagged
- ⭐ **Adoption** — popularity as a mild trust signal

Every score is broken down into its components in the output, so it's auditable — not a black box.

### Use cases

- **Supply-chain risk audits** — score every dependency in your `package.json` / `requirements.txt`
- **Dependency selection** — compare candidate libraries before adopting one
- **Tech due diligence** — assess the health of a codebase's dependencies
- **Ongoing monitoring** — schedule it to re-check your dependency list and catch newly-abandoned packages

### Input

| Field | Description |
|-------|-------------|
| **Repositories** | List of `owner/name`, GitHub URLs, or git URLs. |
| **Manifest contents** (optional) | Paste a `package.json` or `requirements.txt`; GitHub-hosted deps are extracted automatically. |
| **Manifest type** | Auto-detect, or force package.json / requirements.txt. |
| **Check contributors** | Toggle the bus-factor check (one extra API call per repo). |
| **GitHub token** (optional) | Recommended for more than a few repos — raises rate limits massively. A no-scope token is enough. |

### Output

```json
{
  "repository": "clips/pattern",
  "found": true,
  "url": "https://github.com/clips/pattern",
  "healthScore": 68.0,
  "verdict": "Moderate",
  "riskFlags": ["No commits pushed in 717 days"],
  "daysSinceLastPush": 717,
  "stars": 8854,
  "forks": 1558,
  "openIssues": 150,
  "contributors": 20,
  "language": "Python",
  "license": "BSD-3-Clause",
  "archived": false,
  "scoreComponents": {
    "recency": 8.0, "maturity": 15.0, "backlog": 15.0,
    "popularity": 20.0, "busFactor": 10.0, "statusPenalty": 0.0, "licenseOk": true
  }
}
```

Export to JSON, CSV, or Excel, or pull via the Apify API. Connect to Slack, Sheets, Zapier, or Make for scheduled monitoring and alerts.

### About the score

The health score is a transparent weighted blend of signals, capped 0-100, with hard penalties for archived/disabled repos. The component breakdown is included in every result so you can see exactly how a score was reached and apply your own thresholds. It is a heuristic risk indicator, not a guarantee — always combine it with your own review for critical dependencies.

### Notes

- Uses the official public GitHub REST API. Independent tool, not affiliated with GitHub.
- Works without a token for small runs; add a free no-scope token for larger dependency lists.

# Actor input Schema

## `repositories` (type: `array`):

GitHub repositories to assess. Each item can be 'owner/name', a github.com URL, or a git URL. Example: \['facebook/react', 'https://github.com/scrapy/scrapy'].

## `manifestText` (type: `string`):

Optionally paste the full contents of a package.json or requirements.txt. The actor extracts any GitHub-hosted dependencies (e.g. 'github:user/repo' or 'git+https://github.com/...') and checks their health alongside the list above.

## `manifestType` (type: `string`):

How to interpret the pasted manifest. 'auto' detects package.json (starts with '{') vs requirements.txt.

## `checkContributors` (type: `boolean`):

Fetch the contributor count for each repo to assess bus-factor risk (single-maintainer projects). Adds one extra API call per repo; turn off for faster, cheaper runs.

## `githubToken` (type: `string`):

A GitHub personal access token. Optional but recommended: raises the rate limit from ~60 to 5000 requests/hour. A classic token with NO scopes (public data only) is enough. Used only to call GitHub; never stored.

## Actor input object example

```json
{
  "repositories": [
    "facebook/react",
    "clips/pattern",
    "scrapy/scrapy"
  ],
  "manifestType": "auto",
  "checkContributors": true
}
```

# 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 = {
    "repositories": [
        "facebook/react",
        "clips/pattern",
        "scrapy/scrapy"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapeworks/github-dependency-health").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 = { "repositories": [
        "facebook/react",
        "clips/pattern",
        "scrapy/scrapy",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("scrapeworks/github-dependency-health").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 '{
  "repositories": [
    "facebook/react",
    "clips/pattern",
    "scrapy/scrapy"
  ]
}' |
apify call scrapeworks/github-dependency-health --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,scrapeworks/github-dependency-health"
        }
    }
}

```

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/Bf8Q9YDWyqpASKqXo/builds/bMdmEB4n3yuPCbDru/openapi.json
