# GitHub Repository Scraper (`tidyharvest/github-repos-scraper`) Actor

Search GitHub repositories with any qualifiers or look up specific repos: stars, forks, topics, language, license, dates, optional README and language breakdown. Find trending new repos. No GitHub account needed, $0.80 per 1,000 repos.

- **URL**: https://apify.com/tidyharvest/github-repos-scraper.md
- **Developed by:** [TidyHarvest](https://apify.com/tidyharvest) (community)
- **Categories:** Developer tools, Lead generation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.40 / 1,000 repo scrapeds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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** or look up specific repos through the official GitHub REST API and get clean rows: **stars, forks, topics, language, license, dates, homepage**, plus optional **README text** and **language breakdown**. Use any GitHub search qualifiers, or ask for newly created, fast-growing repos. No proxy, no login, fast, and $0.80 per 1,000 repos.

### What you can do with it

- **Find trending repos:** `topic:llm` with "created within 30 days" and sort by stars lists what is taking off right now.
- **Build lead lists and market maps:** every repo in a topic or language, with owner, homepage and license, for outreach or competitor tracking.
- **Track open-source projects:** stars, forks, open issues and last push date for a watchlist of `owner/name` repos.
- **Feed RAG and research pipelines:** repo metadata plus README text in one dataset.

### Input

| Field | What it does |
|---|---|
| `queries` | `owner/name`, a github.com URL, or a search (`topic:web-scraping language:python stars:>500`, or plain keywords). |
| `sort` | stars (default), forks, updated or best-match. |
| `createdWithinDays` / `pushedWithinDays` | Trending (new) or still-maintained repos. |
| `minStars`, `language` | Quick filters added to your search. |
| `includeForks` | Forks are skipped by default. |
| `maxPerQuery` | Repos per search, up to the GitHub limit of 1,000 (default 100). |
| `includeLanguages`, `includeReadme` | Extra fields, one extra GitHub request per repo. |
| `keywords` | Keep only repos whose metadata contains one of these. |
| `maxItems` | Hard cap on results (and cost). |

Example:

```json
{ "queries": ["topic:llm", "psf/requests"], "createdWithinDays": 30, "minStars": 50, "maxPerQuery": 50 }
```

### Output

One item per repo:

```json
{ "fullName": "psf/requests", "owner": "psf", "url": "https://github.com/psf/requests", "description": "A simple, yet elegant, HTTP library.",
  "stars": 54460, "forks": 9800, "language": "Python", "topics": ["client", "http"], "license": "Apache-2.0",
  "createdAt": "2011-02-13T18:38:17Z", "pushedAt": "2026-10-01T12:00:00Z", "homepage": "https://requests.readthedocs.io",
  "languages": {"Python": 123456}, "readme": "..." }
```

### Pricing

Pay per result: **$0.80 per 1,000 repos** (`repo-scraped`), with lower prices on higher Apify plans. Filters and caps apply before you are charged.
A run that finds nothing fails instead of silently returning an empty dataset.

### Limits and notes

- Uses the official GitHub API. GitHub search returns at most 1,000 results per query and allows about 30 searches per minute; the actor waits out short rate limits and stops cleanly (keeping what it found) on long ones.
- README and language options cost one extra API request per repo, so they are slower on big runs.
- Public repository data only. Follow GitHub terms and applicable privacy law if you use owner data for outreach.

### Source code

This actor is open source (MIT): [github.com/tidyharvest/open-actors/tree/main/github_repos_scraper](https://github.com/tidyharvest/open-actors/tree/main/github_repos_scraper). Issues and pull requests are welcome there.

# Actor input Schema

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

One per line. Either a repo (`owner/name` or a github.com URL) or a GitHub search such as `topic:web-scraping language:python stars:>500` or plain keywords like `vector database`.

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

Sort order for search queries (descending).

## `createdWithinDays` (type: `integer`):

Only repos created in the last N days. With sort = stars this lists newly trending repos.

## `pushedWithinDays` (type: `integer`):

Only repos with a commit in the last N days (still maintained).

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

Only repos with at least this many stars.

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

Programming language filter, e.g. Python, Go, TypeScript.

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

Forks are skipped by default.

## `maxPerQuery` (type: `integer`):

GitHub search returns at most 1,000 results per query.

## `includeLanguages` (type: `boolean`):

Adds bytes of code per language (one extra GitHub request per repo).

## `includeReadme` (type: `boolean`):

Adds the README (first 20,000 characters; one extra GitHub request per repo).

## `keywords` (type: `array`):

Keep a repo only if its metadata (name, description, topics, ...) contains one of these. Empty = all.

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

Hard cap on results for the whole run (also caps your cost). 0 or empty = no limit.

## Actor input object example

```json
{
  "queries": [
    "topic:web-scraping language:python"
  ],
  "sort": "stars",
  "includeForks": false,
  "maxPerQuery": 100,
  "includeLanguages": false,
  "includeReadme": false
}
```

# Actor output Schema

## `repos` (type: `string`):

One item per repo.

# 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": [
        "topic:web-scraping language:python"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("tidyharvest/github-repos-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": ["topic:web-scraping language:python"] }

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

```

## MCP server setup

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