# GitHub Trending Scraper | History, Stars, Forks & Devs (`muzafferkadir/github-trending-scraper`) Actor

Scrape GitHub Trending for today, or rebuild what was trending on any single past day back to 2011. Stars, forks, star gains, languages, topics and contributors.

- **URL**: https://apify.com/muzafferkadir/github-trending-scraper.md
- **Developed by:** [Muzaffer Kadir YILMAZ](https://apify.com/muzafferkadir) (community)
- **Categories:** Developer tools, Automation
- **Stats:** 1 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 Trending Scraper

Scrape GitHub trending repositories — today's, and any day in the past. Get repository names, descriptions, stars, forks, star gains, languages, topics and top contributors as structured JSON, CSV or Excel.

GitHub's trending page only ever shows you right now. This Actor also lets you ask what was trending on any date going back to 2011 — so you can track how a project, a language or a whole category grew over time.

### What you can do with it

- **Track open source trends** — see which repositories are gaining stars fastest, today or on any past date.
- **Research a technology's rise** — pull the trending list for the day a framework launched and watch it climb.
- **Find projects early** — spot repositories breaking out before they hit mainstream lists.
- **Build developer lead lists** — get repository owners and top contributors for outreach.
- **Feed newsletters and dashboards** — schedule a daily run and always have fresh trending data.
- **Compare languages over time** — filter by Python, TypeScript, Rust, Go and more.

### How to use it

1. Pick **Live** to scrape today's trending page, or **Historical** to rebuild a past day.
2. Choose a time range — today, this week or this month.
3. Optionally filter by programming language.
4. In historical mode, enter the date you want, one day per run.
5. Click **Start** and download your results as JSON, CSV or Excel.

No GitHub account, token or login is needed.

### Input

| Field      | Type    | Description                                                               |
| ---------- | ------- | ------------------------------------------------------------------------- |
| `mode`     | string  | `live` (today's trending) or `historical` (one past day). Default `live`. |
| `period`   | string  | `daily`, `weekly` or `monthly`. Live mode only. Default `daily`.          |
| `language` | string  | Language filter, e.g. `python`. Leave empty for all languages.            |
| `date`     | string  | The day to look up, `YYYY-MM-DD`. Historical mode only.                   |
| `maxItems` | integer | How many repositories to return. Default 25.                              |

#### Advanced

| Field                | Type   | Description                                                                            |
| -------------------- | ------ | -------------------------------------------------------------------------------------- |
| `spokenLanguage`     | string | Restrict to a spoken language, e.g. `en`, `zh`. Often returns nothing — use sparingly. |
| `proxyConfiguration` | object | Not needed normally. Enable only if you hit rate limits.                               |

### Examples

**Today's trending repositories**

```json
{
    "mode": "live",
    "period": "daily"
}
```

**This week's trending Rust projects**

```json
{
    "mode": "live",
    "period": "weekly",
    "language": "rust"
}
```

**What was trending the day GPT-4 launched**

```json
{
    "mode": "historical",
    "date": "2023-03-14",
    "maxItems": 25
}
```

**Trending TypeScript on a specific day**

```json
{
    "mode": "historical",
    "date": "2025-06-03",
    "language": "typescript",
    "maxItems": 10
}
```

### Output

One row per repository:

| Field            | Description                                   |
| ---------------- | --------------------------------------------- |
| `trendingDate`   | The day this repository was trending.         |
| `rank`           | Position in that day's list, starting at 1.   |
| `repo`           | Full name, e.g. `microsoft/AI-For-Beginners`. |
| `owner` / `name` | The two halves of the full name.              |
| `url`            | Link to the repository.                       |
| `description`    | Repository description.                       |
| `language`       | Primary programming language.                 |
| `languageColor`  | The colour GitHub uses for that language.     |
| `stars`          | Total stars. Live mode.                       |
| `forks`          | Total forks. Live mode.                       |
| `starsInPeriod`  | Stars gained during the window. Both modes.   |
| `metadataAsOf`   | When the repository details were recorded.    |
| `period`         | `daily`, `weekly` or `monthly`.               |
| `topics`         | Repository topic tags. Historical mode.       |
| `builtBy`        | Top contributor usernames. Live mode.         |
| `source`         | `live` or `historical`.                       |
| `scrapedAt`      | When this run collected the row.              |

Sample result:

```json
{
    "trendingDate": "2025-06-03",
    "rank": 1,
    "repo": "onlook-dev/onlook",
    "owner": "onlook-dev",
    "name": "onlook",
    "url": "https://github.com/onlook-dev/onlook",
    "description": "The open source Cursor for Designers.",
    "language": "TypeScript",
    "starsInPeriod": 1270,
    "period": "daily",
    "source": "historical"
}
```

### Good to know

- Live mode returns what GitHub's page shows, usually 15–25 repositories.
- Historical mode covers one day per run, going back to 2011.
- The public record a historical day is built from takes a while to complete, so the most recent months are not available yet — currently it runs about three months behind. Ask for a day that is too recent and the Actor tells you the latest date it can give you. For anything newer, use live mode.
- Weekly and monthly ranges are less noisy than daily if you want lasting trends rather than one-day spikes.
- Star and fork totals and contributor lists come with live results. Historical results give you the ranking, the star gain, and — for dates from June 2024 onward — the language, description and topics.
- Language filtering works best on dates from June 2024 onward. For older dates, leave it empty and filter the results yourself.

### FAQ

**Do I need a GitHub account or API token?**
No. Everything comes from publicly visible pages and public records.

**How far back can I go?**
To 2011. The other end is the limit: the most recent months are not available yet, so historical currently reaches about three months back. Live mode covers today.

**Can I get a whole month at once?**
Each run covers one day. Schedule or loop runs to build a longer series — each run is fast and independent.

**Can I schedule it?**
Yes. Use Apify Schedules to run it daily and keep a rolling record of what's trending.

### Disclaimer

This is an **unofficial** Actor. It is not affiliated with, endorsed by, or sponsored by GitHub or Microsoft. All product names, logos, and trademarks are the property of their respective owners and are used here for identification purposes only.

The Actor collects only publicly available information. It does not log in, create accounts, bypass paywalls, or access anything that is not visible to an ordinary visitor.

Output may include usernames and other information relating to identifiable people. You are the data controller for anything you collect with this Actor and are responsible for having a lawful basis to process it under applicable data-protection law (such as GDPR or KVKK), and for complying with the source website's terms.

# Actor input Schema

## `mode` (type: `string`):

Live = today's trending page. Historical = rebuild trending lists for any past date range back to 2011.

## `period` (type: `string`):

Which trending window to read: today, this week or this month. Ignored in historical mode.

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

Filter by language, e.g. python, typescript, rust. Leave empty for all languages. In historical mode this only works for dates from June 2024 onward — see the README.

## `date` (type: `string`):

Which past day to rebuild, YYYY-MM-DD. One day per run, back to 2011. The most recent months are not available yet — the run tells you the latest date it can give you.

## `maxItems` (type: `integer`):

How many repositories to return. GitHub's own page shows 25.

## `spokenLanguage` (type: `string`):

Restrict to repos written in a spoken language, e.g. en, zh, tr. Most days this narrows results a lot or returns nothing.

## Actor input object example

```json
{
  "mode": "live",
  "period": "daily",
  "date": "2025-06-03",
  "maxItems": 25
}
```

# Actor output Schema

## `results` (type: `string`):

All trending rows collected by this run.

# 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 = {
    "mode": "live",
    "period": "daily",
    "language": "",
    "date": "2025-06-03",
    "maxItems": 25
};

// Run the Actor and wait for it to finish
const run = await client.actor("muzafferkadir/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 = {
    "mode": "live",
    "period": "daily",
    "language": "",
    "date": "2025-06-03",
    "maxItems": 25,
}

# Run the Actor and wait for it to finish
run = client.actor("muzafferkadir/github-trending-scraper").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 '{
  "mode": "live",
  "period": "daily",
  "language": "",
  "date": "2025-06-03",
  "maxItems": 25
}' |
apify call muzafferkadir/github-trending-scraper --silent --output-dataset

```

## MCP server setup

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

```

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/Vn5xGp6llnUX7zbHf/builds/BCCzmxLp78Llfsqzi/openapi.json
