# 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

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-usage

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# 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("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).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": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=nominated_tupelo/github-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "GitHub Scraper - Repos, Issues, PRs & Contributors",
        "description": "Scrape GitHub repositories, issues, pull requests, contributors, releases, and trending repos. Uses the official GitHub REST API. Optional GitHub token for higher rate limits.",
        "version": "1.0",
        "x-build-id": "yaOuypStvUzzS86au"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/nominated_tupelo~github-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-nominated_tupelo-github-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/nominated_tupelo~github-scraper/runs": {
            "post": {
                "operationId": "runs-sync-nominated_tupelo-github-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/nominated_tupelo~github-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-nominated_tupelo-github-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "scrapeMode": {
                        "title": "Scrape Mode",
                        "enum": [
                            "repo",
                            "issues",
                            "pull_requests",
                            "contributors",
                            "releases",
                            "search_repos",
                            "trending",
                            "user"
                        ],
                        "type": "string",
                        "description": "What to scrape from GitHub.",
                        "default": "repo"
                    },
                    "repos": {
                        "title": "Repositories",
                        "type": "array",
                        "description": "List of repositories in owner/repo format (e.g. ['microsoft/vscode', 'torvalds/linux']). Used by repo, issues, pull_requests, contributors, releases modes.",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "searchQuery": {
                        "title": "Search Query",
                        "type": "string",
                        "description": "Search query for search_repos mode (e.g. 'language:python stars:>1000 topic:machine-learning').",
                        "default": ""
                    },
                    "usernames": {
                        "title": "Usernames / Orgs",
                        "type": "array",
                        "description": "GitHub usernames or org names to scrape. Used by user mode.",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "trendingLanguage": {
                        "title": "Trending Language Filter",
                        "type": "string",
                        "description": "Filter trending repos by language (e.g. 'python', 'javascript', 'rust'). Leave empty for all languages.",
                        "default": ""
                    },
                    "trendingPeriod": {
                        "title": "Trending Period",
                        "enum": [
                            "daily",
                            "weekly",
                            "monthly"
                        ],
                        "type": "string",
                        "description": "Time period for trending repos.",
                        "default": "daily"
                    },
                    "issueState": {
                        "title": "Issue / PR State",
                        "enum": [
                            "open",
                            "closed",
                            "all"
                        ],
                        "type": "string",
                        "description": "Filter issues or PRs by state.",
                        "default": "open"
                    },
                    "maxItems": {
                        "title": "Max Items per Repo",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Maximum items to return per repository (0 = no limit, subject to API rate limits).",
                        "default": 100
                    },
                    "githubToken": {
                        "title": "GitHub Personal Access Token (optional)",
                        "type": "string",
                        "description": "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."
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
