# GitHub Repository & Trending Scraper (`rupom888/github-repository-scraper`) Actor

Search GitHub repos, scrape user profiles with repos, get repo details with contributors, or track GitHub trending. Uses public API - optional token for higher rate limits.

- **URL**: https://apify.com/rupom888/github-repository-scraper.md
- **Developed by:** [Syed Rupom](https://apify.com/rupom888) (community)
- **Categories:** Lead generation, Agents, Automation
- **Features:** Limited permissions
- **Stats:** 63 total users, 21 monthly users, 99.4% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.50 / 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 Repository & Trending Scraper

Scrape GitHub repositories, user profiles, organizations, and trending repos. Search by keyword, filter by language and stars, or track what's trending daily/weekly/monthly. Priced at **$0.50 per 1,000 results**.

### What it scrapes

- Repository name, description, and topics
- Stars, forks, open issues, and watchers
- Primary language and language breakdown
- License, creation date, and last update
- README content
- User/org profile: name, bio, follower count, public repo count, company, location
- Top contributors (optional)

### Sample output (repository)

```json
{
  "full_name": "openai/whisper",
  "description": "Robust Speech Recognition via Large-Scale Weak Supervision",
  "url": "https://github.com/openai/whisper",
  "stars": 68000,
  "forks": 7900,
  "open_issues": 1400,
  "watchers": 68000,
  "language": "Python",
  "topics": ["speech-recognition", "transformer", "whisper"],
  "license": "MIT",
  "created_at": "2022-09-16",
  "updated_at": "2024-01-15",
  "is_fork": false,
  "homepage": "https://openai.com",
  "readme": "# Whisper\n..."
}
```

### Input

#### Search repositories

```json
{
  "scrapeType": "search",
  "queries": ["machine learning python"],
  "resultsPerQuery": 30,
  "sort": "stars",
  "language": "python",
  "minStars": 1000
}
```

#### User/org profile

```json
{
  "scrapeType": "user",
  "queries": ["openai", "microsoft", "torvalds"]
}
```

#### Trending repos

```json
{
  "scrapeType": "trending",
  "queries": ["python", "javascript"],
  "since": "weekly"
}
```

#### Single repository

```json
{
  "scrapeType": "repo",
  "queries": ["openai/whisper", "facebook/react"],
  "includeContributors": true
}
```

### Input fields

| Field | Type | Default | Description |
|-------|------|---------|-------------|
| `scrapeType` | string | `search` | `search`, `user`, `repo`, `trending` |
| `queries` | string\[] | — | Keywords / usernames / `owner/repo` paths / languages |
| `resultsPerQuery` | integer | 30 | Max repos per query (up to 1,000) |
| `sort` | string | `stars` | `stars`, `forks`, `updated`, `help-wanted-issues`, `best-match` |
| `language` | string | — | Filter by programming language |
| `minStars` | integer | 0 | Minimum star count filter |
| `since` | string | `daily` | Trending timeframe: `daily`, `weekly`, `monthly` |
| `includeContributors` | boolean | false | Fetch top 10 contributors per repo |
| `githubToken` | string | — | Personal access token for higher rate limits (5,000/hr vs 60/hr) |

### Use cases

- Tech landscape research: find top repos in any language or topic
- Competitor intelligence: track stars and forks over time
- Developer outreach: find contributors to relevant open source projects
- Trend monitoring: daily trending to spot emerging tools
- Portfolio analysis: bulk profile data for GitHub users

### Notes

- Without a token: 60 requests/hour (fine for small runs)
- With a GitHub token: 5,000 requests/hour — required for large queries
- Trending scrapes GitHub's public trending page (no API needed)
- README content available in `repo` mode

### Pricing

**$0.50 per 1,000 results** — GitHub public data, no enterprise API needed.

# Actor input Schema

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

What to scrape from GitHub.

## `queries` (type: `array`):

Keywords for search; GitHub usernames/orgs for user mode; 'owner/repo' for repo mode; language names for trending (leave empty for all languages).

## `resultsPerQuery` (type: `integer`):

Max repositories to return per query/user.

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

Sort search results by.

## `language` (type: `string`):

Filter search results by programming language (e.g. python, javascript, typescript, go, rust).

## `minStars` (type: `integer`):

Only return repos with at least this many stars. Set 0 to disable.

## `since` (type: `string`):

Time range for trending repositories.

## `includeContributors` (type: `boolean`):

For repo mode: fetch top 10 contributors for each repository.

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

Personal access token for higher rate limits (5000 req/hr vs 60/hr unauthenticated). Create at github.com/settings/tokens.

## Actor input object example

```json
{
  "scrapeType": "search",
  "queries": [
    "machine learning python"
  ],
  "resultsPerQuery": 30,
  "sort": "stars",
  "minStars": 0,
  "since": "daily",
  "includeContributors": 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 = {
    "queries": [
        "machine learning python"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("rupom888/github-repository-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 = { "queries": ["machine learning python"] }

# Run the Actor and wait for it to finish
run = client.actor("rupom888/github-repository-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 '{
  "queries": [
    "machine learning python"
  ]
}' |
apify call rupom888/github-repository-scraper --silent --output-dataset

```

## MCP server setup

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