# GitHub Trending Scraper · Daily star gains · $1/1K (`mlg14/github-scraper`) Actor

Get GitHub trending repositories for open-source research, tech scouting and developer newsletters. Rank, star gains, topics, license and optional README by language and period. $1/1K trending repositories, no login.

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

## Pricing

$1.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

Scrape GitHub trending repositories by programming language, spoken language, and time period. Export GitHub trending data to JSON, CSV, or Excel with ranks, star gains, contributors, repository metadata, and optional README text. This actor offers a structured GitHub trending API alternative for public repository discovery and repeatable snapshots.

The actor reads the public trending list and preserves each repository's rank on the exact list requested. It then requests public repository metadata to add topics, license, timestamps, and repository details. A single run can collect several programming language lists, which is useful when one list contains fewer repositories than a research project needs.

### What data can you extract from GitHub?

Each dataset item represents one appearance of a repository on one trending page. If the same repository appears under two selected programming languages, each appearance keeps its own rank and source URL. The fields are flat except for the short `builtBy` contributor list and the `topics` array.

| Field | Description | Example |
| --- | --- | --- |
| `rank` | Position on the requested trending page, starting at one | `1` |
| `owner` | Repository owner login | `example-owner` |
| `name` | Repository name | `example-repo` |
| `fullName` | Owner and repository name | `example-owner/example-repo` |
| `url` | Public repository URL | `https://github.com/example-owner/example-repo` |
| `description` | Description shown on the trending page | `A small web framework` |
| `language` | Primary programming language displayed there | `Python` |
| `stars` | Current total stars displayed on the list | `37699` |
| `forks` | Current total forks displayed on the list | `5446` |
| `starsToday` | Stars gained during the selected period | `2623` |
| `starsGrowthPercent` | Period gains divided by the previous star total, times 100 | `7.48` |
| `starsPeriod` | Period used for `starsToday` | `weekly` |
| `topics` | Public topic tags from repository metadata | `["web", "cli"]` |
| `license` | License SPDX identifier, if available | `Apache-2.0` |
| `lastUpdated` | Timestamp of the latest repository push | `2026-09-21T21:10:41Z` |
| `readmeContent` | README markdown when requested and available | `# Project...` |
| `builtBy` | Public contributor handles and avatar URLs shown on the trending list | `[ {"username": "user", "avatar": "https://..."} ]` |
| `repoId` | Public numeric repository identifier | `1165056385` |
| `homepage` | Homepage URL in repository metadata | `https://example.org` |
| `openIssues` | Open issue and pull request count reported by repository metadata | `223` |
| `defaultBranch` | Default branch name | `main` |
| `createdAt` | Repository creation timestamp | `2026-02-23T19:24:50Z` |
| `trendingLanguage` | Programming language filter for this rank | `python` |
| `trendingUrl` | Exact trending page URL used for this item | `https://github.com/trending/python?since=weekly` |
| `scrapedAt` | UTC time when the row was extracted | `2026-09-26T23:53:31.668537Z` |

`starsToday` is retained as a familiar field name across daily, weekly, and monthly runs. Read `starsPeriod` with it: on a weekly run, it means stars gained during the week. `starsGrowthPercent` is calculated using the displayed total and the displayed period gain. The two star figures are snapshots, so slight changes during a run can affect the computed percentage. A null percentage means a usable previous total could not be calculated.

### How to scrape GitHub trending repositories

1. Choose one programming language in `language`, or list several language slugs in `languages`. Leave both empty for the general trending list.
2. Select `daily`, `weekly`, or `monthly` in `since`. Add a `spokenLanguageCode` only when you want that public page filter.
3. Set `maxRepos` to cap output across all selected pages. Enable `includeReadme` only when full documentation is useful to your workflow.
4. Run the actor and open the default dataset. Download its rows as JSON, CSV, or Excel, or read the dataset from an automated workflow.

The programming language values follow the slugs used in trending URLs. For example, `python`, `javascript`, and `rust` select three different lists. The actor visits them in the order supplied. A single `language` value is ignored when `languages` contains at least one entry. Repeated entries in `languages` are removed before requesting pages.

### Input

| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
| `language` | string | `""` | One programming language slug; empty means all languages. |
| `languages` | string array | `[]` | Optional list of language slugs collected in one run; takes precedence over `language`. |
| `since` | string | `"daily"` | Trending period: `daily`, `weekly`, or `monthly`. |
| `spokenLanguageCode` | string | `""` | Optional spoken language code, such as `en` or `zh`. |
| `aiOnly` | boolean | `false` | Keep repositories whose public topics or description indicate machine learning or related work. |
| `filterTopics` | string array | `[]` | Keep rows with at least one matching public repository topic. |
| `includeReadme` | boolean | `false` | Request README markdown for each selected repository when available. |
| `maxRepos` | integer | `0` | Maximum output rows across the whole run; zero means all visible rows. |
| `githubToken` | secret string | unset | Optional credential for a larger public repository metadata allowance. |
| `proxyConfiguration` | object | enabled | Connection configuration for the public trending pages and metadata requests. |

A practical input for a weekly watchlist is:

```json
{
  "languages": ["python", "javascript", "rust"],
  "since": "weekly",
  "maxRepos": 35,
  "includeReadme": false
}
```

This input was used in the golden run. It returned 35 items: the actor stopped at the specified cap after visiting the selected lists. Every returned item had a rank, owner, repository name and URL, star and fork totals, period star gain, source list, and extraction timestamp. All 35 also received public repository metadata in that run. Counts will change as the live trending pages change.

To focus on a topic, use `filterTopics`, for example `["rust", "database"]`. A repository passes if at least one of its public tags matches exactly, ignoring case. This filter depends on successful metadata requests. `aiOnly` checks topic tags and description phrases; it is a broad discovery filter and may include or miss edge cases. Apply your own review if classification affects a decision.

### Output example

This is one item from the weekly golden run, with identifying handles and links redacted. The contributor array is shortened here; the actual item contained five public handles and avatar URLs shown on the page.

```json
{
  "rank": 1,
  "owner": "[redacted]",
  "name": "[redacted]",
  "fullName": "[redacted]",
  "url": "[redacted]",
  "description": null,
  "language": "Python",
  "stars": 37699,
  "forks": 5446,
  "starsToday": 2623,
  "starsGrowthPercent": 7.48,
  "starsPeriod": "weekly",
  "topics": [],
  "license": "Apache-2.0",
  "lastUpdated": "2026-09-21T21:10:41Z",
  "readmeContent": null,
  "builtBy": [{"username": "[redacted]", "avatar": "[redacted]"}],
  "repoId": 1165056385,
  "homepage": null,
  "openIssues": 223,
  "defaultBranch": "main",
  "createdAt": "2026-02-23T19:24:50Z",
  "trendingLanguage": "python",
  "trendingUrl": "https://github.com/trending/python?since=weekly",
  "scrapedAt": "2026-09-26T23:53:31.668537Z"
}
```

The displayed description was empty for this repository, so `description` is null. An empty `topics` array can mean the repository has no public tags; if a metadata request is limited or fails, the actor keeps page fields and the metadata fields may also be empty. README content stays null when `includeReadme` is false.

### Use cases

- **Technology watchlists:** Save a daily or weekly snapshot and compare which repositories entered, left, or moved within a language's ranking.
- **Programming language research:** Collect the same period across several language lists, then compare star gains or repository types using `trendingLanguage`.
- **Repository discovery:** Filter by public topic tags to find projects related to a defined technical area, and inspect the project pages for context.
- **Documentation collections:** Include README markdown for a small selected set of public repositories when the text itself is needed for an internal index.
- **Newsletter preparation:** Export a shortlist containing links, concise descriptions, recent star gains, and source ranking for editorial review.
- **Open source monitoring:** Track public license identifiers, default branches, and last push timestamps alongside trend changes over time.

A trending position describes attention on the selected public list. It is not a quality score, security assessment, or guarantee of continued growth. Star gains are the site's displayed period values, while `stars` and `forks` are live totals from the same page view. Keep the source URL and extraction time if you compare results collected on different dates.

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

The configured result event price is **$0.001 per output row, or $1 per 1,000 results ($1/1K)**. A run that produces 35 rows therefore has a result charge of $0.035. A 100-row export across several selected language pages has a result charge of $0.10; 1,000 output rows across repeated runs total $1.00 in result charges. The platform presents the applicable charges before a run, and account pricing can change.

