# GitHub Repository Scraper - stars, topics, metadata (`thebee/githubreposcraper`) Actor

Search GitHub repos with full search syntax and get stars, forks, issues, language, topics, SPDX license and activity dates. No API key needed. One request returns 100 repos.

- **URL**: https://apify.com/thebee/githubreposcraper.md
- **Developed by:** [ttgi](https://apify.com/thebee) (community)
- **Categories:** Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 repositories

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 Scraper

Search GitHub repositories and get full metadata in one call — stars, forks,
open issues, language, topics, license, homepage, and activity dates.

### What makes this different

**The entire Apify Store has one GitHub repository scraper. This is the
second.** Most "GitHub scrapers" on other platforms need a paid API key, a
proxy subscription, or per-thousand pricing that eats your margin. This one
uses GitHub's public REST API: free, no key needed for light use, and **one
HTTP request returns 100 repositories**. A 500-repo run costs five requests.

### Usage

Any GitHub search syntax works:

- `stars:>500` — popular repos
- `topic:rust stars:>1000` — by topic
- `language:go pushed:>2026-01-01` — active Go repos
- `org:facebook` — everything from an org
- `help-wanted-issues:>10 language:python` — repos seeking contributors

Sort by `stars`, `forks`, `help-wanted-issues`, `updated`, or `created`.

### Output

Flat, one row per repository:

`fullName`, `owner`, `description`, `stars`, `forks`, `openIssues`, `watchers`,
`language`, `topics`, `license`, `url`, `homepage`, `isArchived`, `isFork`,
`createdAt`, `updatedAt`, `pushedAt`, `size`

### Use cases

- **Developer-tool discovery** — find libraries by topic, language, activity
- **Competitive research** — track a topic's leading projects over time
- **OSS portfolio analysis** — licence, activity, and issue velocity per repo
- **Lead enrichment** — `help-wanted-issues` surfaces projects actively seeking help
- **License compliance** — SPDX identifiers for every dependency you ship

### Rate limits

Unauthenticated you get 60 requests/hour — roughly 6,000 repos. Supply a
`token` input for 5,000 requests/hour (500,000 repos). A token is not required
for light use, and a rate-limit error tells you exactly what to do next.

### Honest notes

- GitHub caps search results at 1,000 per query. Split your filters to go deeper.
- `license` is the SPDX id from GitHub's detection; it is absent for repos
  without a recognised licence file.
- `topics` is a comma-separated string. Split it before joining against another
  list.
- Forked repos are excluded by default; set `includeForks` to keep them.

*Pronouns: they/them.*

# Actor input Schema

## `query` (type: `string`):

Any GitHub repository search query. Supports qualifiers: stars:>500, topic:rust, language:go, pushed:>2026-01-01, org:facebook.

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

Field to sort results by.

## `order` (type: `string`):

Sort direction for the chosen sort field.

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

How many repositories to return. Each 100 repos costs one API request.

## `includeForks` (type: `boolean`):

Include forked repositories. Off by default to keep results clean.

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

Optional personal access token. Raises the rate limit from 60 to 5,000 requests/hour. Not required for light use.

## Actor input object example

```json
{
  "query": "stars:>500",
  "sort": "stars",
  "order": "desc",
  "maxItems": 100,
  "includeForks": false
}
```

# Actor output Schema

## `fullName` (type: `string`):

owner/name

## `owner` (type: `string`):

The owner field of the repository record.

## `name` (type: `string`):

The name field of the repository record.

## `description` (type: `string`):

The description field of the repository record.

## `stars` (type: `string`):

stargazers_count

## `forks` (type: `string`):

The forks field of the repository record.

## `openIssues` (type: `string`):

The openIssues field of the repository record.

## `watchers` (type: `string`):

The watchers field of the repository record.

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

The language field of the repository record.

## `topics` (type: `string`):

comma-separated

## `license` (type: `string`):

SPDX id

## `url` (type: `string`):

The url field of the repository record.

## `homepage` (type: `string`):

The homepage field of the repository record.

## `isArchived` (type: `string`):

The is-Archived field of the repository record.

## `isFork` (type: `string`):

The is-Fork field of the repository record.

## `createdAt` (type: `string`):

The createdAt field of the repository record.

## `updatedAt` (type: `string`):

The updatedAt field of the repository record.

## `pushedAt` (type: `string`):

The pushedAt field of the repository record.

## `size` (type: `string`):

The size field of the repository record.

# 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("thebee/githubreposcraper").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("thebee/githubreposcraper").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 thebee/githubreposcraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,thebee/githubreposcraper"
        }
    }
}
```

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/flgSFl8lIA794EI9A/builds/7z8pILUVPfqeNZbnB/openapi.json
