# GitHub Trending: Top Repos, Most Popular & Starred Repositories (`scrape_api/github-trending`) Actor

GitHub trending scraper: export a list of top repositories by language, daily, weekly or monthly - the most popular and most starred GitHub repos with rank, total stars, stars gained, forks, descriptions and contributor logins as JSON, CSV or Excel for trend reports and developer tool research.

- **URL**: https://apify.com/scrape_api/github-trending.md
- **Developed by:** [Scrape_API](https://apify.com/scrape_api) (community)
- **Categories:** Developer tools, News, Business
- **Features:** Limited permissions
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$1.00 / 1,000 trending repositories

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 for Top GitHub Repos

Get GitHub trending repositories for a programming language and a daily, weekly or monthly period: the top, most starred and most popular GitHub repositories right now, in the order GitHub publishes them. Export the source ranking, total stars, stars gained during the selected period, forks, descriptions and contributor logins as JSON, CSV or Excel.

GitHub Trending is useful for spotting projects that attract developer attention now. Total stars describe the size of an audience, while stars gained describe activity in the chosen window. Keeping both values lets you compare established repositories with projects that have started growing recently. Results follow the order published by GitHub, so the position also remains available for your own comparisons.

### What you can do with GitHub Trending

Build a recurring repository watchlist, prepare a developer tools market report, fill a weekly newsletter or digest, or collect candidates for deeper technical research. Investors can use the list as one signal when reviewing open source activity. Marketing teams can identify active ecosystems and plan research around the languages they support. Trend watchers can save repeated runs and compare which repositories appear across different periods.

A trending position is a snapshot of GitHub's current list. It does not establish revenue, adoption, investment quality or a recommendation to use the software. Compare the ranking with the repository's documentation and other evidence before drawing conclusions. The actor returns the public list rather than calculating a new ranking or estimating missing metrics.

### Input

Choose one programming language and one period per run. Leave `language` empty to select all programming languages. Use the GitHub language slug, such as `python`, `c#` or `c++`. Uppercase letters are normalized, spaces become hyphens, and percent-encoded language names are decoded before the request is made. An unrecognized language produces a clear input error rather than a misleading empty list. A name that GitHub itself resolves but that is not a slug from its language menu, such as `golang`, is not accepted either: the error names the canonical slug to use instead, for example `use 'go'`.

Set `since` to `daily`, `weekly` or `monthly`. The default is `daily`. Set `max_items` to an integer between 1 and 25 to control how many repositories you receive. GitHub publishes a single list and may provide fewer entries than your requested maximum. The actor preserves that source order and stops at your limit.

The optional `spoken_language_code` accepts a lowercase two-letter language code, such as `en`. It filters the spoken language used by GitHub for the list. This is separate from `language`, which selects the programming language. Leave it empty to avoid applying a spoken-language filter. No GitHub login, token or repository access permission is needed for these public results.

For example, this input selects the weekly Python list:

```json
{"language": "python", "since": "weekly", "max_items": 25}
```

### Output

Each dataset row represents one repository. `full_name` holds the stable `owner/name` identity, while `url` links to its public repository page. `owner` and `name` are also supplied separately. `source` identifies this product, `platform` is `github`, and `fetched_at` records the retrieval time in UTC.

The row includes `description`, the repository's displayed programming `language`, total `stars`, total `forks`, `trend_period`, `stars_gained`, the one-based `position` in the list, and `built_by`, a list of up to five public contributor logins shown by GitHub. A missing description or programming language is returned as null. Missing text is not replaced with an invented value. A reported zero in `stars_gained` remains zero.

`stars_gained` always belongs to the selected period. For a weekly run it means the stars GitHub reports for that week, not today's count and not the repository's lifetime total. `position` describes the current list; it is not a global repository ranking. The contributor logins reflect the public Built by section and do not claim to list every contributor.

#### One real row

This is the first row a live run returned for `{"since": "daily", "max_items": 3}` on 2026-11-06 — one dataset row, unchanged:

```json
{
  "source": "github-trending",
  "fetched_at": "2026-11-06T23:56:44.062Z",
  "platform": "github",
  "full_name": "zed-industries/zed",
  "url": "https://github.com/zed-industries/zed",
  "owner": "zed-industries",
  "name": "zed",
  "description": "Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.",
  "language": "Rust",
  "stars": 93604,
  "forks": 11499,
  "trend_period": "daily",
  "stars_gained": 292,
  "position": 1,
  "built_by": ["as-cii", "maxbrunsfeld", "maxdeviant", "nathansobo", "ConradIrwin"]
}
```

Star counts and positions are the values at that moment in time. A later run for the same input returns the same fields with the numbers GitHub published then.

Download the dataset in JSON, CSV or Excel, or retrieve it through the Apify API. Use `platform` and `full_name` to connect these rows to repository records from other tools. If another dataset stores repository URLs instead of owner/name identities, compare those values against `url` after applying suitable normalization.

### GitHub Trending compared with the alternatives

| What you might use instead | What it gives you | What this actor adds |
|---|---|---|
| GitHub's own trending page in a browser | The same list, one language and one period at a time, read by eye | Dataset rows you can schedule, filter and export as JSON, CSV or Excel |
| A general GitHub repository scraper, such as our [GitHub Scraper](https://apify.com/s-r/github-scraper) actor | Repository statistics from a search query, a repository name or a URL | The trend window: `stars_gained`, `position` and `trend_period` only exist on the trending list itself, so a repository lookup cannot produce them |
| Community dashboards such as TrendShift or OSSInsight | Pages that display the same trending lists and star history for reading | One row per repository with a stable `full_name`, ready to join with your own repository or package data |
| Reading lists in newsletters and blog posts | Curated picks with commentary | The unchanged source order with rank and stars gained, so your own comparison starts from the same list everyone else sees |

Compared with scraping the page yourself, the difference is maintenance: language slugs such as `c#` and `c++`, the singular `1 star today` label, a repository without a description and a period that appears both in the page header and in every row are all handled, and a broken or wrong response is reported as an error instead of delivered as an empty list.

### Pricing

The billing unit is one delivered trending repository. Limiting `max_items` limits the number of dataset rows returned. The current price and any applicable platform charges appear in the actor's Pricing tab; review them before running. An empty result does not create repository events, and a failed request does not create repository rows.

Runs by users on Apify's free plan are limited to at most ten delivered repositories. That limit controls delivery and does not promise that dataset rows are free of the charges shown in the Pricing tab. Paying users can request up to the full single-page limit of 25 repositories.

### Limits and data freshness

There is no pagination or historical archive in this product. A new run fetches the current list for the selected filters. Save repeated runs in your own storage if you want to build a time series. Repositories may enter or leave the list, and their star counts can change between requests. The timestamp helps you distinguish those snapshots.

The actor does not add topics, license information, README contents or repository activity dates. Those fields require a separate repository lookup. It also does not return trending developers: its rows describe repositories. A temporary source failure is reported as an error so that it cannot be mistaken for a real list with no matches.

### FAQ

#### Why did I receive fewer repositories than max_items?

GitHub decides the length of the current list. `max_items` is an upper bound, so requesting 25 does not guarantee 25 rows. A free-plan delivery limit may also reduce the number returned.

#### How are total stars different from stars_gained?

`stars` is the repository's lifetime total displayed on the page. `stars_gained` is the gain GitHub displays for your daily, weekly or monthly window. Both values are integers and are kept separate.

#### Can I request several languages in one run?

Each run accepts one programming language and one period. Start separate runs for additional combinations and retain the input alongside your saved snapshots if you need to compare lists.

#### Can I retrieve past trending lists?

This actor retrieves the current public list. Schedule your own repeated runs and save their datasets to build a history from the dates you collect onward.

#### Do I need a GitHub account or token?

No. The results come from a public page, so no login, token or repository permission is involved. The optional `spoken_language_code` filter is also public input and does not change that.

#### Are these the top GitHub repos of all time?

No. These are the repositories GitHub ranks first for the period you selected, so a repository can appear for one week and leave the next. The `stars` column holds the lifetime total and `stars_gained` holds the growth inside the window, which is what separates a new project from a large established one. For an all-time ordering, sort the totals across the snapshots you keep.

#### Are there other GitHub Trending scrapers on the Apify Store?

Yes, several actors read the same public list. Compare their fields, their pricing model and their reviews before you choose. The rows here keep the source order, carry the trend window (`stars_gained`, `position`, `trend_period`) and identify repositories by `full_name` so they join with repository data you already hold.

# Actor input Schema

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

GitHub language slug, such as python, c# or c++. Empty selects all languages. Spaces become hyphens and percent-encoding is decoded.

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

Daily, weekly or monthly trending list.

## `spoken_language_code` (type: `string`):

Optional lowercase ISO 639-1 two-letter language filter, such as en. Empty disables the filter.

## `max_items` (type: `integer`):

Maximum rows to return. GitHub publishes one list with no pagination and may provide fewer than this number.

## Actor input object example

```json
{
  "language": "",
  "since": "daily",
  "spoken_language_code": "",
  "max_items": 25
}
```

# Actor output Schema

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

One dataset row per trending repository.

## `output` (type: `string`):

Run summary and status.

# 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 = {};

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

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

```

## MCP server setup

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