| Scenario | Output rows | Result event charge |
| --- | ---: | ---: |
| One short language list | 15 | $0.015 |
| Three language lists with a cap | 35 | $0.035 |
| Repeated watchlist snapshots | 1,000 total | $1.00 |

One public trending page commonly has roughly a few dozen rows or fewer. The exact count varies with period, language, spoken language, and the live site. `maxRepos` limits emitted rows, not the number of repository pages downloaded before an output filter finds matches. Selecting `includeReadme` adds requests, and a large list of languages increases run time. Connection and platform usage may be shown separately by the platform; the table above describes the result event price.

### Tips for best results

Start with one broad list to inspect available repositories and fields. Then choose language or topic filters that fit the question you are trying to answer. The general page and language pages have separate rankings, so do not compare `rank: 1` across pages as if it were a shared global position. Use `trendingLanguage`, `since`, and `trendingUrl` to keep each rank in context.

When you need at least 30 rows, request several language pages. In the tested weekly snapshot, the Python page showed 16 rows, the JavaScript page showed 14, and the Rust page showed 21. The golden input selected all three and capped output at 35. These are observations from one date, not guaranteed list sizes. If the same repository appears on multiple pages, the actor emits both appearances because the rank and source list differ.

Use `filterTopics` when you need exact topic matches. Public topic tags are retrieved from repository metadata; a repository without tags does not match. If you need a wider thematic set, `aiOnly` also checks description phrases. A blank description can still match when the repository has a relevant tag. If metadata is limited, description matching remains possible but a tag-only match may be missed.

Only enable `includeReadme` for runs where markdown is required. The extra request per repository can make long runs slower and can exhaust an anonymous request allowance. A private input token can improve metadata coverage for recurring or large collections. The actor does not print that credential or add it to dataset items. Use a credential with only the access required for public repository reads.

For historical analysis, schedule repeat runs and save each dataset. The trending pages expose a current ranking rather than a built-in history of prior ranks. `scrapedAt` records when each row was extracted. Comparing runs means joining on `fullName`, `trendingLanguage`, and `starsPeriod`, then ordering by `scrapedAt`. A repository can be absent because it dropped off the visible list, because a filter removed it, or because the source list was shorter that day.

### Limits

Trending pages do not provide a normal next-page control for older or lower-ranked results. This actor collects the rows visible on each requested page; `maxRepos: 0` means all visible rows, not all repositories on the site. The golden snapshot observed 14 to 21 rows per selected language page. The general and spoken-language pages can have different counts.

Repository metadata and README text come from separate public requests. Without a token, those requests can be rate limited; a failed metadata request leaves the trending-page fields intact and sets some enrichment fields to null or empty arrays. Some repositories have no description, topics, homepage, license, or README even when metadata requests succeed. `lastUpdated` is the most recent push timestamp, which differs from the time the repository entered trending.

`filterTopics` works from fetched topic tags. If a metadata limit is reached, fewer rows may pass that filter. A maximum output cap applies after filters, so requesting 10 results with a restrictive topic filter can still inspect more than 10 repositories. Topic matching ignores case but does not expand synonyms. `aiOnly` uses a fixed group of public tags and description phrases, so it is suitable for discovery rather than definitive classification.

The actor reads public repository and contributor details shown on the source pages. `builtBy` is the short contributor list displayed on trending; it is not a full contributor roster. The actor does not visit private repositories or authenticate to user accounts. If the public page changes its markup, fields sourced from that page may need an update.

### Use with AI agents (MCP)

Add this actor to any MCP client (Claude, Cursor, VS Code, n8n...) with one URL:

`https://mcp.apify.com?tools=mlg14/github-scraper`

An agent gets back one row per trending repository with rank, owner, name, stars, forks, star gain, topics and license. Keep `maxRepos` at 20 or less for quick answers; each row carries its trending list and period.

**Prompt 1:** "Show this week's trending Python repositories on GitHub."

```json
{"languages": ["python"], "since": "weekly", "maxRepos": 20}
```

**Prompt 2:** "What are today's trending machine learning repositories on GitHub?"

```json
{"since": "daily", "aiOnly": true, "maxRepos": 20}
```

**Prompt 3:** "Find monthly trending Rust repositories tagged database, with README text."

