# GitHub Repository Search: Stars, Topics, README (`fontedata/github-repo-search`) Actor

Search GitHub repositories by keyword, topic, language, stars, last push and creation date via the official API. Get stars, forks, licence, topics, activity dates and optional README text. Repository data only, no emails. Optional GitHub token for higher limits.

- **URL**: https://apify.com/fontedata/github-repo-search.md
- **Developed by:** [Fonte Data](https://apify.com/fontedata) (community)
- **Categories:** Developer tools, Open source
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-usage

## 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 Search: topics, stars, activity, README

Find GitHub repositories by **keywords, topics, language, minimum stars, last push and creation date**, using the **official GitHub REST API** rather than HTML scraping. You get clean repository metadata and, optionally, the README text, ready for analysis or for an AI agent to read.

### Use cases

- Landscape scans: every actively maintained Python MCP server with 50+ stars.
- Dev-tool market research and competitor tracking (schedule it with `pushedAfter`).
- Open-source due diligence: licence, activity and popularity in one table.
- LLM pipelines: repository READMEs as input for summarisation or classification.

### Input

| Field | Meaning |
|---|---|
| `query` | Keywords; GitHub qualifiers allowed (`in:name,description`) |
| `topics` | All must match, e.g. `llm`, `web-scraping` |
| `language` | e.g. `Python` |
| `minStars` | Popularity floor |
| `pushedAfter` / `createdAfter` | `YYYY-MM-DD` |
| `includeForks` / `includeArchived` | Off by default |
| `sort` | `stars`, `updated`, `forks`, `best-match` |
| `includeReadme` | Adds README text (first 20,000 chars), charged as an extra event |
| `githubToken` | Optional secret token for higher limits; never logged |
| `maxRepos` | Up to 1,000 (GitHub's per-query cap) |

#### Example

```json
{ "query": "mcp server", "language": "Python", "minStars": 50, "pushedAfter": "2026-09-01", "maxRepos": 150 }
```

### Output (shape; values are placeholders)

```json
{ "fullName": "owner/repo", "owner": "owner", "ownerType": "Organization", "url": "https://github.com/owner/repo",
  "description": "…", "stars": 1234, "forks": 56, "openIssues": 7, "language": "Python", "topics": ["mcp", "llm"],
  "license": "MIT", "isFork": false, "isArchived": false, "createdAt": "2025-03-01T10:00:00Z", "pushedAt": "2026-11-10T08:00:00Z",
  "readme": "# Repo…" }
```

### Pricing

**Free during launch**: you pay only your own Apify platform usage. In our test run on 2026-11-12, 5 repositories with READMEs used about $0.0002 of platform usage.

Planned pay-per-event pricing: $0.003 per run, **$0.0008 per repository returned** ($0.80 per 1,000) and $0.0005 per README (only if you enable READMEs). Set "Max cost per run" to cap spend; the Actor stops cleanly at the cap.
Paid pricing will be announced in advance on this page and in Apify Console before it applies.

### Limits and responsible use

- GitHub search returns at most 1,000 results per query; narrow it with dates or stars to go further.
- Without a token GitHub allows 10 searches per minute and about 60 README fetches per hour. The Actor waits for search limits, and skips READMEs when the hourly limit would require a long wait (it tells you how many).
- Repository data only; no user emails or personal profiles. Follow GitHub's Acceptable Use Policies. Not affiliated with GitHub.

# Actor input Schema

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

Free-text keywords. You can also use GitHub search qualifiers directly, e.g. "mcp server in:name,description".

## `topics` (type: `array`):

Repository topics (all must match), e.g. llm, mcp, web-scraping.

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

e.g. Python, TypeScript, Go.

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

Only repositories with at least this many stars.

## `pushedAfter` (type: `string`):

Only repos with a commit pushed on/after this date (YYYY-MM-DD).

## `createdAfter` (type: `string`):

YYYY-MM-DD.

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

Include forked repositories (excluded by default).

## `includeArchived` (type: `boolean`):

Include archived (read-only) repositories (excluded by default).

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

Sort order from the GitHub search API: best match, stars, forks or recently updated.

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

Fetch each repo's README (first 20,000 characters). Charged as an extra event. Without a token GitHub allows only ~60 README requests per hour.

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

A fine-grained personal access token with public-repo read access raises limits (search 30/min, core 5,000/h). Stored as a secret, never logged or saved.

## `maxRepos` (type: `integer`):

GitHub search returns at most 1,000 results per query. You pay per repo returned.

## Actor input object example

```json
{
  "query": "mcp server",
  "minStars": 10,
  "includeForks": false,
  "includeArchived": false,
  "sort": "stars",
  "includeReadme": false,
  "maxRepos": 100
}
```

# Actor output Schema

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

One row per repository: full name, description, stars, forks, licence, topics, language, activity dates and optional README text.

## `summary` (type: `string`):

JSON record with the run parameters and the number of items returned.

# 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 = {
    "query": "mcp server"
};

// Run the Actor and wait for it to finish
const run = await client.actor("fontedata/github-repo-search").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 = { "query": "mcp server" }

# Run the Actor and wait for it to finish
run = client.actor("fontedata/github-repo-search").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 '{
  "query": "mcp server"
}' |
apify call fontedata/github-repo-search --silent --output-dataset

```

## MCP server setup

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

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/3V6a7XzBEsqQKsyXo/builds/gsLQQfeeYxm6doRv5/openapi.json
