# 🔥 GitHub Trending Scraper: Daily/Weekly/Monthly · $2/1k (`themineworks/github-trending-scraper`) Actor

Scrape github.com/trending by language and time window (daily/weekly/monthly). Rank, stars, forks, stars gained, description, language. There is no official API for GitHub Trending. This is the only way to get it programmatically.

- **URL**: https://apify.com/themineworks/github-trending-scraper.md
- **Developed by:** [The Mine Works](https://apify.com/themineworks) (community)
- **Categories:** Developer tools, MCP servers
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$2.00 / 1,000 trending repo scrapeds

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/docs.md):

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

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python/docs.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/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 Trending Scraper: Daily, Weekly & Monthly

### Overview

GitHub Trending has no official API. GitHub's REST and GraphQL APIs cover repos, users, issues, and releases, but not the trending page. This actor reads github.com/trending directly by language and time window, and returns clean structured JSON: rank, repo, description, language, total stars, forks, and stars gained in the window.

Built lean and HTTP-only (plain fetch and HTML parse, no browser needed since the page is server-rendered). Ideal for OSS landscape monitoring, DevRel newsletters, competitive scans, and AI agents that need the trending signal.

Reliability posture: blocked, empty, or failed runs are never charged. If the trending page fails to load or zero repos parse, the run ends with a diagnostic record and nothing is billed.

✅ No login | ✅ No API needed | ✅ Server-rendered, fast | ✅ MCP-ready for AI agents

### Features

Filter by language (`javascript`, `python`, `go`, `rust`, etc.) or leave empty for all.
Pick the time window: daily, weekly, or monthly.
Filter by spoken language via `spokenLanguageCode` if you want (say) only Chinese-language repos.
Rank plus stars gained in the window for a clean rising-repo signal.
Same output whether you consume it via CSV, JSON, Excel, API, or MCP tool call.

### How it works

The github.com/trending page is server-rendered HTML with a stable structure. This actor fetches the page for the chosen language and window, parses the trending list, and returns one flat record per repo. Because there is no browser and no proxy needed, runs finish in seconds.

The record shape mirrors what a maintainer would care about: total stars for context, stars gained for momentum, plus language and description so you can filter by category downstream.

### 🧾 Input configuration