```json
{"language": "rust", "since": "monthly", "filterTopics": ["database"], "includeReadme": true, "maxRepos": 10}
```

### FAQ

#### Is it legal to collect this data?

The actor requests publicly visible trending and repository information. Your use of the exported data should follow applicable site terms, privacy rules, and your own purpose. Review data use requirements before redistributing contributor details or creating profiles of individuals.

#### Do I need to configure a proxy?

The default connection configuration is ready for typical runs. You can supply `proxyConfiguration` when your account or environment needs different routing. The golden run completed with its default settings and did not need a browser challenge or a proxy escalation.

#### How fast is a run?

Duration depends mostly on how many trending pages and repository metadata requests are made. The 35-result golden run completed on the platform in about 43 seconds after the build. README requests add work. Live site latency and rate limits can change run time.

#### Can I schedule a daily watchlist?

Yes. Schedule the same input daily or weekly and retain the resulting datasets. Compare rows using `fullName` plus the source page and period. A run provides the current visible list; it does not recreate rankings from dates before the first scheduled snapshot.

#### Can I export to a spreadsheet?

Yes. Download the default dataset as CSV or Excel, or connect a workflow that reads dataset items. Arrays such as `topics` and `builtBy` may be serialized into cells; JSON preserves their original structure.

#### Why is a field empty?

Some repositories omit optional information. Metadata fields can also be missing when a public metadata request fails or is rate limited. `readmeContent` is null unless requested and successfully fetched. The source `trendingUrl` lets you check what the trending page displayed at extraction time.

#### Why does `starsToday` show a weekly value?

The field name stays stable across periods, but the value always reflects the selected period. Read `starsPeriod` alongside it. For `since: "weekly"`, it represents the displayed stars gained this week; for `monthly`, it represents the displayed monthly gain.

### Integrations

Run this actor on a schedule, read results through the platform API, or connect dataset completion to a webhook. Export the dataset for spreadsheets and other workflow services. A downstream process can filter, sort, and compare the flat repository records without parsing HTML or recomputing page rank.

### Support

Open an issue on the Issues tab; we reply within 24h and add fields on request.

# Actor input Schema

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

Programming language slug of the GitHub trending page. Example: python or rust. Use for one language; leave empty for all languages. Ignored when languages is not empty.

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

List of language slugs to collect several GitHub trending pages in one run; each keeps its own rank. Example: \["python", "javascript"]. Use instead of language for several lists.

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

Trending period. Allowed values: daily, weekly, monthly (today, this week, this month). Example: weekly. Use daily for fresh news, monthly for broader research.

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

Spoken language code to filter the trending page by. Example: en or zh. Use to see projects by language of the community; leave empty for all spoken languages.

## `aiOnly` (type: `boolean`):

Keep only repositories whose topics or description indicate machine learning. Allowed values: true or false. Example: true for AI trends. Leave false for all repositories.

## `filterTopics` (type: `array`):

Keep repositories having at least one of these topics. Example: \["database", "rust"]. Use to narrow to a niche; leave empty to disable. Needs repository metadata requests.

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

Whether to fetch each repository's README markdown. Allowed values: true or false. Example: true. Use for documentation analysis; leave false for faster runs, as it adds a request per repository.

## `maxRepos` (type: `integer`):

Maximum repositories returned across all selected pages, 0 or higher. Example: 20. Set 0 to return every visible row; use a small value to bound cost at $0.001 per repository.

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

Optional GitHub personal access token for higher metadata rate limits. Example: ghp_xxxxxxxx. Use for large runs or README fetching; leave empty otherwise. Never included in output.

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

Proxy settings for trending pages and metadata requests. Example: {"useApifyProxy": true}. Use the default Apify proxy unless you need a specific country.

## Actor input object example

```json
{
  "language": "",
  "languages": [],
  "since": "daily",
  "spokenLanguageCode": "",
  "aiOnly": false,
  "filterTopics": [],
  "includeReadme": false,
  "maxRepos": 0,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

Trending repository rows in the default dataset.

# 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 = {
    "language": "",
    "languages": [],
    "since": "daily"
};

// Run the Actor and wait for it to finish
const run = await client.actor("mlg14/github-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 = {
    "language": "",
    "languages": [],
    "since": "daily",
}

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

```

## MCP server setup

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