# GitHub Repos & Trending Scraper – Stars, Issues & Releases (`openharvest/github-scraper`) Actor

Scrape GitHub repositories, search results, GitHub trending repos and developers, issues, pull requests and releases: stars, forks, watchers, topics, license, languages, latest release, last commit, contributors count. Official API + github.com/trending, optional token.

- **URL**: https://apify.com/openharvest/github-scraper.md
- **Developed by:** [Enes Bulanık](https://apify.com/openharvest) (community)
- **Categories:** Developer tools, AI, Automation
- **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 Repos & Trending Scraper – Stars, Issues & Releases

Scrape GitHub repositories, search results, GitHub trending repos and developers, issues, pull requests and releases: stars, forks, watchers, topics, license, languages, latest release, last commit, contributors count. Official API + github.com/trending, optional token.

**Price: $1 per 1,000 results.** Works without a GitHub account, and an optional free token raises the API limit to 5,000 requests per hour.

### What data can you get from GitHub?

| Mode | What you get |
|---|---|
| 🔥 **Trending** | github.com/trending by language, period (today / this week / this month) and spoken language: rank, repo, description, language, stars, forks, **stars gained in the period**, "built by" logins. Trending **developers**: rank, login, profile URL and their popular repository. |
| 🔎 **Search repositories** | GitHub repository search with keywords and any qualifier (`topic:`, `org:`, `pushed:>`…), language and minimum-stars filters, sorted by best match, stars, forks or recently updated. Up to 1,000 results per query. |
| 📦 **Repository details** | For a list of `owner/repo` or URLs: stars, forks, watchers, open issues, topics, license, homepage, default branch, archived/fork flags, created/updated/pushed dates. With **standard** details you also get the **languages breakdown** (bytes and %), **latest release**, **last commit date** and **contributors count**. **Full** adds a README excerpt. |
| 🐞 **Issues & pull requests** | Issues and/or PRs filtered by state (open/closed/all), labels and "updated since": number, title, state, labels, assignees, milestone, comments, reactions, created/updated/closed/merged dates, author login and a short body excerpt. |
| 🚀 **Releases** | Tag, name, publish date, pre-release flag, author login, assets with sizes and **download counts**, total downloads and a release-notes excerpt. |

**Privacy by design:** the Actor never collects e-mail addresses or other personal data. People are identified only by their public GitHub login and profile URL, and e-mail addresses inside issue bodies, README and release notes are replaced with `[email removed]`.

### Use cases

- **Developer-tool market research.** Find and rank the repositories in your niche by stars, forks and activity.
- **Trend spotting.** Run a daily schedule on trending repos for Python, Rust, TypeScript or any other language and spot rising projects early.
- **Competitive intelligence.** Track competitors' stars, releases, release download counts and issue activity over time.
- **Open-source due diligence.** Check license, last commit date, contributors count and open issues before you adopt a dependency.
- **Lead lists for DevRel and investors.** Build lists of fast-growing projects. Only public logins and URLs are included, never e-mails.
- **AI agents and RAG.** Give an LLM structured, current GitHub data such as repo stats and README excerpts.

### How to use the GitHub Scraper

1. Click **Try for free**.
2. Pick **What to scrape** (mode). Trending works with no other input.
3. Fill in the field for your mode: **Search query** for search, or **Repositories** for details, issues and releases.
4. Optional: add a **GitHub token** for larger runs (see below).
5. Click **Start**, then download your data as JSON, CSV or Excel, or use the API.

#### Do I need a GitHub token?

No, but large runs go much faster with one.

| | Without token | With token |
|---|---|---|
| Trending | unlimited (HTML page) | unlimited |
| REST API (details, issues, releases) | **60 requests/hour per IP**, shared with others | **5,000 requests/hour** |
| Search API | 10 requests/minute | 30 requests/minute |

A **fine-grained personal access token with no permissions** is enough, because it only reads public data. Create one at <https://github.com/settings/personal-access-tokens>. The field is a secret input and is stored encrypted.

**What one result costs in API requests:** a search request returns up to 100 repositories, an issues or releases request up to 100 rows, and repository details take 1 request (basic), 5 (standard) or 6 (full) per repository.

**Rate limits are handled for you.** The Actor reads GitHub's `x-ratelimit-*` headers. If the limit resets within *Max wait for rate limit* (default 90 s), it waits and continues. Otherwise it stops cleanly, keeps everything scraped so far and adds a free `RATE_LIMITED` status row that tells you when the limit resets.

### Input example

```json
{
    "mode": "repoDetails",
    "repositories": ["apify/crawlee", "https://github.com/sindresorhus/awesome"],
    "detailLevel": "full",
    "maxItems": 50
}
```

Other examples:

```json
{ "mode": "trending", "language": "python", "trendingPeriod": "weekly" }
{ "mode": "trending", "trendingType": "developers", "language": "rust" }
{ "mode": "searchRepositories", "searchQuery": "web scraping", "language": "python", "minStars": 500, "sort": "stars", "maxItems": 100 }
{ "mode": "issues", "repositories": ["apify/crawlee"], "issueType": "issues", "issueState": "all", "labels": ["bug"], "since": "90 days" }
{ "mode": "releases", "repositories": ["microsoft/vscode"], "includePrereleases": false, "maxItemsPerRepository": 10 }
```

Running with no input (`{}`) returns today's trending repositories.

### Output

Every row has a `type`: `repository`, `trending-repository`, `trending-developer`, `issue`, `pull-request`, `release`, or the free rows `status` and `error`. Below is real output, shortened.

**Repository details (`detailLevel: full`)**

```json
{
    "type": "repository",
    "fullName": "apify/crawlee",
    "owner": "apify",
    "ownerType": "Organization",
    "ownerUrl": "https://github.com/apify",
    "url": "https://github.com/apify/crawlee",
    "description": "Crawlee—A web scraping and browser automation library for Node.js to build reliable crawlers. ...",
    "homepage": "https://crawlee.dev",
    "stars": 26028,
    "forks": 1688,
    "watchers": 136,
    "openIssues": 140,
    "primaryLanguage": "TypeScript",
    "topics": ["apify", "automation", "crawler", "crawling", "headless", "headless-chrome", "..."],
    "license": "Apache-2.0",
    "isArchived": false,
    "createdAt": "2016-08-26T18:35:03Z",
    "pushedAt": "2026-10-07T18:39:46Z",
    "languages": [
        { "language": "TypeScript", "bytes": 4295265, "percent": 62.2 },
        { "language": "MDX", "bytes": 2133590, "percent": 30.9 },
        { "language": "JavaScript", "bytes": 371816, "percent": 5.4 }
    ],
    "latestRelease": { "tagName": "v3.18.2", "name": "v3.18.2", "publishedAt": "2026-09-29T09:58:35Z", "url": "https://github.com/apify/crawlee/releases/tag/v3.18.2" },
    "lastCommitDate": "2026-10-06T14:13:47Z",
    "contributorsCount": 152,
    "readmeExcerpt": "A web scraping and browser automation library Crawlee covers your crawling and scraping end-to-end and helps you build reliable scrapers. ...",
    "detailLevel": "full",
    "scrapedAt": "2026-10-07T19:06:31.912Z"
}
```

**Trending repository**

```json
{
    "type": "trending-repository",
    "rank": 1,
    "fullName": "Panniantong/Agent-Reach",
    "url": "https://github.com/Panniantong/Agent-Reach",
    "description": "Give your AI agent eyes to see the entire internet. ...",
    "language": "Python",
    "stars": 93110,
    "forks": 8158,
    "starsInPeriod": 6454,
    "builtBy": ["Panniantong", "claude", "nyxst4ck", "kadaliao", "hymansun"],
    "period": "weekly",
    "trendingLanguage": "python"
}
```

**Trending developer**

```json
{ "type": "trending-developer", "rank": 1, "login": "penso", "url": "https://github.com/penso", "popularRepo": "penso/herdr-gpui", "popularRepoUrl": "https://github.com/penso/herdr-gpui", "popularRepoDescription": "Native client for Herdr on macOS, Linux, and Windows, built with Rust and GPUI. ...", "period": "weekly", "trendingLanguage": "rust" }
```

**Issue**

```json
{
    "type": "issue",
    "repository": "apify/crawlee",
    "number": 2815,
    "title": "bug: `setValue` and `useState` functions fail for large objects",
    "state": "closed",
    "stateReason": "completed",
    "url": "https://github.com/apify/crawlee/issues/2815",
    "authorLogin": "lhotanok",
    "authorUrl": "https://github.com/lhotanok",
    "labels": ["bug", "t-tooling"],
    "assignees": ["janbuchar"],
    "milestone": "4.1",
    "comments": 2,
    "createdAt": "2025-01-16T13:38:56Z",
    "closedAt": "2026-09-24T11:37:05Z",
    "bodyExcerpt": "Which package is this bug report for? ..."
}
```

**Release**

```json
{ "type": "release", "repository": "microsoft/vscode", "tagName": "1.141.0", "name": "1.141.0", "url": "https://github.com/microsoft/vscode/releases/tag/1.141.0", "isPrerelease": false, "publishedAt": "2026-10-07T11:01:16Z", "authorLogin": "alexr00", "assetsCount": 0, "totalDownloads": 0, "assets": [], "bodyExcerpt": "https://code.visualstudio.com/updates/v1_141" }
```

**Status (free)**

```json
{ "type": "status", "statusCode": "RATE_LIMITED", "message": "GitHub core API rate limit reached (unauthenticated: 60 requests/hour, search 10/minute). It resets at 2026-10-07T20:06:31.000Z ... Add a free GitHub personal access token ...", "rateLimitResetAt": "2026-10-07T20:06:31.000Z" }
```

Status codes: `RATE_LIMITED`, `NO_RESULTS`, `NO_RELEASES`. Error codes: `INVALID_INPUT`, `NOT_FOUND`, `INVALID_QUERY`, `SCRAPE_FAILED`. Status and error rows are never charged.

A few notes on the fields. `openIssues` is GitHub's own count, which includes open pull requests. `watchers` is the real subscriber count and is only filled in repository details, because search results don't include it. `contributorsCount` is an estimate: GitHub counts anonymous contributors and returns `null` for repositories that are too large to list. Renamed repositories are followed automatically, so `fullName` shows the current name.

The dataset has ready-made views: **Repositories**, **Trending**, **Issues & pull requests**, **Releases** and **Status & errors**.

### Pricing

Pay-per-event: you pay only for results, and platform usage is included.

| Event | Price | When it is charged |
|---|---|---|
| `item` | **$0.001** per result ($1 / 1,000) | Each repository, trending repo or developer, issue, pull request or release saved |
| Status / error rows | **Free** | Rate-limit notices, empty results, invalid or missing repositories |

| Job | Cost |
|---|---|
| Today's trending repositories (≈ 13–25 rows) | ≈ **$0.02** |
| 100 search results | **$0.10** |
| Details for 50 repositories | **$0.05** |
| 1,000 issues | **$1.00** |

Set **Max results** and Apify's **Max cost per run**. The Actor stops exactly at your budget.

### Use with AI agents (MCP)

This Actor works as a tool for AI agents through the [Apify MCP server](https://mcp.apify.com) (Claude, Cursor, VS Code, OpenAI Agents and others). Add `github-scraper` to your MCP server tools and the agent can call it with inputs like these:

```json
{ "mode": "repoDetails", "repositories": ["vercel/next.js", "facebook/react"], "detailLevel": "standard" }
```

```json
{ "mode": "trending", "language": "typescript", "trendingPeriod": "daily", "maxItems": 10 }
```

The output is flat JSON with stable field names, so agents can compare repositories, summarize releases or triage issues directly.

### FAQ

**Is it legal to scrape GitHub?**
The Actor reads only public data: the official public REST API and the public trending page. It does not log in, does not access private repositories and does not collect e-mail addresses or other personal contact data. You are responsible for using the data in line with [GitHub's Terms of Service](https://docs.github.com/en/site-policy/github-terms/github-terms-of-service) and its [Acceptable Use Policies](https://docs.github.com/en/site-policy/acceptable-use-policies/github-acceptable-use-policies), including the rules on information usage. Don't use the data for spam or unsolicited contact, and keep the limits of GDPR and similar laws in mind.

**Why did my run stop with RATE_LIMITED?**
Without a token, GitHub allows only 60 API requests per hour per IP address, and Apify's IPs are shared. Add a free token, raise *Max wait for rate limit*, or run again after the time shown in the status row. Results already scraped are kept, and you only pay for those.

**Why does search stop at 1,000 results?**
That is a GitHub Search API limit. Split your query with qualifiers (for example `stars:100..500`, `created:2025-01-01..2025-06-30` or `language:go`) to cover more.

**Can I get stargazer lists or follower e-mails?**
No. You get stargazer *counts*, not lists of people, and never e-mail addresses. This is deliberate.

**Can I run it on a schedule?**
Yes. Use Apify Schedules, for example daily trending for your languages or weekly release tracking for your competitors.

**Which language names work for trending?**
Use the names GitHub shows: `python`, `typescript`, `c++`, `c#`, `jupyter notebook`, `go`, `rust` and so on. Leave the field empty for all languages.

### Related actors

- *Coming soon:* GitLab Scraper
- *Coming soon:* npm & PyPI Package Stats
- *Coming soon:* Hacker News Scraper

### Support & feedback

Found a bug or need a field? Open an issue in the **Issues** tab. We usually respond within a day.

# Actor input Schema

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

<b>trending</b> – github.com/trending repositories or developers (no API limits).<br><b>searchRepositories</b> – GitHub repository search by keyword, language and stars.<br><b>repoDetails</b> – full stats for a list of repositories.<br><b>issues</b> – issues and/or pull requests of repositories.<br><b>releases</b> – releases with download counts.

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

Used by <b>searchRepositories</b>. Keywords plus any GitHub search qualifiers, e.g. <code>web scraping</code>, <code>topic:llm</code>, <code>org:apify</code>, <code>pushed:>2026-01-01</code>.

## `repositories` (type: `array`):

Used by <b>repoDetails</b>, <b>issues</b> and <b>releases</b>. Accepted formats: <code>owner/repo</code>, <code>https://github.com/owner/repo</code>, <code>git@github.com:owner/repo.git</code>.

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

Optional. Filters <b>trending</b> and <b>searchRepositories</b> by language, e.g. <code>python</code>, <code>typescript</code>, <code>c++</code>, <code>jupyter notebook</code>. Leave empty for all languages.

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

Maximum number of results (rows) for the whole run. Set to 0 for no limit. You pay per result, so this also caps your cost.

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

Used by <b>trending</b>. Developers rows contain only the public login, profile URL and their popular repository.

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

Used by <b>trending</b>: today, this week or this month.

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

Optional ISO 639-1 code of the README language, e.g. <code>en</code>, <code>zh</code>, <code>es</code>. Used by trending repositories only.

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

Used by <b>searchRepositories</b>.

## `minStars` (type: `integer`):

Used by <b>searchRepositories</b>: only repositories with at least this many stars. 0 = no filter.

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

Used by <b>repoDetails</b>. <b>basic</b> = 1 API request per repo (stars, forks, watchers, topics, license...). <b>standard</b> = 5 requests (+ languages breakdown, latest release, last commit date, contributors count). <b>full</b> = 6 requests (+ README excerpt).

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

Used by <b>issues</b>.

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

Used by <b>issues</b>.

## `labels` (type: `array`):

Optional. Only issues/PRs that have ALL of these labels, e.g. <code>bug</code>, <code>good first issue</code>.

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

Optional. Only issues/PRs updated at or after this date. Absolute (YYYY-MM-DD) or relative (<code>7 days</code>, <code>1 month</code>).

## `includePrereleases` (type: `boolean`):

Used by <b>releases</b>.

## `maxItemsPerRepository` (type: `integer`):

Used by <b>issues</b> and <b>releases</b>: cap per repository (newest first). 0 = no limit.

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

Optional GitHub personal access token. Without it the GitHub API allows only <b>60 requests/hour</b> (search: 10/minute) per IP, shared with other users. With a token: <b>5,000 requests/hour</b> (search: 30/minute). A fine-grained token with <b>no permissions</b> (public repositories, read-only) is enough – create one at github.com/settings/personal-access-tokens. Stored encrypted. Not needed for <b>trending</b>.

## `maxWaitForRateLimitSecs` (type: `integer`):

If GitHub's rate limit is reached and it resets within this many seconds, the Actor waits and continues. Otherwise it stops cleanly, keeps the results and adds a free RATE_LIMITED status row.

## Actor input object example

```json
{
  "mode": "searchRepositories",
  "searchQuery": "web scraping",
  "repositories": [
    "apify/crawlee",
    "https://github.com/facebook/react"
  ],
  "language": "python",
  "maxItems": 100,
  "trendingType": "repositories",
  "trendingPeriod": "weekly",
  "spokenLanguage": "en",
  "sort": "stars",
  "minStars": 100,
  "detailLevel": "full",
  "issueType": "issues",
  "issueState": "all",
  "labels": [
    "bug"
  ],
  "since": "30 days",
  "includePrereleases": true,
  "maxItemsPerRepository": 100,
  "maxWaitForRateLimitSecs": 90
}
```

# Actor output Schema

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

All scraped items in the default dataset (JSON, CSV, Excel and more via the dataset export).

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

Records saved in the default key-value store, e.g. the run summary.

# 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 = {
    "mode": "trending",
    "searchQuery": "web scraping",
    "repositories": [
        "apify/crawlee",
        "microsoft/vscode"
    ],
    "maxItems": 25
};

// Run the Actor and wait for it to finish
const run = await client.actor("openharvest/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 = {
    "mode": "trending",
    "searchQuery": "web scraping",
    "repositories": [
        "apify/crawlee",
        "microsoft/vscode",
    ],
    "maxItems": 25,
}

# Run the Actor and wait for it to finish
run = client.actor("openharvest/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 '{
  "mode": "trending",
  "searchQuery": "web scraping",
  "repositories": [
    "apify/crawlee",
    "microsoft/vscode"
  ],
  "maxItems": 25
}' |
apify call openharvest/github-scraper --silent --output-dataset

```

## MCP server setup

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