# GitHub Trending Scraper - Trending Repos, Developers & Search (`deanko/github-trending-scraper`) Actor

Scrape GitHub trending repositories and developers by language, period (daily, weekly, monthly) and spoken language, or search repos by keyword, stars and date. Stars gained, topics, license and more. $3 per 1,000 results.

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

## Pricing

from $3.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?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## GitHub Trending Scraper: trending repos, developers and repository search

Scrape **GitHub trending** repositories and developers for any programming language and period (**today, this week, this month**), filtered by spoken language. You can also **search all of GitHub's repositories** by keyword, topic, language and minimum stars. Every result is a clean, flat row with **stars gained in the period**, total stars, forks, topics, license, homepage, and created and last-pushed dates. The rows are ready for Excel, Google Sheets, BI tools, newsletters or your database.

It costs **$3 per 1,000 results**. It uses plain HTTP and the official GitHub REST API, so you need no browser, no proxies and no GitHub account.

### What does the GitHub Trending Scraper do?

It has three modes:

- **Trending repositories** (`trending`). Reads [github.com/trending](https://github.com/trending), or `/trending/<language>`, for the daily, weekly or monthly period, with an optional spoken-language filter. Each repository gets its rank, stars gained in the period and "built by" contributors. One extra API call adds topics, license, homepage, open issues and created/pushed dates.
- **Trending developers** (`trendingDevelopers`). Reads [github.com/trending/developers](https://github.com/trending/developers). You get each developer's rank, username, name, avatar and popular repository.
- **Repository search** (`search`). Uses the GitHub search API with any query and qualifier (`topic:`, `org:`, `created:`, `in:readme`...). Results can be sorted by stars, forks or last update and filtered by minimum stars, up to 1,000 rows per query.

#### Who is it for?

- **Developer-tool and AI startups.** Spot rising open-source projects and competitors early, and find integration partners and potential hires among trending developers.
- **VCs and analysts.** Track which repositories and languages are gaining momentum each day or week, and build star-growth time series by scheduling daily runs.
- **Newsletter writers and content creators.** Get a daily "top trending repos" list for Python, Rust, TypeScript or AI, ready to drop into a post.
- **DevRel and recruiters.** Find active developers and fast-growing projects in your ecosystem (`topic:mcp`, `language:go`...).
- **Researchers and data journalists.** Build datasets of popular repositories by topic, license or creation date.

### Why use this GitHub trending scraper?

- **Low price.** $3 per 1,000 results, roughly 10x cheaper than other GitHub trending actors. You pay only for rows saved and can set a maximum charge per run.
- **Trending and search in one Actor.** Daily discovery and deep historical search run from the same input form and produce the same row format.
- **Stars gained per period.** The number GitHub trending is built on, which the API alone doesn't give you.
- **Rich rows without a token.** Topics, license, homepage and dates come from one batched API request per trending page.
- **Fast and light.** The default run (today's trending, all languages) takes a few seconds on 256 MB of memory.
- **Rate-limit safe.** It retries 403/429 rate-limit responses using GitHub's `retry-after` and `x-ratelimit-reset` headers, and it paces search pages to the 10 requests/minute anonymous limit. Add an optional GitHub token for 30 requests/minute.

### How to scrape GitHub trending

1. Click **Try for free** (or **Start**) on this page.
2. Pick a **Mode**: trending repositories, trending developers or search.
3. Optionally set a **programming language**, **trending period** or **search query**.
4. Click **Start** and wait a few seconds.
5. Download the results as **CSV, Excel, JSON, XML or HTML**, or read them through the API.

#### Input examples

Today's trending repositories, all languages (the default):

```json
{ "mode": "trending", "since": "daily" }
```

This week's trending Python repositories with English READMEs:

```json
{ "mode": "trending", "language": "python", "since": "weekly", "spokenLanguageCode": "en" }
```

This month's trending developers in Rust:

```json
{ "mode": "trendingDevelopers", "language": "rust", "since": "monthly" }
```

The 500 most-starred MCP repositories created in 2026, with at least 100 stars:

```json
{ "mode": "search", "query": "topic:mcp created:>=2026-01-01", "sort": "stars", "minStars": 100, "maxItems": 500 }
```

| Field | What it does | Example |
|---|---|---|
| `mode` | `trending`, `trendingDevelopers` or `search` | `trending` |
| `language` | Programming language (all modes) | `python`, `typescript`, `c++` |
| `since` | Trending period | `daily`, `weekly`, `monthly` |
| `spokenLanguageCode` | README language for trending repos (ISO 639-1) | `en`, `zh`, `ja` |
| `enrichTrending` | Add topics, license and dates to trending repos (default on) | `true` |
| `query` | GitHub search query with qualifiers | `llm agent`, `topic:rag org:microsoft` |
| `sort` | Search order | `stars`, `updated`, `forks`, `best-match` |
| `minStars` | Search: minimum stars | `1000` |
| `githubToken` | Optional personal access token for higher search limits (stored encrypted) | `ghp_...` |
| `maxItems` | Maximum rows to save (default 100, max 1,000) | `500` |

### Output sample

A trending repository row:

```json
{
  "rank": 1,
  "fullName": "php/php-src",
  "owner": "php",
  "name": "php-src",
  "url": "https://github.com/php/php-src",
  "description": "The PHP Interpreter",
  "language": "C",
  "stars": 41255,
  "starsGained": 287,
  "period": "daily",
  "forks": 8323,
  "builtBy": ["dstogov", "nikic", "weltling", "cmb69", "iliaal"],
  "openIssues": 2228,
  "topics": [],
  "license": "BSD-3-Clause",
  "homepage": "https://www.php.net",
  "createdAt": "2011-06-16T01:52:25Z",
  "pushedAt": "2026-10-23T04:30:00Z",
  "isFork": false,
  "isArchived": false,
  "source": "trending",
  "scrapedAt": "2026-10-23T04:30:55.600Z"
}
```

A trending developer row:

```json
{
  "rank": 1,
  "username": "elie222",
  "name": "Elie Steinbock",
  "url": "https://github.com/elie222",
  "avatarUrl": "https://avatars.githubusercontent.com/u/3090527",
  "popularRepo": "elie222/rakazo",
  "popularRepoUrl": "https://github.com/elie222/rakazo",
  "popularRepoDescription": "Open-source Grok Bot alternative. Choose your own model and sandbox.",
  "period": "daily",
  "source": "trending-developers",
  "scrapedAt": "2026-10-23T04:31:10.000Z"
}
```

| Field | Type | Description |
|---|---|---|
| `rank` | number | Position on the trending page or in the search results |
| `fullName`, `owner`, `name`, `url` | string | Repository identity and link |
| `description`, `language` | string | Repository description and main language |
| `stars`, `forks`, `openIssues` | number | Current counts |
| `starsGained`, `period` | number, string | Stars gained in the trending period (trending mode only) |
| `builtBy` | array | Top contributors shown on the trending page |
| `topics`, `license`, `homepage` | array, string | Repository topics, SPDX license id, website |
| `createdAt`, `pushedAt` | string | Creation date and last push (ISO 8601) |
| `isFork`, `isArchived` | boolean | Repository flags |
| `username`, `name`, `avatarUrl`, `popularRepo*` | string | Developer fields (trending developers mode) |
| `source`, `scrapedAt` | string | Which mode produced the row, and when |

### How much does it cost to scrape GitHub trending?

This Actor uses **pay-per-event** pricing:

- **$0.003 per result saved** ($3 per 1,000 results)
- **$0.00005 per run start** (per GB of memory, a fraction of a cent)

**Worked example:** a daily run of today's trending repositories (up to 25 rows) costs at most 25 × $0.003 = **$0.075**, plus $0.0000125 for the start on 256 MB. That is about **$2.25 per month** for a full daily trending feed. A 1,000-repository search costs **$3.00**. The $5 of monthly free credit on the Apify Free plan covers about 1,600 results.

Set **Max results** or a maximum charge per run, and the Actor stops as soon as it reaches the limit.

### Integrations and API

Call the Actor from your own code with the official `apify-client`, or connect it to Make, Zapier, n8n, Google Sheets, Slack, webhooks and more from the **Integrations** tab.

**Python**

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("deanko/github-trending-scraper").call(run_input={
    "mode": "trending",
    "language": "python",
    "since": "weekly",
})
for repo in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(repo["rank"], repo["fullName"], repo["starsGained"])
```

**JavaScript / Node.js**

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

const client = new ApifyClient({ token: '<YOUR_APIFY_TOKEN>' });
const run = await client.actor('deanko/github-trending-scraper').call({
    mode: 'search',
    query: 'topic:llm',
    minStars: 5000,
    maxItems: 200,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items.length, 'LLM repositories with 5k+ stars');
```

You can also run it with one HTTP request through the `run-sync-get-dataset-items` endpoint and get the rows back in the response.

### FAQ

**Where does the data come from?**
Trending rows come from the public github.com/trending pages. Search rows and the enrichment fields come from the official [GitHub REST API](https://docs.github.com/en/rest/search/search). The data is the same as what you see on GitHub.

**Do I need a GitHub token?**
No. Trending works without one, and search works anonymously at GitHub's limit of 10 requests per minute (100 rows per request). A token with no scopes raises that to 30 requests per minute, so large searches finish about 3x faster. It is stored as an encrypted secret input.

**How many rows does a trending run return?**
Whatever GitHub shows, usually 9 to 25 repositories and up to 25 developers per page. For more results, use search mode.

**How do I track trending over time?**
Schedule the Actor daily (Console → Schedules) and send each run to Google Sheets, a webhook or your database. `scrapedAt`, `rank` and `starsGained` let you build a history.

**Which language names work?**
The same slugs GitHub uses in trending URLs: `python`, `javascript`, `typescript`, `go`, `rust`, `c++`, `c#`, `jupyter-notebook` and so on. Spaces become dashes.

**Why does search stop at 1,000 results?**
The GitHub search API returns at most 1,000 results per query. To get more, split the query by date or star ranges, for example `created:2025-01-01..2025-06-30`.

**What happens if GitHub rate-limits the run?**
The Actor waits for the time GitHub asks for (`retry-after` / `x-ratelimit-reset`) and retries up to 5 times. If enriching a trending page still fails, the rows are saved without topics, license and dates instead of failing the run.

### Limitations

- Trending pages only show what GitHub displays (at most 25 rows). Stars gained comes from the page and isn't available in search mode.
- Topics, license and dates for trending repositories depend on one GitHub API call. It may be skipped under heavy rate limiting, in which case those fields are empty.
- Search mode returns at most 1,000 results per query.
- GitHub can change the trending page layout. Search mode uses the stable REST API.

### Legal and privacy

The data comes from public GitHub pages and the public GitHub API. Only public profile and repository information is collected (no emails). This Actor is not affiliated with or endorsed by GitHub. You are responsible for using the data in line with the GitHub Terms of Service and the laws that apply to you.

### Support and feedback

Missing a field or mode you need, or found a bug? Open an issue in the **Issues** tab on this page. If the Actor saves you time, a short review helps other people find it.

# Actor input Schema

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

What to collect. Trending modes read the GitHub trending page (up to 25 rows per run). Search mode uses the GitHub REST search API (up to 1,000 rows per query).

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

Filter by programming language, for example python, typescript, rust, go, c++, jupyter-notebook. Leave empty for all languages. Works in all modes.

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

Trending modes only: the date range GitHub uses for trending and for the stars gained count.

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

Trending repositories only: ISO 639-1 code of the README language, for example en, zh, ja, ko, es. Leave empty for any language.

## `enrichTrending` (type: `boolean`):

Trending repositories only: fill topics, license, homepage, open issues, created and last-pushed dates with one extra GitHub API call. Turn off for the fastest possible run.

## `query` (type: `string`):

Search mode only: GitHub repository search query. Supports GitHub qualifiers, for example: llm agent, topic:mcp, created:>2026-01-01, org:vercel, in:readme vector database.

## `sort` (type: `string`):

Search mode only: result order.

## `minStars` (type: `integer`):

Search mode only: only repositories with at least this many stars.

## `githubToken` (type: `string`):

Optional GitHub personal access token (no scopes needed). Raises the search limit from 10 to 30 requests per minute, so large searches finish about 3x faster. Stored encrypted.

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

Maximum rows to save. You are charged per row, so this caps your cost ($3 per 1,000 rows; a full trending page of 25 repos is about $0.08).

## Actor input object example

```json
{
  "mode": "trending",
  "language": "",
  "since": "daily",
  "spokenLanguageCode": "",
  "enrichTrending": true,
  "query": "",
  "sort": "stars",
  "minStars": 0,
  "maxItems": 100
}
```

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

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

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

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,deanko/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/PG1wTyh2RekG3dPBT/builds/NpIaSAgriOt8t6HGW/openapi.json
