# GitHub Scraper (`donjuan_mime/github-scraper`) Actor

Scrape GitHub repositories by search, user, organization, or link: stars, forks, language, topics, license, activity dates, plus issues and pull requests. No login needed; a token raises the limits.

- **URL**: https://apify.com/donjuan_mime/github-scraper.md
- **Developed by:** [Donjuan](https://apify.com/donjuan_mime) (community)
- **Features:** Limited permissions
- **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 Scraper: repositories, issues, and pull requests from search, users, and organizations

GitHub Scraper collects public repositories from GitHub with their stars, forks, watchers, open issues, language, topics, license, owner, and creation, update, and last push dates. Find repositories with GitHub's search syntax, take every repository of a user or organization, or scrape repositories one by one. Turn on issues to also get each repository's issues and pull requests with their state, labels, assignees, comments, reactions, and merge date.

You don't need a GitHub account or any code. Add search queries, repositories, or owners, press **Start**, and download the results as JSON, CSV, Excel, XML, or HTML. Or pull them into your app through the Apify API.

### What can you do with GitHub data?

- **Find projects and tools.** Search by language, topic, stars, and activity to build a shortlist of libraries or a market map of open source in your field.
- **Track open source growth.** Save stars, forks, and last push dates of the repositories you care about on a schedule and watch their trends.
- **Generate leads.** Find active projects and organizations that use a technology, with their homepages and owners.
- **Monitor a project's health.** Collect open issues and pull requests, their labels, and how long they stay open.
- **Build datasets for research.** Clean metadata across thousands of repositories makes good input for studies of languages, licenses, and ecosystems.

### What data does GitHub Scraper extract?

| Group | Fields |
|---|---|
| Repository | full name, URL, description, homepage, language, topics, license, default branch, size |
| Popularity | stars, forks, watchers, open issues |
| Flags | fork, archived, template |
| Owner | login, type (user or organization), profile URL, avatar |
| Dates | created, updated, last push (ISO 8601, UTC) |
| Issues and pull requests | number, title, URL, state and reason, body, author, labels, assignees, milestone, comments, reactions, draft flag, created, closed, and merged dates |

### How to scrape GitHub

1. Open the actor and go to the **Input** tab.
2. Add search queries, repositories, users or organizations, or github.com links. You can mix them.
3. Set **Repositories per source**, and turn on **Include issues and pull requests** if you need them.
4. For big runs, paste a GitHub token (see below).
5. Press **Start**. When the run finishes, open the **Output** tab to preview the table, or press **Export** to download the data.

### Input

| Field | Type | Description |
|---|---|---|
| `searchQueries` | array of strings | GitHub repository search: `language:go stars:>1000`, `topic:scraping`, `crawler in:name pushed:>2026-01-01`. |
| `searchSort` | string | `best-match`, `stars`, `forks`, `updated`, or `help-wanted-issues`. |
| `repositories` | array of strings | `owner/repo` or a github.com link. |
| `owners` | array of strings | User or organization logins or links. |
| `startUrls` | array | github.com links to repositories, users, organizations, or search pages. |
| `maxItems` | integer | The maximum number of repositories from each source. |
| `includeIssues` | boolean | Also collect issues and pull requests, newest first. |
| `issueState` | string | `open`, `closed`, or `all`. |
| `issueKind` | string | `all`, `issue`, or `pull_request`. |
| `maxIssuesPerRepo` | integer | The maximum number of issues and pull requests from each repository. |
| `githubToken` | string | Optional personal access token. Stored encrypted. |

Example input:

```json
{
  "searchQueries": ["topic:web-scraping stars:>500"],
  "searchSort": "stars",
  "owners": ["apify"],
  "maxItems": 100,
  "includeIssues": true,
  "issueState": "open",
  "maxIssuesPerRepo": 20
}
```

### Output

One dataset item per repository:

```json
{
  "type": "repository",
  "fullName": "golang/go",
  "url": "https://github.com/golang/go",
  "description": "The Go programming language",
  "homepage": "https://go.dev",
  "language": "Go",
  "topics": ["go", "golang", "language", "programming-language"],
  "stars": 140125,
  "forks": 20269,
  "watchers": 3363,
  "openIssues": 9917,
  "license": "BSD-3-Clause",
  "owner": { "login": "golang", "type": "Organization", "url": "https://github.com/golang" },
  "createdAtISO": "2014-08-19T04:33:40Z",
  "pushedAtISO": "2026-11-20T15:47:05Z",
  "input": "golang/go"
}
```

Issues and pull requests come as separate items with `type` set to `issue` or `pull_request`.

### GitHub token and limits

Without a token, GitHub allows 60 API requests an hour and 10 searches a minute per IP address. That covers a few searches or a few dozen repositories. For more, create a [personal access token](https://github.com/settings/tokens) with no scopes and paste it into **GitHub token**. It raises the limits to 5000 requests an hour and 30 searches a minute. The scraper waits out short limits on its own and stops with a clear message when the hourly limit runs out.

- **Search stops at 1000 results per query.** Split big searches by date or stars, for example `stars:1000..5000` and `stars:>5000`.
- **Watchers** come only for repositories read one by one; GitHub leaves them out of search results and lists.
- **Open issues** count issues and pull requests together, as GitHub does.

### Is it legal to scrape GitHub?

The scraper reads only public data through GitHub's official REST API and follows its rate limits. Personal data such as logins is protected by laws like the GDPR, and GitHub's terms forbid using it for spam or selling it, so collect it only for a legitimate purpose and consult a lawyer if you are unsure.

# Actor input Schema

## `searchQueries` (type: `array`):

Search GitHub repositories. GitHub's search syntax works, for example "language:go stars:>1000", "topic:scraping", or "crawler in:name,description pushed:>2026-01-01". Each query returns up to 1000 repositories.

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

Order of search results.

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

Repositories to scrape, as owner/repo or a github.com link.

## `owners` (type: `array`):

Users or organizations whose repositories to scrape, as a login (golang) or a github.com link. Most recently pushed first.

## `startUrls` (type: `array`):

github.com links: a repository, a user or organization, or a search page (github.com/search?q=...).

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

The maximum number of repositories from each search query, user, organization, or start URL. Issues come on top of this.

## `includeIssues` (type: `boolean`):

Also collect the issues and pull requests of every repository, newest first. Each repository costs at least one more request, so add a token for big runs.

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

Which issues and pull requests to collect.

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

Collect issues, pull requests, or both.

## `maxIssuesPerRepo` (type: `integer`):

The maximum number of issues and pull requests from each repository. Leave empty for all of them.

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

Optional personal access token, no scopes needed. Without one GitHub allows 60 requests an hour and 10 searches a minute per IP; with one, 5000 requests an hour and 30 searches a minute.

## Actor input object example

```json
{
  "searchQueries": [
    "language:go stars:>10000"
  ],
  "searchSort": "best-match",
  "maxItems": 30,
  "includeIssues": false,
  "issueState": "open",
  "issueKind": "all",
  "maxIssuesPerRepo": 50
}
```

# Actor output Schema

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

One item per repository, issue, or pull request.

# 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 = {
    "searchQueries": [
        "language:go stars:>10000"
    ],
    "maxItems": 30,
    "maxIssuesPerRepo": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("donjuan_mime/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 = {
    "searchQueries": ["language:go stars:>10000"],
    "maxItems": 30,
    "maxIssuesPerRepo": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("donjuan_mime/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 '{
  "searchQueries": [
    "language:go stars:>10000"
  ],
  "maxItems": 30,
  "maxIssuesPerRepo": 50
}' |
apify call donjuan_mime/github-scraper --silent --output-dataset

```

## MCP server setup

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