# GitHub Trending Scraper — Trending Repos, Stars & Topics (`fabrikit/github-trending-scraper`) Actor

GitHub Trending scraper: daily, weekly or monthly trending repositories by programming language and spoken language, with stars, forks, stars gained in the period and description. Optional GitHub API details (topics, license, dates, open issues) and repo search. From US$0.80 per 1,000 repos.

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

## Pricing

from $0.80 / 1,000 repository scrapeds

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

GitHub Trending Scraper extracts the trending repositories from github.com/trending (today, this week or this month) for any programming language and spoken language, and returns one clean JSON record per repository: trending rank, owner and name, description, main language, total stars, forks and the stars gained in the period. Turn on the optional GitHub API step to add topics, license, homepage, creation and last-push dates, open issues and watchers, or run GitHub repository searches in the same run. Plain HTTP, no browser, no login, no proxy needed for the default input.

### What you get

| Field | Example (LadybirdBrowser/ladybird, C++ list, today) |
|---|---|
| `rank`, `period`, `listLanguage`, `listSpokenLanguage` | 1, daily, C++, null |
| `fullName`, `owner`, `name`, `url`, `repoId` | LadybirdBrowser/ladybird, LadybirdBrowser, ladybird, https://github.com/LadybirdBrowser/ladybird, 808045485 |
| `description` | Truly independent web browser |
| `language`, `languageColor` | C++, #f34b7d |
| `stars`, `forks`, `starsInPeriod` | 66664, 3173, 26 (stars gained today) |
| `topics`, `license`, `licenseName`, `homepage` | \["browser", "browser-engine"], BSD-2-Clause, BSD 2-Clause "Simplified" License, https://ladybird.org |
| `createdAt`, `updatedAt`, `pushedAt` | ISO 8601 timestamps |
| `openIssues`, `watchers`, `defaultBranch`, `sizeKb` | 566, 303, master, 548132 |
| `ownerType`, `archived`, `isFork`, `isTemplate`, `hasDiscussions` | Organization, false, false, false, false |
| `source`, `trendingUrl`, `searchQuery`, `detailsStatus`, `scrapedAt` | where the record came from and whether API details were added |

The fields from `topics` to `hasDiscussions` are filled when **Add GitHub API details** is on (and always for search results). Developer rankings and the "Built by" contributor avatars are not collected: the dataset describes repositories, not people.

### Use cases

- **Tech trend monitoring**: schedule a daily run and keep a history of what developers star each day, per language, to spot new frameworks, AI tools or libraries before they reach the news.
- **Newsletters and social posts**: "top 10 trending Rust repos this week" with stars gained, description and license, ready for a template.
- **Developer marketing and DevRel**: watch which projects in your niche (vector databases, MCP servers, front-end tooling) are gaining stars and how fast.
- **Investors and analysts**: open-source traction as a signal; combine `starsInPeriod` with `createdAt` to find young projects growing quickly.
- **AI agents and RAG**: give an agent a fresh, structured list of what is trending instead of letting it guess from stale training data.

### Input

```json
{
    "periods": ["daily", "weekly"],
    "languages": ["all", "Python", "TypeScript", "Rust"],
    "spokenLanguage": "any",
    "maxItems": 100,
    "includeRepoDetails": true,
    "githubToken": "github_pat_...",
    "searchQueries": ["topic:llm stars:>200"],
    "searchSort": "stars",
    "searchCreatedWithinDays": 30,
    "maxResultsPerQuery": 50
}
```

- `periods`: `daily`, `weekly` and/or `monthly`. Each period × language pair is one trending list of up to 25 repositories (GitHub sometimes shows fewer).
- `languages`: GitHub's language names (`Python`, `C++`, `C#`, `Jupyter Notebook`...) or `github.com/trending/<language>` URLs. Empty = the all-languages list; `all` adds it next to specific languages. Unknown names are skipped with a warning and close matches are suggested.
- `spokenLanguage`: GitHub's own filter by the language of the README / description (`en`, `zh`, `es`, `ja`...). It is strict: a narrow combination can be empty.
- `maxItems` is exact across all lists and searches. Within one period a repository is saved once even if it shows up in several language lists.
- `includeRepoDetails`: one GitHub API request per repository. Without a token GitHub allows 60 per hour per IP; beyond that the repositories are still saved, with `detailsStatus: "rate-limited"`.
- `githubToken` (optional, secret): raises the API limits to 5,000 requests per hour and 30 searches per minute. A fine-grained token with no extra permissions works. It is only sent to api.github.com.
- `searchQueries`: GitHub repository search syntax (`topic:`, `language:`, `stars:>`, `created:>=`, `in:name`...). `searchCreatedWithinDays` adds a creation-date window to every query.

