# Github Profile Scraper (`w3crawler/github-profile-scraper`) Actor

Extracts public GitHub profile fields, repository totals, social links, and account metadata for one or more usernames.

- **URL**: https://apify.com/w3crawler/github-profile-scraper.md
- **Developed by:** [w3crawler](https://apify.com/w3crawler) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.99 / 1,000 profiles

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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 Profile Scraper

Collect public GitHub profile fields for one username or a bounded batch. The Actor reads a public profile response and the user's public repository list, then returns normalized identity, public links, profile counters, account dates, and aggregate stars/forks across the repositories returned by GitHub.

### Public-only source

The rendered public profile page exposes the display name/login, avatar, followers/following, organization, location, public email when the user has chosen to publish it, website link, achievements, and public repositories with descriptions, languages, stars, and forks. The Actor uses documented public API responses for the same public fields. It never logs in, accesses private repositories, requires a token, bypasses CAPTCHA/rate limits, or uses write/private endpoints. Nullable fields are expected because users choose what to publish.

### Input

```json
{
  "username": "octocat",
  "usernames": ["torvalds"],
  "maxItems": 2,
  "requestTimeoutSecs": 30
}
```

`username` accepts one public GitHub login and removes a leading `@`. `usernames` is an optional list for batch processing; duplicates are removed case-insensitively. At most 100 usernames are processed and `maxItems` is capped at 100. Each profile and repository request uses the bounded timeout. If no username is supplied, the default is the public `kawsarlog` account retained for source compatibility. Unknown input keys are rejected.

### Dataset output

Normal rows contain `username`, display name, bio, location, company, public website/social links, avatar/profile URLs, public email when GitHub exposes it, follower/following counts, public repository/gist counts, aggregate stars/forks, hireable state, account type, ISO 8601 creation/update dates, the public profile API `sourceUrl`, and `scrapedAt`. Aggregate repository totals describe the public repository page returned by GitHub and should be treated as an observed lower bound for very large accounts.

Internal record IDs/types, status/data flags, source-website markers, diagnostic labels, and request counters are not emitted in normal rows. If a profile cannot be read, a minimal diagnostic row contains only `url`, `error`, `errorCode`, and `scrapedAt`; `OUTPUT` keeps counts and run status.

#### Profile example

```json
{
  "username": "octocat",
  "name": "The Octocat",
  "location": "San Francisco",
  "followers": 24000,
  "following": 9,
  "publicRepos": 8,
  "totalStars": 20000,
  "totalForks": 160000,
  "profileUrl": "https://github.com/octocat",
  "sourceUrl": "https://api.github.com/users/octocat",
  "scrapedAt": "2026-08-24T00:00:00.000Z"
}
```

You can download the dataset in various formats such as JSON, HTML, CSV, or Excel.

### Local run

```bash
npm ci
npm run check
npm test
apify validate-schema
apify run --purge --input-file input.json
npm run validate
```

Keep batches below unauthenticated GitHub API limits, respect GitHub terms and applicable privacy rules, and do not use profiles for unlawful profiling or automated decisions.

# Actor input Schema

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

One public GitHub username. A leading @ is accepted.

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

Optional list for a batch run. Duplicates are removed.

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

Maximum usernames processed in this run.

## `requestTimeoutSecs` (type: `integer`):

Timeout for each public GitHub API request.

## Actor input object example

```json
{
  "maxItems": 100,
  "requestTimeoutSecs": 30
}
```

# Actor output Schema

## `dataset` (type: `string`):

No description

## `runSummary` (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("w3crawler/github-profile-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("w3crawler/github-profile-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 w3crawler/github-profile-scraper --silent --output-dataset

```

## MCP server setup

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