# 🔥  GitHub Trending Repos — Daily/Weekly/Monthly by Language (`trepanat0r/github-trending`) Actor

Scrape github.com/trending: top repos by stars-in-period, filtered by programming language and timespan. Includes README and topics on demand.

- **URL**: https://apify.com/trepanat0r/github-trending.md
- **Developed by:** [Trepanator Labs](https://apify.com/trepanat0r) (community)
- **Categories:** Developer tools, AI
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 trending repo extracteds

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 Trending Repos Tracker

**Track the GitHub repositories getting the most stars right now — daily, weekly, or monthly, filtered by programming language.** Scrapes [github.com/trending](https://github.com/trending) and returns clean JSON with stars, forks, language, description, and (optionally) README content for LLM/RAG workflows.

### What does GitHub Trending Repos Tracker do?

GitHub's `/trending` page is a hand-curated discovery feed for repos gaining stars fastest. The page itself is **not in the official GitHub REST API** — and that's exactly the gap this Actor fills. Get the trending list:

- **Filtered by programming language** (TypeScript, Go, Rust, Python, anything GitHub supports)
- **Filtered by timespan** (today, this week, this month)
- **Optionally with the full README**, topics, license, homepage — pulled from the GitHub API in one pass

Schedule it daily, hit it from your CRM/Slack/Notion, ingest into your RAG pipeline for "what's new this week" digests.

### Why use this Actor?

- **VCs and scouts** — spot fast-growing OSS projects before TechCrunch does
- **Content creators** — automate "Top 10 X repos of the week" newsletters and threads
- **Devs / engineers** — discover libraries in a language you care about, weekly
- **AI/RAG pipelines** — feed README content into LLM training/retrieval workflows
- **Investors** — track GitHub momentum signals for crypto/dev-tool startups

### How to use it

1. Click **Try for free**
2. (Optional) Set a **programming language** like `typescript` or `rust`. Leave blank for all.
3. Pick a **timespan** — today, this week, or this month
4. Toggle **Include README** if you want full markdown content per repo
5. Click **Start** — results appear in seconds
6. Download as JSON, CSV, Excel, or hit the API

### Input

| Field | Required | Default | Description |
|---|---|---|---|
| `language` | No | `""` (all) | GitHub language slug — `typescript`, `python`, `go`, etc. |
| `timespan` | No | `daily` | `daily`, `weekly`, or `monthly` |
| `spokenLanguage` | No | `""` | ISO 639-1 code (`en`, `zh`, `ja`) to filter by README language |
| `includeReadme` | No | `false` | Fetch README + topics + license from GitHub API |
| `proxyConfiguration` | No | Apify proxy | Standard proxy options — defaults work fine |

### Output

```json
{
  "rank": 1,
  "owner": "openai",
  "name": "codex",
  "fullName": "openai/codex",
  "url": "https://github.com/openai/codex",
  "description": "Lightweight coding agent that runs in your terminal",
  "language": "Rust",
  "languageColor": "#dea584",
  "stars": 18432,
  "starsInPeriod": 723,
  "forks": 1654,
  "builtBy": [
    { "username": "rasbt", "avatarUrl": "https://avatars.githubusercontent.com/u/..." }
  ],
  "topics": ["llm", "coding-agent", "terminal", "ai"],
  "license": "MIT",
  "homepage": "https://codex.openai.com",
  "defaultBranch": "main",
  "openIssues": 42,
  "watchers": 184,
  "readmeMarkdown": "## Codex\n\nLightweight coding agent...",
  "timespan": "daily",
  "languageFilter": null,
  "scrapedAt": "2026-05-26T20:14:00.000Z"
}
````

Download as JSON, CSV, HTML, or Excel from the dataset.

### Data table

| Field | Type | Description |
|---|---|---|
| `rank` | number | Position on trending page (1-25) |
| `fullName` | string | `owner/name` |
| `url` | string | Repo URL |
| `description` | string | Short description from repo |
| `language` | string | Primary language |
| `stars` | number | Total stars |
| `starsInPeriod` | number | New stars in selected timespan |
| `forks` | number | Total forks |
| `builtBy` | array | Top contributors shown on trending page |
| `topics` | array | Topic tags (only if `includeReadme: true`) |
| `license` | string | SPDX license identifier (only if `includeReadme: true`) |
| `homepage` | string | Project homepage URL (only if `includeReadme: true`) |
| `readmeMarkdown` | string | Full README in markdown (only if `includeReadme: true`) |

### Pricing

This Actor uses **pay-per-event** pricing. You pay only per trending repo returned.

| Event | Description | Price |
|---|---|---|
| `trending_repo` | One repo extracted from the trending page | $0.002 per repo |

GitHub's trending page typically returns ~25 repos per run. So a single run costs ~$0.05.

#### Cost estimates

- 1 run (daily, all languages): ~25 repos = **~$0.05**
- 1 run (daily, includeReadme = true): same 25 repos = **~$0.05** (READMEs are free via GitHub API)
- 30 days of daily runs: **~$1.50/month**
- Apify free tier ($5/month credit) covers ~100 runs/month

### Tips

- Schedule it **daily at midnight UTC** to capture the full day's trending
- Use `language=typescript&timespan=weekly` for "what's hot in TS this week" workflows
- Set `includeReadme: true` to pipe straight into a RAG/embedding store
- GitHub's unauthenticated API limits to 60 requests/hour. With `includeReadme: true` and 25 repos, one run uses ~50 API calls — well within limits. For higher volume, set `GITHUB_TOKEN` env var on the run.

### FAQ

**Why scrape instead of use the GitHub API?** The trending list is not exposed via the official API. This Actor closes that gap by parsing the public trending HTML.

**Is this legal?** GitHub's trending page is public. This Actor only fetches what any browser can fetch and respects rate limits. The scraped data is used per buyer; the buyer is responsible for compliance with their use case.

**Does it work on free-tier Apify proxies?** Yes. GitHub doesn't block datacenter IPs.

**Can I use this for a daily newsletter / scheduled digest?** Exactly the use case. Schedule the Actor via Apify Console → run → ingest the dataset into your workflow.

**Issues / feature requests?** Open them on the Issues tab. Planned: language-pair trending, GitHub Awesome lists ingestion, GitHub Sponsors signals.

# Actor input Schema

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

Filter to a single language (e.g., `typescript`, `python`, `go`, `rust`). Leave blank for all languages. Use the slug as it appears in github.com/trending/<lang> URLs.

## `timespan` (type: `string`):

Trending window: daily (default), weekly, or monthly.

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

Filter trending by README spoken language (ISO 639-1 code, e.g., `en`, `zh`, `ja`). Leave blank for all.

## `includeReadme` (type: `boolean`):

Fetch each repo's README content, topics, license, and homepage via the GitHub API. Adds ~1 second per repo. Recommended ON for AI/LLM data prep workflows.

## `proxyConfiguration` (type: `object`):

GitHub is generally scrapeable from any IP. Default Apify proxy is fine.

## Actor input object example

```json
{
  "language": "typescript",
  "timespan": "daily",
  "spokenLanguage": "",
  "includeReadme": false,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# 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 = {
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("trepanat0r/github-trending").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 = { "proxyConfiguration": { "useApifyProxy": True } }

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

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "🔥  GitHub Trending Repos — Daily/Weekly/Monthly by Language",
        "description": "Scrape github.com/trending: top repos by stars-in-period, filtered by programming language and timespan. Includes README and topics on demand.",
        "version": "0.1",
        "x-build-id": "9cz9CzdbPE91Y3EvF"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/trepanat0r~github-trending/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-trepanat0r-github-trending",
                "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/trepanat0r~github-trending/runs": {
            "post": {
                "operationId": "runs-sync-trepanat0r-github-trending",
                "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/trepanat0r~github-trending/run-sync": {
            "post": {
                "operationId": "run-sync-trepanat0r-github-trending",
                "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": "Programming language",
                        "type": "string",
                        "description": "Filter to a single language (e.g., `typescript`, `python`, `go`, `rust`). Leave blank for all languages. Use the slug as it appears in github.com/trending/<lang> URLs.",
                        "default": ""
                    },
                    "timespan": {
                        "title": "Timespan",
                        "enum": [
                            "daily",
                            "weekly",
                            "monthly"
                        ],
                        "type": "string",
                        "description": "Trending window: daily (default), weekly, or monthly.",
                        "default": "daily"
                    },
                    "spokenLanguage": {
                        "title": "Spoken language (optional)",
                        "type": "string",
                        "description": "Filter trending by README spoken language (ISO 639-1 code, e.g., `en`, `zh`, `ja`). Leave blank for all.",
                        "default": ""
                    },
                    "includeReadme": {
                        "title": "Include README + topics + license",
                        "type": "boolean",
                        "description": "Fetch each repo's README content, topics, license, and homepage via the GitHub API. Adds ~1 second per repo. Recommended ON for AI/LLM data prep workflows.",
                        "default": false
                    },
                    "proxyConfiguration": {
                        "title": "Proxy configuration",
                        "type": "object",
                        "description": "GitHub is generally scrapeable from any IP. Default Apify proxy is fine.",
                        "default": {
                            "useApifyProxy": true
                        }
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