### Output example

```json
{
    "source": "trending",
    "rank": 1,
    "fullName": "LadybirdBrowser/ladybird",
    "owner": "LadybirdBrowser",
    "name": "ladybird",
    "url": "https://github.com/LadybirdBrowser/ladybird",
    "description": "Truly independent web browser",
    "language": "C++",
    "languageColor": "#f34b7d",
    "stars": 66664,
    "forks": 3173,
    "starsInPeriod": 26,
    "period": "daily",
    "listLanguage": "C++",
    "listSpokenLanguage": null,
    "trendingUrl": "https://github.com/trending/c++?since=daily",
    "searchQuery": null,
    "repoId": 808045485,
    "detailsStatus": "ok",
    "ownerType": "Organization",
    "topics": ["browser", "browser-engine"],
    "license": "BSD-2-Clause",
    "licenseName": "BSD 2-Clause \"Simplified\" License",
    "homepage": "https://ladybird.org",
    "createdAt": "2024-05-30T09:18:10Z",
    "updatedAt": "2026-10-25T04:23:40Z",
    "pushedAt": "2026-10-25T04:25:28Z",
    "openIssues": 566,
    "watchers": 303,
    "defaultBranch": "master",
    "sizeKb": 548132,
    "archived": false,
    "isFork": false,
    "isTemplate": false,
    "hasDiscussions": false,
    "scrapedAt": "2026-10-25T05:19:15.992Z"
}
```

A `SUMMARY` record in the key-value store lists every trending list and search with how many repositories were found and saved, the API rate-limit state, warnings and errors.

### Pricing

Pay per event: **US$0.80 per 1,000 repositories** (US$0.0008 each), API details included, plus Apify's small start fee per run.

- Today's all-languages list (up to 25 repositories): about US$0.02.
- Daily + weekly + monthly for 10 languages (up to 750 repositories): about US$0.60.
- 1,000 repositories from searches: US$0.80.

You can cap spending with the maximum charge per run in Apify; the Actor stops cleanly at that limit.

### How it compares

- **GitHub's REST API** has no trending endpoint. Stars gained "today / this week / this month" exist only on the trending page, which this Actor reads, and its API step fills in what the page does not show.
- **Other GitHub trending Actors in the Store**: the most used one charged US$1.15 per 1,000 results when we checked (October 2026). This one costs US$0.80 and puts several periods, languages, the spoken-language filter and repository search into one dataset with one schema.

### Related Actors

