# GitHub Repository Analytics (`gochujang/github-repo-analytics`) Actor

Deep analytics for GitHub repositories: stars, forks, contributors, language breakdown, releases, activity scores, maturity labels, and computed health metrics. No API key required for public repos.

- **URL**: https://apify.com/gochujang/github-repo-analytics.md
- **Developed by:** [Hojun Lee](https://apify.com/gochujang) (community)
- **Categories:** Business
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 repo analyzeds

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

### What does GitHub Repository Analytics do?

**GitHub Repository Analytics** delivers deep, structured metrics for any list of public GitHub repositories using the official **GitHub REST API**. Provide a list of `owner/repo` slugs and get back **GitHub stars**, fork counts, open issues, watchers, release history, contributor activity, maturity labels, and language breakdowns — all in one dataset. No mandatory API key is required for public repos, though providing a **GitHub Personal Access Token** unlocks 5,000 requests per hour versus 60 unauthenticated.

This actor is the backbone for automated **repo metrics tracking**, competitive benchmarking, and portfolio monitoring pipelines that need reliable, structured GitHub data at scale.

### Why use GitHub Repository Analytics?

**Track GitHub repository metrics** across any portfolio of repos without hitting rate limits or writing your own API integration.

1. **Competitive benchmarking** — Compare **GitHub stars, forks**, open issues, and activity scores across your competitors' repositories on a scheduled basis to track growth trajectories over time.
2. **Open-source portfolio monitoring** — Investors and analysts tracking OSS-backed companies can pull weekly snapshots of **repo metrics** to surface momentum shifts before they show up in press coverage.
3. **Developer relations reporting** — DevRel teams can automate weekly reports on community health: star growth, open issues, contributor diversity, and release cadence — all in one structured dataset.
4. **Dependency due diligence** — When evaluating a library or vendor, pull a full **GitHub repository analytics** snapshot — last commit date, maturity label, license type, and contributor count — in seconds via the Apify API.
5. **Research datasets** — Build longitudinal **GitHub stars forks API** datasets for academic research on open-source sustainability, community dynamics, or software ecosystem evolution.

### How to use GitHub Repository Analytics

1. Open the actor on Apify and click **Try for free**.
2. Enter your list of repositories in `owner/repo` format (e.g. `microsoft/vscode`, `facebook/react`).
3. Optionally add a **GitHub Personal Access Token** for higher rate limits (5,000 req/hr).
4. Click **Start** — results appear in the dataset within seconds for small batches.
5. Download as JSON, CSV, or Excel — or integrate via the Apify API for automated pipelines.

For large portfolios (100+ repos), provide a PAT to avoid rate limiting. Schedule the actor weekly to build a time-series dataset of repository growth.

### Input

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `repos` | array | Yes | List of repository slugs in `owner/repo` format (e.g. `["torvalds/linux", "facebook/react"]`). |
| `optionalToken` | string | No | GitHub Personal Access Token for 5,000 req/hr rate limit (vs. 60/hr unauthenticated). No special scopes needed for public repos. |

**Example input:**

```json
{
  "repos": ["microsoft/vscode", "tensorflow/tensorflow", "facebook/react"],
  "optionalToken": "ghp_..."
}
```

### Output

Each item in the dataset represents one analyzed **GitHub repository**. You can download the dataset in various formats such as JSON, HTML, CSV, or Excel.

```json
[
  {
    "full_name": "microsoft/vscode",
    "stars": 165000,
    "forks": 29000,
    "open_issues": 7832,
    "contributors_count": 1842,
    "language": "TypeScript",
    "language_breakdown_pct": {"TypeScript": 92.4, "CSS": 4.1, "JavaScript": 2.1},
    "age_days": 3500,
    "days_since_last_commit": 0.3,
    "stars_per_day": 47.1,
    "fork_to_star_ratio": 0.176,
    "activity_score": 94,
    "maturity_label": "stable",
    "license_type": "MIT",
    "size_tier": "massive",
    "topic_tags": ["editor", "electron", "typescript", "vscode"],
    "latest_releases": [
      {"tag_name": "1.91.0", "published_at": "2026-07-04T00:00:00Z", "prerelease": false}
    ],
    "is_fork": false,
    "is_archived": false,
    "analyzed_at": "2026-09-02T10:15:00Z"
  }
]
```

### Data fields

| Field | Type | Description |
|-------|------|-------------|
| `full_name` | string | Repository slug (`owner/repo`) |
| `stars` | integer | Total **GitHub stars** count |
| `forks` | integer | Total **forks** count |
| `open_issues` | integer | Open issues and pull requests |
| `watchers` | integer | Watcher count |
| `contributors_count` | integer | Total unique contributors |
| `language` | string | Primary programming language |
| `language_breakdown_pct` | object | Language distribution as percentage |
| `age_days` | float | Days since repository creation |
| `days_since_last_commit` | float | Days since last push |
| `stars_per_day` | float | **Star growth velocity** (stars / age_days) |
| `fork_to_star_ratio` | float | Forks divided by stars |
| `activity_score` | integer | 0–100 composite health score (recency + velocity + community) |
| `maturity_label` | string | `growing` / `stable` / `legacy` / `abandoned` |
| `license_type` | string | `MIT` / `Apache` / `GPL` / `other` / `none` |
| `size_tier` | string | `tiny` / `small` / `medium` / `large` / `massive` |
| `topic_tags` | array | Repository topic tags |
| `latest_releases` | array | Latest 3 releases with tag, name, and date |
| `is_fork` | boolean | Whether the repo is a fork |
| `is_archived` | boolean | Whether the repo is archived |
| `analyzed_at` | string | ISO 8601 timestamp of the analysis |

**Maturity labels explained:**

| Label | Criteria |
|-------|----------|
| `abandoned` | No commit in 365+ days |
| `legacy` | No commit in 180+ days, or age > 5 years with low recent activity |
| `stable` | Active, well-established repository |
| `growing` | Recent activity, rapid star growth, or young repo |

### Cost estimation

This actor uses **Pay-Per-Event (PPE)** pricing.

| Scenario | Repos | Cost |
|----------|-------|------|
| Single repo check | 1 | $0.006 |
| Small portfolio (10 repos) | 10 | $0.051 |
| Medium portfolio (50 repos) | 50 | $0.251 |
| Large portfolio (200 repos) | 200 | $1.001 |

**Pricing breakdown:**

- $0.001 — actor start (one-time per run)
- $0.005 — per **GitHub repository** successfully analyzed

Each repo uses approximately 4 GitHub API calls (repo metadata, languages, contributors, releases). At 60 req/hr unauthenticated, you can analyze ~15 repos/hr. With a token: ~1,250 repos/hr.

### FAQ

**Do I need a GitHub API key?**
No API key is required for public repositories. Providing a **GitHub Personal Access Token** raises your rate limit from 60 to 5,000 requests per hour, which is necessary for large batch runs.

**How is this different from the GitHub Trending Tracker?**
The **GitHub Repository Analytics** actor fetches detailed metrics for specific repos you name. The GitHub Trending Tracker discovers what repos are currently viral across the platform. Use both together: discover trends, then deep-dive into specific repos with full analytics.

**Can I track private repositories?**
Yes, if you provide a GitHub PAT with access to those repositories. The token is stored securely as a secret input and never logged or exposed.

***

> **Disclaimer:** This actor uses the public GitHub REST API and is subject to GitHub's Terms of Service and rate limits. Data is fetched at a point in time and does not constitute a real-time feed. This actor is not affiliated with or endorsed by GitHub, Inc.

***

### Related actors

- [GitHub Trending Tracker](https://apify.com/gochujang/github-trending-tracker) — Discover trending repos then deep-dive with this actor's analytics
- [GitHub CI Monitor](https://apify.com/gochujang/github-ci-monitor) — CI/CD workflow health for repos analyzed by this actor
- [GitHub Issues Tracker](https://apify.com/gochujang/github-issues-tracker) — Open issues and bug trends for repositories tracked in this actor

### Feedback

If this actor powers your open source research, a review helps others find it: [Leave a review on Apify Store](https://apify.com/gochujang/github-repo-analytics#reviews)

***

**Keywords:** GitHub repo analytics, repository metrics, GitHub stars, fork tracker, contributor analysis, language breakdown, release tracker, repo health metrics, activity score, GitHub insights, open source analytics, repo maturity, GitHub data

# Actor input Schema

## `repos` (type: `array`):

List of repositories in 'owner/repo' format to analyze.

## `optionalToken` (type: `string`):

GitHub PAT for higher rate limits (5000 req/hour vs 60/hour unauthenticated). Leave empty to use the public rate limit.

## Actor input object example

```json
{
  "repos": [
    "microsoft/vscode",
    "tensorflow/tensorflow",
    "torvalds/linux",
    "facebook/react",
    "golang/go"
  ]
}
```

# 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 = {
    "repos": [
        "microsoft/vscode",
        "tensorflow/tensorflow",
        "torvalds/linux",
        "facebook/react",
        "golang/go"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("gochujang/github-repo-analytics").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 = { "repos": [
        "microsoft/vscode",
        "tensorflow/tensorflow",
        "torvalds/linux",
        "facebook/react",
        "golang/go",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("gochujang/github-repo-analytics").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 '{
  "repos": [
    "microsoft/vscode",
    "tensorflow/tensorflow",
    "torvalds/linux",
    "facebook/react",
    "golang/go"
  ]
}' |
apify call gochujang/github-repo-analytics --silent --output-dataset

```

## MCP server setup

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

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/OaaP8RoiUzPPTYVvz/builds/5qahWnIcvhfE8PVh0/openapi.json
