# GitHub Network Scraper (`moving_beacon-owner1/github-network-scraper`) Actor

Scrapes GitHub's public follower and following networks, capturing usernames, profile URLs, account types, and optional profile details such as names, companies, locations, bios, repository counts, and follower statistics, with support for followers, following, or both modes, and deduplication.

- **URL**: https://apify.com/moving_beacon-owner1/github-network-scraper.md
- **Developed by:** [Jamshaid Arif](https://apify.com/moving_beacon-owner1) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $9.99 / 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 Network Scraper

An Apify actor to extract public social connection graphs, follower lists, following networks, and enriched profile metadata from GitHub's REST API.

***

### Key Features

- **Directional Network Traversal**: Retrieve `followers` (users following target), `following` (users target follows), or `both`.
- **Profile Enrichment**: Optionally pull complete user profile metadata including real name, company, geographic location, bio biography, public repository counts, and follower stats.
- **High-Volume PAT Support**: Accepts an optional GitHub Personal Access Token (`token`) to scale rate limits up to **5,000 requests per hour** (vs. 60 requests per hour for anonymous calls).
- **Deduplication & Safety**: Deduplicates users and tracks relationships cleanly.
- **Proxy Compatibility**: Full integration with Apify Proxy or custom proxies.

***

### Input Parameters

| Parameter | Type | Default | Description |
|---|---|---|---|
| `username` | String | `"octocat"` | GitHub username or handle to inspect (e.g. `octocat` or `torvalds`). |
| `mode` | String | `"followers"` | Network mode: `"followers"`, `"following"`, or `"both"`. |
| `limit` | Integer | `50` | Maximum number of user records to extract. |
| `details` | Boolean | `false` | When `true`, fetches profile details (name, company, location, bio, repos count, etc.). |
| `token` | String | `""` | Optional GitHub Personal Access Token to increase API limits. |
| `delay` | Number | `0.2` | Delay in seconds between HTTP pagination or profile calls. |
| `timeout` | Number | `15` | Network request timeout in seconds. |
| `proxyConfiguration` | Object | `{"useApifyProxy": false}` | Proxy settings for requests. |

***

### Example Input JSON

```json
{
  "username": "octocat",
  "mode": "followers",
  "limit": 50,
  "details": true,
  "token": "",
  "delay": 0.2,
  "timeout": 15,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

***

### Output Dataset Fields

| Field | Type | Description |
|---|---|---|
| `login` | String | GitHub username handle. |
| `user_id` | String | Unique GitHub numerical user ID. |
| `avatar_url` | String | URL to the user's avatar image. |
| `profile_url` | String | Direct URL to the GitHub profile page (`https://github.com/<login>`). |
| `user_type` | String | Account type (`User` or `Organization`). |
| `name` | String | Public display name (populated when `details` is `true`). |
| `company` | String | Listed company affiliation (when `details` is `true`). |
| `location` | String | Public location string (when `details` is `true`). |
| `bio` | String | Public biography summary (when `details` is `true`). |
| `public_repos` | Integer / null | Total public repositories owned (when `details` is `true`). |
| `followers_count` | Integer / null | Number of followers (when `details` is `true`). |
| `following_count` | Integer / null | Number of accounts following (when `details` is `true`). |
| `target_user` | String | Target username specified in the query. |
| `relationship` | String | Connection type: `"follower"` or `"following"`. |
| `scraped_at` | String | ISO 8601 timestamp when the record was processed. |

***

### Example Output JSON

```json
{
  "login": "octocat",
  "user_id": "583231",
  "avatar_url": "https://avatars.githubusercontent.com/u/583231?v=4",
  "profile_url": "https://github.com/octocat",
  "user_type": "User",
  "name": "The Octocat",
  "company": "@github",
  "location": "San Francisco",
  "bio": "GitHub's official mascot",
  "public_repos": 8,
  "followers_count": 18200,
  "following_count": 9,
  "target_user": "octocat",
  "relationship": "follower",
  "scraped_at": "2026-11-08T19:25:00.000000+00:00"
}
```

***

### Policy Section & Compliance Guidelines

#### Terms of Service & API Guidelines

This actor communicates with the official GitHub REST API (`api.github.com`). Use of this actor must strictly comply with GitHub's [Terms of Service](https://docs.github.com/en/site-policy/github-terms-of-service/github-terms-of-service) and [Acceptable Use Policies](https://docs.github.com/en/site-policy/acceptable-use-policies/github-acceptable-use-policies). You must not use this actor for bulk automated messaging, unsolicited commercial outreach, or harassing users.

#### Rate Limiting & Polite Scraping

- **Anonymous Requests**: GitHub limits unauthenticated requests to 60 per hour per originating IP address.
- **Authenticated Requests**: Supplying a GitHub Personal Access Token (`token`) elevates your quota to 5,000 requests per hour.
- Maintain the default delay (`0.2s` or higher) to avoid triggering secondary rate-limiting mechanisms or IP blocks.
- When enabling `details=true`, an additional HTTP call is made for each user; ensure sufficient quota is available before initiating large queries.

#### Personal Data & Privacy (GDPR, CCPA)

Public GitHub developer profiles may contain personal data such as names, affiliations, geographic locations, and contact information. When processing or storing this information:

- Respect data protection regulations including the EU General Data Protection Regulation (GDPR) and California Consumer Privacy Act (CCPA/CPRA).
- Do not build unauthorized surveillance or profiling databases of open-source contributors.
- Provide mechanisms for individuals to request data removal or rectification where required by law.

#### Permissible Use & Fair Use Disclaimer

This actor is developed for educational, recruitment analytics, academic research on open-source ecosystems, and developer tooling integrations. The authors assume no liability for misuse, policy breaches, or unauthorized scraping conducted by end users.

***

### How to Run

#### Via Apify Console

1. Navigate to the **GitHub Network Scraper** actor on the Apify platform.
2. Fill in the **GitHub Username** (e.g. `octocat`) and select the relationship mode.
3. (Optional) Provide a GitHub Personal Access Token in the **token** field for high-volume jobs.
4. Click **Start** to execute the run.
5. Download your extracted dataset in JSON, CSV, or Excel format.

#### Via Apify CLI

```bash
apify call github-network-scraper --input='{"username": "octocat", "mode": "followers", "limit": 20}'
```

# Actor input Schema

## `username` (type: `string`):

Target GitHub account handle (e.g., 'octocat' or 'torvalds').

## `mode` (type: `string`):

Target connections to scrape: 'followers', 'following', or 'both'.

## `limit` (type: `integer`):

Maximum number of network user records to retrieve.

## `details` (type: `boolean`):

Fetch detailed profiles (name, company, location, bio, repo count, follower count) for each user.

## `token` (type: `string`):

Optional GitHub PAT for elevated rate limits (5,000 req/hr vs 60 req/hr unauthenticated).

## `delay` (type: `number`):

Polite delay in seconds between pagination or profile requests.

## `timeout` (type: `number`):

Network request timeout in seconds.

## `proxyConfiguration` (type: `object`):

Proxy settings for requests to avoid rate limiting.

## Actor input object example

```json
{
  "username": "octocat",
  "mode": "followers",
  "limit": 50,
  "details": false,
  "delay": 0.2,
  "timeout": 15,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# 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("moving_beacon-owner1/github-network-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("moving_beacon-owner1/github-network-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 '{}' |
apify call moving_beacon-owner1/github-network-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,moving_beacon-owner1/github-network-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/eVlXIaDcThIWP3zNa/builds/roImUiTqkydsIpLKk/openapi.json
