# GitHub Trending Scraper — Daily/Weekly/Monthly, No API (`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

from $1.20 / 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.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#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 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

Download the OpenAPI definition: https://api.apify.com/v2/actors/fkPJg8Rz8mduF1V4T/builds/naznf1a39hbAWNVLL/openapi.json
