# GitHub Scraper - Repos, Profiles & Contributors (`ambitious_door/github-scraper`) Actor

Extract repositories, user profiles, contributors, and stargazers from GitHub. Perfect for developer lead generation, open source intelligence, and tech stack research.

- **URL**: https://apify.com/ambitious\_door/github-scraper.md
- **Developed by:** [C. K.](https://apify.com/ambitious_door) (community)
- **Categories:** Developer tools
- **Stats:** 4 total users, 1 monthly users, 96.7% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 github scrapers

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?

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 Scraper — Repos, Profiles & Developer Leads

Extract repositories, user profiles, contributors, and stargazers from GitHub using the public REST API. Perfect for developer lead generation, open source intelligence, and tech stack research.

### What it does

Search GitHub repositories by keyword, scrape user profiles with contact info (email, company, location), extract contributor lists from any repo, or export stargazer lists for lead generation. Optionally enrich profiles with full details including email and company.

### Output format

#### Repository output

| Field | Type | Description |
|-------|------|-------------|
| `full_name` | string | Full repo name (owner/repo) |
| `description` | string | Repository description |
| `language` | string | Primary programming language |
| `stars` | integer | Star count |
| `forks` | integer | Fork count |
| `topics` | array | Repository topics/tags |
| `license` | string | License identifier |
| `repo_url` | string | GitHub URL |
| `created_at` | string | Creation date |
| `updated_at` | string | Last update date |

#### Profile output (with enrichProfiles)

| Field | Type | Description |
|-------|------|-------------|
| `username` | string | GitHub username |
| `name` | string | Display name |
| `email` | string | Public email |
| `company` | string | Company |
| `location` | string | Location |
| `bio` | string | Profile bio |
| `twitter` | string | Twitter/X handle |
| `followers` | integer | Follower count |
| `public_repos` | integer | Number of public repos |
| `profile_url` | string | GitHub profile URL |

### Input parameters

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `scrapeType` | string | `"search_repos"` | `repos`, `profiles`, `contributors`, `stargazers`, `search_repos`, `search_users` |
| `searchQuery` | string | — | Search query (supports GitHub search syntax) |
| `usernames` | array | — | GitHub usernames to scrape |
| `repos` | array | — | Repos in `owner/repo` format |
| `maxItems` | integer | `100` | Maximum items to return |
| `enrichProfiles` | boolean | `false` | Fetch full profile details (email, company, location) |
| `githubToken` | string | — | Personal access token for higher rate limits |

### Example usage

#### Search repos by topic

```json
{
    "scrapeType": "search_repos",
    "searchQuery": "machine learning language:python stars:>1000",
    "maxItems": 50
}
```

#### Developer lead generation

```json
{
    "scrapeType": "contributors",
    "repos": ["langchain-ai/langchain", "openai/openai-python"],
    "enrichProfiles": true,
    "maxItems": 200
}
```

#### Find developers by skill

```json
{
    "scrapeType": "search_users",
    "searchQuery": "location:\"San Francisco\" language:rust followers:>50",
    "enrichProfiles": true,
    "maxItems": 100
}
```

### Pricing

Pay per item scraped. No charge for failed requests.

### Rate limits

- Without token: 60 requests/hour (good for small jobs)
- With token: 5,000 requests/hour (recommended for enrichProfiles)

Get a free token at github.com/settings/tokens (no special scopes needed for public data).

### Responsible use

- This actor only accesses publicly available data via GitHub's official REST API
- Respect GitHub's Terms of Service and rate limits
- Do not use extracted emails for unsolicited spam
- You are responsible for ensuring your use complies with applicable laws (GDPR, CAN-SPAM)

### Built with

- [GitHub REST API](https://docs.github.com/en/rest)
- [httpx](https://www.python-httpx.org/) for async HTTP

# Actor input Schema

## `scrapeType` (type: `string`):

What to scrape from GitHub.

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

Search query for search\_repos or search\_users (e.g. 'machine learning', 'language:python stars:>1000').

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

List of GitHub usernames to scrape (for repos, profiles).

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

List of repos in owner/repo format (for contributors, stargazers).

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

Maximum number of items to scrape.

## `enrichProfiles` (type: `boolean`):

Fetch full profile details (email, company, location, bio) for each contributor/stargazer. Uses more API calls.

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

Personal access token for higher rate limits (5,000/hr vs 60/hr). Not required for basic use.

## Actor input object example

```json
{
  "scrapeType": "search_repos",
  "searchQuery": "web scraping language:python stars:>100",
  "maxItems": 100,
  "enrichProfiles": false
}
```

# 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 = {
    "searchQuery": "web scraping language:python stars:>100"
};

// Run the Actor and wait for it to finish
const run = await client.actor("ambitious_door/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 = { "searchQuery": "web scraping language:python stars:>100" }

# Run the Actor and wait for it to finish
run = client.actor("ambitious_door/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 '{
  "searchQuery": "web scraping language:python stars:>100"
}' |
apify call ambitious_door/github-scraper --silent --output-dataset

```

## MCP server setup

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