```json
{
  "language": "python",
  "since": "daily",
  "spokenLanguageCode": null
}
````

### 📤 Output format

This is a real record captured from a live run (`language: "python", since: "daily"`):

```json
{
  "rank": 2,
  "owner": "virattt",
  "repo": "ai-hedge-fund",
  "fullName": "virattt/ai-hedge-fund",
  "url": "https://github.com/virattt/ai-hedge-fund",
  "description": "An AI Hedge Fund Team",
  "language": "Python",
  "stars": 61946,
  "forks": 10918,
  "starsGained": 109,
  "since": "daily",
  "charged": false,
  "scraped_at": "2026-07-15T04:16:24.037Z"
}
```

Every trending repo record contains these fields:

| Field | Description |
| --- | --- |
| 🏆 `rank` | Position on the trending page |
| 👤 `owner` | Repo owner |
| 📦 `repo` | Repo name |
| 🏷️ `fullName` | `owner/repo` |
| 🔗 `url` | Canonical GitHub URL |
| 📝 `description` | Repo description |
| 🗣️ `language` | Primary language |
| ⭐ `stars` | Total stars |
| 🍴 `forks` | Total forks |
| 📈 `starsGained` | Stars gained in the selected window |
| 🕐 `since` | Time window used (`daily`, `weekly`, `monthly`) |
| 💰 `charged` | Whether the pay-per-event charge for this record went through |
| 🕒 `scraped_at` | ISO timestamp of capture |

### 💼 Common use cases

**OSS landscape scans**
See what is breaking out in your language or ecosystem before it hits Hacker News.
Feed the data into a competitive dashboard alongside your own repo stats.

**Newsletters and DevRel**
Build a "top rising repos" newsletter section on autopilot.
Curate weekly language-specific trending picks for your community.

**Investor and VC scouting**
Track early technical momentum in emerging categories (AI agents, RAG, WASM).
Flag OSS breakouts inside portfolio company categories.

**AI research agents**
Give an agent live trending data so it can answer "what's hot in Rust today?"
Wire the MCP tool into Claude or ChatGPT for weekly OSS reports.

### 🚀 Getting started

1. Open the actor and optionally set a `language` filter (leave empty for all).
2. Pick `since`: `daily`, `weekly`, or `monthly`.
3. Optionally set `spokenLanguageCode` to slice by spoken language.
4. Click Start, then download the dataset as JSON, CSV, or Excel, or pull it via API or MCP.

### FAQ

**Why not just call the GitHub API?**
GitHub does not expose the trending page via API. This actor is the only way to get trending data programmatically without scraping HTML yourself.

**How often does the trending page update?**
GitHub refreshes the page frequently through the day. Schedule a run every few hours for a fresh trending feed.

**Can I use it inside an AI agent?**
Yes. It is exposed as an MCP tool. See below.

**How much does it cost?**
$2 per 1,000 trending repos delivered. You pay only for repos actually returned. There is no free tier.

### Use in Claude, ChatGPT & any MCP agent

```
https://mcp.apify.com/?tools=themineworks/github-trending-scraper
```

Or call it programmatically with the Apify client:

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

const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });

const run = await client.actor('themineworks/github-trending-scraper').call({
  language: 'python',
  since: 'daily',
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

### 🛠️ Complete your OSS intelligence pipeline

Pair this actor with the rest of the themineworks GitHub suite:

- **[GitHub Repo Intelligence](https://apify.com/themineworks/github-repo-intelligence)**: pull deep metadata (stars, contributors, README, releases) for the trending picks.
- **[GitHub Skill & Memory Discovery](https://apify.com/themineworks/github-skill-discovery)**: find every SKILL.md, CLAUDE.md, and AGENTS.md file for a domain.
- **[RAG Website Crawler](https://apify.com/themineworks/rag-crawler)**: turn any project's docs site into embedding-ready Markdown.

Typical flow: github-trending-scraper surfaces the momentum, github-repo-intelligence goes deep on the interesting ones, rag-crawler ingests their docs for an AI copilot.

Questions or need a custom field set? Reach out through the Apify profile.

# Actor input Schema

## `language` (type: `string`):

GitHub language slug to filter by (e.g. "javascript", "python", "go"). Leave empty for all languages.

## `since` (type: `string`):

Trending window

## `spokenLanguageCode` (type: `string`):

ISO code to filter by README language (e.g. "en", "zh"). Leave empty for all.

## Actor input object example

```json
{
  "since": "daily"
}
```

# 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 = {
    "language": "",
    "spokenLanguageCode": ""
};

// Run the Actor and wait for it to finish
const run = await client.actor("themineworks/github-trending-scraper").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 = {
    "language": "",
    "spokenLanguageCode": "",
}

# Run the Actor and wait for it to finish
run = client.actor("themineworks/github-trending-scraper").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 '{
  "language": "",
  "spokenLanguageCode": ""
}' |
apify call themineworks/github-trending-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=themineworks/github-trending-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "🔥 GitHub Trending Scraper: Daily/Weekly/Monthly · $2/1k",
        "description": "Scrape github.com/trending by language and time window (daily/weekly/monthly). Rank, stars, forks, stars gained, description, language. There is no official API for GitHub Trending. This is the only way to get it programmatically.",
        "version": "0.1",
        "x-build-id": "1c5qYgJQcDDSbzm1I"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/themineworks~github-trending-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-themineworks-github-trending-scraper",
                "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/themineworks~github-trending-scraper/runs": {
            "post": {
                "operationId": "runs-sync-themineworks-github-trending-scraper",
                "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/themineworks~github-trending-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-themineworks-github-trending-scraper",
                "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": {
                    "language": {
                        "title": "Language filter",
                        "type": "string",
                        "description": "GitHub language slug to filter by (e.g. \"javascript\", \"python\", \"go\"). Leave empty for all languages."
                    },
                    "since": {
                        "title": "Time window",
                        "enum": [
                            "daily",
                            "weekly",
                            "monthly"
                        ],
                        "type": "string",
                        "description": "Trending window",
                        "default": "daily"
                    },
                    "spokenLanguageCode": {
                        "title": "Spoken/written language filter (optional)",
                        "type": "string",
                        "description": "ISO code to filter by README language (e.g. \"en\", \"zh\"). Leave empty for all."
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
