# GitHub Scraper - Repos, Issues, PRs & Contributors (`nominated_tupelo/github-scraper`) Actor

Scrape GitHub repositories, issues, pull requests, contributors, releases, and trending repos. Uses the official GitHub REST API. Optional GitHub token for higher rate limits.

- **URL**: https://apify.com/nominated_tupelo/github-scraper.md
- **Developed by:** [kade](https://apify.com/nominated_tupelo) (community)
- **Categories:** Developer tools
- **Stats:** 2 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$10.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 Scraper — Repos, Issues, PRs, Contributors & Trending

The only dedicated GitHub scraper on Apify. Extract data from GitHub repositories, issues, pull requests, contributors, releases, trending repos, and user profiles using the **official GitHub REST API**. No browser. No proxy required. Works without a GitHub token (60 req/hr free) or with your own token (5,000 req/hr).

### What you can scrape

| Mode | What you get |
|---|---|
| `repo` | Stars, forks, watchers, topics, language, license, dates |
| `issues` | Title, state, labels, assignees, comment count, body |
| `pull_requests` | PR title, state, merged status, labels, author, dates |
| `contributors` | Login, commit count, profile URL |
| `releases` | Tag, name, assets, download count, publish date |
| `search_repos` | Search by keyword, language, stars, topic, org |
| `trending` | Today's / this week's / this month's trending repos |
| `user` | User/org profile + all their public repos |

### Why use GitHub Scraper?

- **Developer intelligence** — track competitor repos, monitor open source projects, analyze tech stacks by stars/forks
- **Lead generation** — find contributors and maintainers in your niche (JS devs, Python ML engineers, Rust systems devs)
- **Trend monitoring** — scrape trending repos daily to spot emerging tech before it's mainstream
- **Research & data science** — build datasets from GitHub activity, issues, releases
- **No dedicated actor exists** — this is the only GitHub-focused scraper on Apify

### How to use

1. Open the **Input** tab
2. Select a **Scrape Mode** (repo, issues, trending, search, etc.)
3. For repo/issues/PRs: add repos in `owner/repo` format (e.g. `microsoft/vscode`)
4. Optionally add your **GitHub Token** for higher rate limits (5000/hr vs 60/hr)
5. Click **Start** — data appears in the Output tab instantly

### Input

| Parameter | Type | Default | Description |
|---|---|---|---|
| `scrapeMode` | string | `repo` | What to scrape: `repo`, `issues`, `pull_requests`, `contributors`, `releases`, `search_repos`, `trending`, `user` |
| `repos` | string\[] | — | Repos in `owner/repo` format. Used by repo/issues/PRs/contributors/releases modes. |
| `searchQuery` | string | — | GitHub search query (e.g. `language:python stars:>1000 topic:llm`). Used by `search_repos` mode. |
| `usernames` | string\[] | — | GitHub usernames or orgs. Used by `user` mode. |
| `trendingLanguage` | string | — | Filter trending repos by language (e.g. `python`, `rust`). Empty = all languages. |
| `trendingPeriod` | string | `daily` | `daily`, `weekly`, or `monthly`. Used by `trending` mode. |
| `issueState` | string | `open` | Filter issues/PRs by state: `open`, `closed`, `all`. |
| `maxItems` | integer | `100` | Max items per repo (0 = unlimited). |
| `githubToken` | string | — | Optional GitHub PAT (classic, no scopes needed for public data). Increases rate limit 83x. |

### Example inputs

#### Scrape trending Python repos today

```json
{
  "scrapeMode": "trending",
  "trendingLanguage": "python",
  "trendingPeriod": "daily"
}
```

#### Get repo details for multiple repos

```json
{
  "scrapeMode": "repo",
  "repos": ["microsoft/vscode", "torvalds/linux", "facebook/react"]
}
```

#### Search repos by topic

```json
{
  "scrapeMode": "search_repos",
  "searchQuery": "topic:machine-learning language:python stars:>500",
  "maxItems": 200,
  "githubToken": "ghp_..."
}
```

#### Get all open issues from a repo

```json
{
  "scrapeMode": "issues",
  "repos": ["openai/openai-python"],
  "issueState": "open",
  "maxItems": 500
}
```

### Output examples

#### Repository

```json
{
  "type": "repository",
  "fullName": "microsoft/vscode",
  "owner": "microsoft",
  "name": "vscode",
  "description": "Visual Studio Code",
  "url": "https://github.com/microsoft/vscode",
  "stars": 186550,
  "forks": 40566,
  "language": "TypeScript",
  "topics": ["editor", "electron", "typescript"],
  "license": "MIT",
  "createdAt": "2015-09-03T20:23:38Z",
  "updatedAt": "2026-06-19T14:22:00Z"
}
```

#### Issue

```json
{
  "type": "issue",
  "id": 12345,
  "title": "Extensions not loading after update",
  "state": "open",
  "author": "username",
  "labels": ["bug", "P1"],
  "commentsCount": 23,
  "createdAt": "2026-06-01T10:00:00Z"
}
```

#### Trending repo

```json
{
  "type": "trending_repo",
  "fullName": "owner/repo-name",
  "language": "Python",
  "stars": 45200,
  "starsToday": 892,
  "trendingPeriod": "daily"
}
```

### GitHub Token (optional but recommended)

Without a token: 60 API requests/hour — fine for small batches (5-10 repos).
With a token: 5,000 API requests/hour — needed for large batches or fetching many issues/PRs.

**How to get a free token:**

1. Go to github.com/settings/tokens
2. Click "Generate new token (classic)"
3. Give it a name, set no expiry, check **no scopes** (read-only public data needs no scopes)
4. Copy the `ghp_...` token and paste into the `githubToken` field

Your token is never stored — it's used only during the run.

### Pricing

This actor uses the **Pay Per Event** model — you pay per item returned.

- **100 repos**: ~$0.01
- **1,000 issues**: ~$0.05
- **trending (15 repos)**: ~$0.01

GitHub's API is fast and returns structured JSON — no browser overhead, runs complete in seconds.

### Tips

- **Lead gen**: use `contributors` mode on active repos in your target niche → get a list of active developers
- **Tech trend monitoring**: schedule `trending` mode daily → track which languages and frameworks are surging
- **Competitive intel**: `issues` + `pull_requests` on a competitor's repo → see what users are asking for
- **OSS research**: `search_repos` with `topic:your-tech stars:>100` → map the ecosystem

### FAQ

**Do I need a GitHub account?** No. All public data is accessible without any login.

**Is this against GitHub's ToS?** This actor uses the official GitHub REST API with proper headers and rate limit handling. GitHub's API is designed for programmatic access. Always comply with GitHub's API usage terms.

**What about private repos?** Only public data is accessible. Private repos require OAuth which is not supported.

**Something broken?** Open an issue on the Issues tab with the repo and error message.

# Actor input Schema

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

What to scrape from GitHub.

## `repos` (type: `array`):

List of repositories in owner/repo format (e.g. \['microsoft/vscode', 'torvalds/linux']). Used by repo, issues, pull_requests, contributors, releases modes.

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

Search query for search_repos mode (e.g. 'language:python stars:>1000 topic:machine-learning').

## `usernames` (type: `array`):

GitHub usernames or org names to scrape. Used by user mode.

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

Filter trending repos by language (e.g. 'python', 'javascript', 'rust'). Leave empty for all languages.

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

Time period for trending repos.

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

Filter issues or PRs by state.

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

Maximum items to return per repository (0 = no limit, subject to API rate limits).

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

Optional GitHub PAT to increase rate limit from 60/hr to 5000/hr. Classic token with no scopes needed for public data. Generate at github.com/settings/tokens.

## Actor input object example

```json
{
  "scrapeMode": "repo",
  "repos": [
    "microsoft/vscode"
  ],
  "searchQuery": "",
  "usernames": [],
  "trendingLanguage": "",
  "trendingPeriod": "daily",
  "issueState": "open",
  "maxItems": 100
}
```

# 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 = {
    "repos": [
        "microsoft/vscode"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("nominated_tupelo/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 = { "repos": ["microsoft/vscode"] }

# Run the Actor and wait for it to finish
run = client.actor("nominated_tupelo/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 '{
  "repos": [
    "microsoft/vscode"
  ]
}' |
apify call nominated_tupelo/github-scraper --silent --output-dataset

```

## MCP server setup

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