# GitHub Trending Scraper — Trending Repos by Language (`ponderable_hydrometer/github-trending`) Actor

GitHub trending scraper: the trending repositories (repos) for today, this week or this month, for any programming language. Rank, repo, description, language, total stars, forks and stars gained in the period. Schedule it daily to track rising open-source projects.

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

## Pricing

from $0.50 / 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 by Language

**What developers are starring right now.** The GitHub trending list for any programming language and window (today, this week, this month), as rows you can store and compare. Schedule it daily to spot rising tools early, watch a language ecosystem, or feed a newsletter.

### What you can do with it

- **Spot rising open-source projects** before they are everywhere: `starsInPeriod` shows stars gained in the window.
- **Watch a language ecosystem**: one list per language, for example Python, TypeScript and Rust in a single run.
- **Feed a newsletter or a dashboard** with a fresh ranking each day.
- **Build a history**: schedule it daily; every row carries `capturedAt` and `rank`, so you can chart a repo's climb.

### Input

| Field | Type | Default | Description |
|-------|------|---------|-------------|
| `languages` | array | all languages | Language slugs, e.g. `python`, `typescript`, `rust`. One trending list per entry. |
| `since` | string | `daily` | `daily`, `weekly` or `monthly`. |
| `spokenLanguage` | string | — | Optional spoken-language code, e.g. `en`, `zh`. |

Input example:

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

### What you get

One row per repository: `since`, `languageFilter`, `rank`, `repo`, `owner`, `name`, `description`, `language`, `stars`, `forks`, `starsInPeriod`, `url`, `capturedAt`.

### Output sample

```json
{
  "since": "daily",
  "languageFilter": "python",
  "rank": 1,
  "repo": "microsoft/markitdown",
  "owner": "microsoft",
  "name": "markitdown",
  "description": "Python tool for converting files and office documents to Markdown.",
  "language": "Python",
  "stars": 61234,
  "forks": 3210,
  "starsInPeriod": 1204,
  "url": "https://github.com/microsoft/markitdown",
  "capturedAt": "2026-11-15T22:00:00.000Z"
}
```

### Use it from the API or an AI agent

Start a run and read the trending repos back in one HTTP call:

```bash
curl -X POST "https://api.apify.com/v2/acts/ponderable_hydrometer~github-trending/run-sync-get-dataset-items?token=<YOUR_API_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"languages": ["python"], "since": "daily"}'
```

AI agents can call it through the Apify MCP server: `https://mcp.apify.com?tools=ponderable_hydrometer/github-trending`.

### Limits and good to know

- **Repositories only.** The Actor reads the repository trending list, not the trending developers list.
- **Up to 25 repositories per list** (what GitHub shows on one trending page), so a run with N languages returns up to 25 × N rows.
- It reads the public trending page; no GitHub account or token is used. If GitHub changes the page layout, a run that reads nothing ends as FAILED instead of returning an empty success.
- `starsInPeriod` is the number GitHub shows for the chosen window. A list that GitHub does not show for a language slug (for example a misspelled one) is skipped with a warning in the log; if every list is empty, the run ends as FAILED.
- `stars` and `forks` are totals at capture time.
- Owners are organisations or the public accounts that publish the repositories.

### FAQ

**Is there a GitHub API for trending?** Not an official one; this Actor reads the public trending page.

**How do I get all languages?** Leave `languages` empty for the overall list, or list the languages you care about.

**How do I track a repo over time?** Schedule a daily run and keep the rows; compare `rank` and `starsInPeriod` by `repo` and `capturedAt`.

### Pricing

Pay per result — **$0.50 per 1,000 results** (one repository = one result), plus Apify's standard per-run start event ($0.00005 per GB of memory, so a fraction of a cent per run). No subscription.

# Actor input Schema

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

GitHub language slugs, e.g. python, typescript, rust. Empty = all languages.

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

Trending window.

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

Optional ISO code, e.g. en, zh.

## Actor input object example

```json
{
  "languages": [
    "python",
    "typescript"
  ],
  "since": "daily",
  "spokenLanguage": ""
}
```

# Actor output Schema

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

All rows produced by this run, as JSON.

# 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 = {
    "languages": [
        "python",
        "typescript"
    ]
};

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

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

```

## MCP server setup

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