- [OpenAlex Scraper](https://apify.com/fabrikit/openalex-papers-scraper): the Actor this one is built on (same HTTP client pattern), for scholarly papers with citations and abstracts.
- [Hacker News Scraper](https://apify.com/fabrikit/hacker-news-scraper): the other place developers talk about new projects; pair the two for a daily tech-trends digest.

### Integrations

Use it from the Apify API (`/v2/datasets/{id}/items?format=json`, CSV or Excel), schedule it daily, or connect it to n8n, Make, Zapier, Google Sheets, Slack or Airbyte. AI agents can call it as a tool through the Apify MCP server, and LangChain / LlamaIndex can load the dataset directly.

### FAQ

**Is this legal?** The Actor reads public pages and the public GitHub API, the same data any visitor sees without logging in. It collects repository facts only; contributor avatars and developer rankings are left out and e-mail addresses are removed from descriptions. Follow GitHub's terms and each repository's license when you reuse the data.

**Do I need a proxy?** No. The trending pages load directly. If GitHub ever refuses them on the Apify platform, the Actor switches by itself to Apify datacenter and then residential proxy for those pages only. API requests always go out directly and are never rotated to get around GitHub's limits.

**What are the limits?** Each trending list has at most 25 repositories (that is GitHub's page). Without a token the API gives 60 detail requests per hour per IP, and on Apify's shared IPs that budget may already be used by others, so add a free token if you need details for every repository. Searches return at most 1,000 repositories per query.

**Why do I get fewer than 25 repositories?** GitHub decides the list length; spoken-language filters and rare languages often return short or empty lists. The run log and the status message say so when a list is empty.

**Is my token safe?** It is a secret input: encrypted by Apify, sent only to api.github.com, never written to the dataset or the logs. A fine-grained token with no permissions is enough.

### Changelog

- **0.1** (October 2026): first release. Trending lists by period, language and spoken language; optional GitHub API details; repository search with sort and creation-date window; exact `maxItems`, per-period dedupe and pay-per-event charge limit.

***

### En español

GitHub Trending Scraper extrae los repositorios en tendencia de github.com/trending (hoy, esta semana o este mes) por lenguaje de programación e idioma, con ranking, estrellas, forks, estrellas ganadas en el período, lenguaje y descripción. Opcionalmente agrega datos de la API de GitHub (temas, licencia, fechas, issues abiertos) y búsquedas de repositorios. Sin navegador ni proxy; token de GitHub opcional para más consultas por hora. No recopila perfiles de personas. Precio: US$0,80 por cada 1.000 repositorios.

# Actor input Schema

## `periods` (type: `array`):

Trending lists to read: daily (stars gained today), weekly (this week) and/or monthly (this month). The same repository can appear once per period, each time with the stars gained in that period.

## `languages` (type: `array`):

One trending list per language, as GitHub names it: Python, TypeScript, Rust, Go, C++, C#, Jupyter Notebook, Unknown languages... (a github.com/trending/<language> URL also works). Leave empty for the all-languages list; add "all" to get it next to specific languages. A repository already saved for a period from an earlier list is not saved again.

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

Only repositories whose README / description is written in this language (GitHub's own spoken-language filter, applied to every list).

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

Stop after this many repositories in total across all lists and searches (exact). Each trending list holds up to 25 repositories.

## `includeRepoDetails` (type: `boolean`):

Look up each trending repository in the GitHub REST API to add topics, license, homepage, creation / last push dates, open issues, watchers, default branch, size and archived / fork / template flags. One API request per repository: without a token GitHub allows 60 per hour per IP, so for more than ~50 repositories per hour add a token below. Repositories beyond the limit are still saved, with detailsStatus "rate-limited".

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

Personal access token used only for api.github.com requests (details and searches): 5,000 requests per hour and 30 searches per minute instead of 60 and 10. A fine-grained token with public-repository read access and no extra permissions is enough (https://github.com/settings/personal-access-tokens). Never written to the dataset or the logs.

## `searchQueries` (type: `array`):

GitHub repository search queries run through the API, in GitHub's search syntax, e.g. "topic:llm stars:>500", "language:rust created:>=2026-10-01", "mcp server in:name,description". Results come with topics, license and dates included and source = "search".

## `searchSort` (type: `string`):

Order of the search results.

## `searchCreatedWithinDays` (type: `integer`):

Adds created:>=<date> to every search query that has no created: filter of its own. With sort "Most stars" this lists the new repositories that collected the most stars, e.g. 7 for this week's breakout projects.

## `maxResultsPerQuery` (type: `integer`):

Maximum repositories per search query (GitHub returns at most 1,000 per query, 100 per request).

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

Trending pages load without a proxy. If GitHub ever refuses them on Apify, the Actor moves by itself to Apify datacenter and then residential proxy for those pages. API requests always go out directly.

## Actor input object example

```json
{
  "periods": [
    "daily"
  ],
  "languages": [],
  "spokenLanguage": "any",
  "maxItems": 25,
  "includeRepoDetails": false,
  "searchSort": "stars",
  "maxResultsPerQuery": 100,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `repositories` (type: `string`):

One record per repository and trending period (search results once per query set)

## `summary` (type: `string`):

Lists and searches done, API rate-limit state, warnings and errors

# 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 = {
    "periods": [
        "daily"
    ],
    "languages": [],
    "maxItems": 25,
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("fabrikit/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 = {
    "periods": ["daily"],
    "languages": [],
    "maxItems": 25,
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("fabrikit/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 '{
  "periods": [
    "daily"
  ],
  "languages": [],
  "maxItems": 25,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call fabrikit/github-trending-scraper --silent --output-dataset

```

## MCP server setup

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