# GitHub Repository Scraper (`centspy/github-repo-scraper`) Actor

Search GitHub or list any user/org's repositories via the public API. No proxy, no browser.

- **URL**: https://apify.com/centspy/github-repo-scraper.md
- **Developed by:** [brandon nadeau](https://apify.com/centspy) (community)
- **Categories:** Developer tools, Developer examples
- **Stats:** 2 total users, 1 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$1.00 / 1,000 repo scrapeds

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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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 Repository Scraper

Search GitHub or pull every repository from any user or organization — names, descriptions, stars, forks, languages, topics, licenses, and activity dates. Built for recruiting and developer sourcing, dev-tool lead generation, competitive intelligence, and open-source research.

This scraper reads the **public GitHub REST API**. That means:

- **No proxies needed** — GitHub serves datacenter requests fine.
- **No browser** — fast and lightweight.
- **No broken selectors** — it reads a stable, documented JSON API.

### Two modes

- **Search mode** — provide a `searchQuery` using GitHub's search syntax (e.g. `language:python stars:>500 topic:llm`).
- **User / org mode** — leave the query blank and provide one or more `users` to list every repository they own.

### Input

| Field | Type | Description |
|-------|------|-------------|
| `searchQuery` | string | GitHub search syntax. Blank = use user/org mode. |
| `users` | array | Usernames/orgs to list repos for (used when `searchQuery` is blank). |
| `sort` | string | Search sort: `stars`, `forks`, `updated`, or `help-wanted-issues`. |
| `maxResults` | integer | Max repositories. `0` = as many as the API allows. Default `100`. |
| `githubToken` | string (secret) | Optional. Raises the rate limit from 60/hr to 5,000/hr. A token with no scopes works for public data. |

#### Example input

```json
{
    "searchQuery": "language:rust stars:>1000",
    "sort": "stars",
    "maxResults": 300
}
```

### Output

```json
{
    "id": 70107786,
    "name": "tokio",
    "fullName": "tokio-rs/tokio",
    "url": "https://github.com/tokio-rs/tokio",
    "description": "A runtime for writing reliable asynchronous applications with Rust.",
    "owner": "tokio-rs",
    "ownerType": "Organization",
    "homepage": "https://tokio.rs",
    "language": "Rust",
    "topics": ["async", "rust", "io"],
    "stars": 27000,
    "forks": 2500,
    "watchers": 27000,
    "openIssues": 220,
    "license": "MIT",
    "isFork": false,
    "isArchived": false,
    "createdAt": "2016-10-06T18:46:46Z",
    "updatedAt": "2026-06-01T09:12:00Z",
    "pushedAt": "2026-06-02T15:40:00Z"
}
```

Export to **CSV, JSON, Excel, or HTML**, or pull via the Apify API.

### Pricing

This Actor uses **pay-per-event** pricing — a small charge per repository scraped, platform usage included. A run returning 1,000 repos costs roughly the per-repo price × 1,000.

### Rate limits & the optional token

Without a token, GitHub allows 60 requests/hour — fine for small runs. For larger jobs, create a free **personal access token** (no scopes needed for public data) and paste it into `githubToken` to get 5,000 requests/hour. The token is stored securely and never appears in output. If the limit is hit mid-run, the Actor stops gracefully and logs a clear message.

### Use cases

- **Technical recruiting** — find and shortlist developers and projects by language, topic, and activity.
- **Dev-tool lead generation** — surface repos and maintainers in your target niche.
- **Competitive intelligence** — monitor a competitor's open-source footprint and release cadence.
- **Research & datasets** — build structured datasets of projects in a domain.

### Notes & limitations

- Search mode returns up to ~1,000 results per query. Narrow with more specific search terms to go deeper.
- Returns public repositories only.

# Actor input Schema

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

GitHub search syntax, e.g. 'machine learning language:python stars:>500'. Leave blank to use user/org mode instead.

## `users` (type: `array`):

Used when Search query is blank. One or more GitHub usernames or org names to list repositories for.

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

How to sort search results.

## `maxResults` (type: `integer`):

Maximum repositories to return. 0 = as many as the API allows.

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

Optional personal access token. Without it: 60 requests/hour. With it: 5,000/hour. A token with no scopes is enough for public data.

## Actor input object example

```json
{
  "searchQuery": "language:rust stars:>1000",
  "users": [
    "facebook",
    "vercel"
  ],
  "sort": "stars",
  "maxResults": 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("centspy/github-repo-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 = {}

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

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=centspy/github-repo-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/YKImBgURcj78JJfYl/builds/rbZXCqqc04vXMBkM5/openapi.json
