# GitHub Repositories Search Scraper - Stars, Topics, Languages (`kasumilab/github-repositories-search-scraper`) Actor

Search GitHub repositories with the full GitHub search syntax and export them with stars, forks, language, topics, license and dates. Uses the official GitHub REST API; works without a token, faster with your own.

- **URL**: https://apify.com/kasumilab/github-repositories-search-scraper.md
- **Developed by:** [Kasumi Lab](https://apify.com/kasumilab) (community)
- **Categories:** Developer tools, Automation
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.50 / 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 Repositories Search Scraper - Stars, Topics, Languages

Search **GitHub** repositories with the full GitHub search syntax and export them as clean rows with stars, forks, open issues, language, topics, license, homepage and dates.

The Actor uses the official GitHub REST API. It works without any token; add your own personal access token to raise the rate limit. A query returning 50 repositories takes about 2 seconds.

### What you can do with it

- Find the most starred or most recently active projects on a topic, for example `topic:llm language:python`.
- Track competitors and alternatives to your project (`awesome lists`, `alternative to X`).
- Build datasets of repositories by language, license, size or activity for research.
- Monitor new projects by scheduling the Actor with `pushedWithinDays` and `sortBy: updated`.
- Export every public repository of an organization (`org:apify`) or a user (`user:octocat`).

### Input

| Field | What it does |
|---|---|
| `queries` | One search per line, in [GitHub search syntax](https://docs.github.com/en/search-github/searching-on-github/searching-for-repositories): `web scraping`, `topic:llm language:python`, `org:apify`, `machine learning stars:>500 pushed:>2026-01-01`, `license:mit in:readme "openai"`. |
| `language` | Added to every query as `language:X`. |
| `minStars` | Added to every query as `stars:>=N`. |
| `pushedWithinDays` | Keep only repositories with a commit in the last N days. |
| `sortBy` | `stars` (default), `forks`, `updated` or `best-match`. |
| `githubToken` | Optional personal access token. Raises the search limit from 10 to 30 requests per minute. No scopes needed for public repositories. |
| `maxItemsPerQuery` | Up to 1,000 per query (GitHub's limit). |
| `maxItems` | Stop after this many repositories in total. |

Popular Python LLM projects active in the last month:

```json
{
  "queries": ["topic:llm"],
  "language": "python",
  "minStars": 1000,
  "pushedWithinDays": 30,
  "sortBy": "updated",
  "maxItemsPerQuery": 200
}
```

### Output

One item per repository:

```json
{
  "id": "570384908",
  "fullName": "huggingface/peft",
  "name": "peft",
  "owner": "huggingface",
  "ownerType": "Organization",
  "ownerUrl": "https://github.com/huggingface",
  "url": "https://github.com/huggingface/peft",
  "description": "PEFT: State-of-the-art Parameter-Efficient Fine-Tuning.",
  "homepage": "https://huggingface.co/docs/peft",
  "language": "Python",
  "topics": ["adapter", "fine-tuning", "llm", "lora", "pytorch", "transformers"],
  "stars": 21791,
  "forks": 2606,
  "watchers": 21791,
  "openIssues": 118,
  "license": "Apache-2.0",
  "isFork": false,
  "isArchived": false,
  "isTemplate": false,
  "defaultBranch": "main",
  "sizeKb": 33811,
  "createdAt": "2022-11-25T03:51:09Z",
  "updatedAt": "2026-10-16T07:55:12Z",
  "pushedAt": "2026-10-15T18:02:44Z",
  "query": "topic:llm",
  "scrapedAt": "2026-10-16T08:28:00.000Z"
}
```

`openIssues` includes open pull requests, as in GitHub's own count. `watchers` equals `stars` in the search API. `license` is the SPDX identifier, or the license name when GitHub could not classify it.

### Limits and notes

- GitHub returns at most **1,000 results per query**. Split broad topics by language, star ranges or dates (`created:2025-01-01..2025-06-30`) to collect more.
- Rate limits: 10 search requests per minute without a token, 30 with one. Each request returns 100 repositories. The Actor waits for the limit to reset and continues, so large runs take longer rather than failing.
- Only public repositories are returned. The token is never stored or logged.
- README contents, contributors and commit history are not included; use the repository URL with another Actor for those.

### Pricing

You pay per repository saved to the dataset, plus a tiny fee per run start.

# Actor input Schema

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

One GitHub repository search per line, using GitHub's search syntax, for example `web scraping`, `topic:llm language:python`, `org:apify`, `machine learning stars:>500 pushed:>2026-01-01`.

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

Keep only repositories in this programming language, for example `python`. Added to every query.

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

Added to every query as `stars:>=N`. 0 means no minimum.

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

Keep only repositories with a commit in the last N days. 0 means no limit.

## `sortBy` (type: `string`):

Order of results. `best-match` is GitHub's relevance ranking.

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

A personal access token raises the search rate limit from 10 to 30 requests per minute. No scopes are needed for public repositories.

## `maxItemsPerQuery` (type: `integer`):

GitHub returns at most 1,000 results per query. 0 means up to that limit.

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

The run stops after saving this many repositories. 0 means no limit.

## Actor input object example

```json
{
  "queries": [
    "web scraping stars:>100"
  ],
  "language": "",
  "minStars": 0,
  "pushedWithinDays": 0,
  "sortBy": "stars",
  "maxItemsPerQuery": 50,
  "maxItems": 50
}
```

# Actor output Schema

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

All repositories saved by this run, as JSON. Add ?format=csv or ?format=xlsx for other formats.

# 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": [
        "web scraping stars:>100"
    ],
    "sortBy": "stars",
    "maxItemsPerQuery": 50,
    "maxItems": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("kasumilab/github-repositories-search-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": ["web scraping stars:>100"],
    "sortBy": "stars",
    "maxItemsPerQuery": 50,
    "maxItems": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("kasumilab/github-repositories-search-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": [
    "web scraping stars:>100"
  ],
  "sortBy": "stars",
  "maxItemsPerQuery": 50,
  "maxItems": 50
}' |
apify call kasumilab/github-repositories-search-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,kasumilab/github-repositories-search-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/RGNbe2k7xmAAYuZRa/builds/QWVJuIbwfdozZE2tu/openapi.json
