# GitHub Trending Repositories & Developers Scraper (`webintel/github-trending`) Actor

Scrape GitHub Trending repositories and developers by language, period and spoken language. Optional GitHub REST enrichment for repository details.

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

## Pricing

from $2.00 / 1,000 repos

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 Repositories & Developers Scraper

![GitHub Trending Repositories & Developers Scraper](https://api.apify.com/v2/key-value-stores/21SBwDwdNtlnapIdO/records/github-trending.png?v=e0077ef4)

Scrape public [GitHub Trending](https://github.com/trending) pages and get structured JSON for:

- **Trending repositories**: rank, owner/name, URL, description, language and color, total stars, forks, stars gained in the selected period, and "built by" contributors.
- **Trending developers**: rank, username, display name, profile URL, avatar, and popular repository.
- **Filtered lists**: all languages or selected language slugs, daily/weekly/monthly periods, and optional spoken language code for repositories.
- **Optional repository enrichment**: GitHub REST details such as topics, license, homepage, open issues, created date, pushed date, and default branch.

The Actor uses plain HTTP requests and `CheerioCrawler` (no browser, no login). It handles empty/no-results pages gracefully: no result rows are emitted and you are not charged for that combination.

### Use cases

- Track fast-growing open-source repositories by language.
- Find active GitHub developers and their current popular projects.
- Feed agents, newsletters, dashboards or lead lists with fresh GitHub Trending data.
- Monitor languages and ecosystems such as Python, TypeScript, Rust, Go or Java.
- Enrich repository discovery workflows with topics, license and freshness metadata.

### Input

| Field | Default | Description |
|---|---|---|
| `type` | `repositories` | `repositories`, `developers`, or `both`. |
| `languages` | empty | Language slugs such as `python`, `typescript`, `rust`. Empty means GitHub's all-language list. |
| `since` | `daily` | Trending period: `daily`, `weekly`, or `monthly`. |
| `spokenLanguage` | empty | Optional spoken language code for repository lists, e.g. `en`, `zh`, `es`. |
| `maxItems` | `25` | Maximum rows saved from each list. |
| `includeRepoDetails` | `false` | Calls `https://api.github.com/repos/{owner}/{repo}` for repository rows. GitHub's unauthenticated REST API is limited to about 60 requests/hour, so this is off by default and stops gracefully on 403/rate limit. |
| `maxConcurrency` | `3` | Maximum GitHub Trending pages fetched in parallel. |
| `proxyConfiguration` | off | Optional. Public GitHub Trending pages usually work without proxy. |

```json
{
  "type": "both",
  "languages": ["python", "rust"],
  "since": "weekly",
  "maxItems": 5,
  "includeRepoDetails": false
}
```

### Output

One dataset item is saved per repository or developer row. The dataset includes **Overview**, **Repositories**, and **Developers** views.

```json
{
  "itemType": "repository",
  "rank": 1,
  "fullName": "VectifyAI/PageIndex",
  "owner": "VectifyAI",
  "name": "PageIndex",
  "url": "https://github.com/VectifyAI/PageIndex",
  "description": "📑 PageIndex: Document Index for Vectorless, Reasoning-based RAG",
  "language": "Python",
  "languageColor": "#3572A5",
  "stars": 38755,
  "forks": 3356,
  "starsInPeriod": 2860,
  "period": "weekly",
  "builtBy": [
    { "username": "rejojer", "avatarUrl": "https://avatars.githubusercontent.com/u/8255061?s=40&v=4" },
    { "username": "zmtomorrow", "avatarUrl": "https://avatars.githubusercontent.com/u/13518252?s=40&v=4" }
  ],
  "scrapedAt": "2026-10-06T16:30:43.089Z",
  "filters": { "type": "repositories", "language": "python", "since": "weekly", "spokenLanguage": null }
}
```

```json
{
  "itemType": "developer",
  "rank": 1,
  "username": "Ikalus1988",
  "name": null,
  "url": "https://github.com/Ikalus1988",
  "avatarUrl": "https://avatars.githubusercontent.com/u/136884451?s=96&v=4",
  "popularRepo": {
    "name": "MisakaNet",
    "url": "https://github.com/Ikalus1988/MisakaNet",
    "description": "📚 A zero-dependency, git-backed micro-lesson library for AI Agents to asynchronously share and search verified debugging experience. | ht…"
  },
  "scrapedAt": "2026-10-06T16:30:42.526Z",
  "filters": { "type": "developers", "language": "python", "since": "weekly", "spokenLanguage": null }
}
```

*(Examples trimmed from a real platform test run.)*

When `includeRepoDetails` is enabled, repository rows can also contain:

```json
{
  "details": {
    "topics": ["ai", "agents"],
    "license": "MIT",
    "homepage": "https://example.com",
    "openIssues": 12,
    "createdAt": "2025-01-01T00:00:00Z",
    "pushedAt": "2026-10-06T00:00:00Z",
    "defaultBranch": "main"
  }
}
```

### Pricing

Pay per event: you only pay for result rows.

| Event | Price | When |
|---|---|---|
| Repo (`repo-scraped`) | **$0.002** ($2.00 per 1,000 Repos) | Each repository or developer row successfully pushed to the dataset. Developer rows use the same event so one result row has one predictable price. |

Empty/no-results pages, blocked pages, failed requests, and skipped repository-detail API calls are **free**. The Actor respects your maximum cost per run: it caps work to the number of result events your budget allows and stops cleanly when the limit is reached.

### FAQ

**Does this use a GitHub login?**\
No. It reads public GitHub Trending HTML and optionally public unauthenticated GitHub REST API endpoints.

**Why is `includeRepoDetails` disabled by default?**\
GitHub limits unauthenticated REST requests to about 60 per hour. If GitHub returns 403/rate-limit, the Actor logs a warning, stops detail calls, and continues saving basic repository rows.

**Do I get charged for pages with no results?**\
No. No rows are pushed for empty lists, and billing only happens when a repository or developer row is saved.

**Can I scrape both repositories and developers?**\
Yes. Set `type` to `both`. The same `repo-scraped` event is charged for each repository or developer result row.

**Is this legal?**\
The Actor reads public pages like a browser. You are responsible for using the data in compliance with applicable laws and GitHub's terms.

### Changelog

- **0.1**: Initial release. Scrapes GitHub Trending repositories and developers, supports language/period/spoken-language filters, robust number parsing, no-results handling, and optional GitHub REST repository details.

# Actor input Schema

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

Scrape repositories, developers, or both lists.

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

Language slugs such as python, typescript or rust. Empty means the all-language trending list.

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

Trending period.

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

Optional spoken language code for repository lists, such as en, zh or es.

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

Maximum results saved from each GitHub Trending list.

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

Call GitHub's unauthenticated REST API for each repository to add topics, license, homepage and timestamps. Default off because GitHub allows only 60 unauthenticated REST requests per hour.

## `maxConcurrency` (type: `integer`):

Maximum GitHub Trending pages fetched in parallel.

## `requestTimeoutSecs` (type: `integer`):

How long to wait for GitHub to respond before retrying.

## `maxRetries` (type: `integer`):

How many times to retry a GitHub Trending page that fails to load.

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

Optional. Public GitHub Trending pages usually work without proxy.

## Actor input object example

```json
{
  "type": "repositories",
  "languages": [
    "python",
    "typescript"
  ],
  "since": "daily",
  "spokenLanguage": "en",
  "maxItems": 25,
  "includeRepoDetails": false,
  "maxConcurrency": 3,
  "requestTimeoutSecs": 30,
  "maxRetries": 2,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

All scraped repositories and developers as JSON.

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

Repository-only dataset view.

## `developers` (type: `string`):

Developer-only dataset view.

# 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"
    ],
    "spokenLanguage": "en",
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("webintel/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",
    ],
    "spokenLanguage": "en",
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("webintel/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"
  ],
  "spokenLanguage": "en",
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call webintel/github-trending --silent --output-dataset

```

## MCP server setup

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