# 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, NaN 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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).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": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=scrapeworks/github-dependency-health",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "GitHub Dependency Health Checker",
        "description": "Score the maintenance health and abandonment risk of GitHub dependencies. Returns a 0-100 health score, verdict, and risk flags per repo.",
        "version": "0.1",
        "x-build-id": "bMdmEB4n3yuPCbDru"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/scrapeworks~github-dependency-health/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-scrapeworks-github-dependency-health",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/scrapeworks~github-dependency-health/runs": {
            "post": {
                "operationId": "runs-sync-scrapeworks-github-dependency-health",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/scrapeworks~github-dependency-health/run-sync": {
            "post": {
                "operationId": "run-sync-scrapeworks-github-dependency-health",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "repositories": {
                        "title": "Repositories",
                        "type": "array",
                        "description": "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'].",
                        "items": {
                            "type": "string"
                        }
                    },
                    "manifestText": {
                        "title": "Manifest file contents (optional)",
                        "type": "string",
                        "description": "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": {
                        "title": "Manifest type",
                        "enum": [
                            "auto",
                            "package.json",
                            "requirements.txt"
                        ],
                        "type": "string",
                        "description": "How to interpret the pasted manifest. 'auto' detects package.json (starts with '{') vs requirements.txt.",
                        "default": "auto"
                    },
                    "checkContributors": {
                        "title": "Check contributor count (bus-factor)",
                        "type": "boolean",
                        "description": "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.",
                        "default": true
                    },
                    "githubToken": {
                        "title": "GitHub token (optional)",
                        "type": "string",
                        "description": "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."
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
