# 🔥  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:** 3 total users, 2 monthly users, 100.0% runs succeeded, 0 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/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 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(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 '{
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call trepanat0r/github-trending --silent --output-dataset

```

## MCP server setup

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

```

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/vMO1ADgKjP58jaGvJ/builds/9cz9CzdbPE91Y3EvF/openapi.json
