# GitHub Repository Search and New Repo Monitor (`gubidonius/github-search`) Actor

Search every public repository on GitHub by topic, language or stars, or watch for new ones on a schedule. Gets past the 1,000 result ceiling by splitting the creation date range, and every row says how many matches GitHub has so you know what you did not get. No key and no login.

- **URL**: https://apify.com/gubidonius/github-search.md
- **Developed by:** [Gregory Bolshakov](https://apify.com/gubidonius) (community)
- **Categories:** Developer tools, MCP servers, Agents
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## GitHub Repository Search and New Repo Monitor

Search every public repository on GitHub by topic, language, stars or creation date. Or run
it on a schedule and get only the ones that appeared since last time.

No key and no login. A GitHub token is accepted and is not needed.

### What makes this one different

**It tells you what you did not get.** GitHub returns at most 1,000 results for any one
search, however many there are. A search for `model context protocol server` matches over
100,000 and hands back a thousand of them without saying so. Every row here carries three
fields: how many repositories match on GitHub, how many this run returned, and whether
those two agree. If they do not, you know, and the file is still useful.

**It goes past the ceiling when you ask it to.** Set a result limit above 1,000 and it
splits the creation date range into windows and works through them, because a narrower
window fits under the cap. That is the only way to enumerate a large query on GitHub.

One thing to know about that: inside a single window GitHub does the ranking, but across
windows it cannot. So asking for the top 200 by stars gives you the real top 200. Asking
for 1,200 gives you 1,200 real matches with the top of each date window among them, not a
global top 1,200. GitHub has no way to give anyone the second thousand of a ranking.

**It never guesses at a rate limit.** GitHub allows 10 searches a minute without a token,
and going over returns a 403 that also costs you the next window. This waits for the reset
rather than retrying into it, and says on the run how long it waited.

### What you get

One row per repository: owner, name, description, homepage, main language, topics, stars,
forks, licence, default branch, size, and three dates. Created, updated and last push.

Read **pushedAt** for whether a project is alive. `updatedAt` moves when someone stars the
repository, so it is not a sign of activity.

### Two fields that are usually reported wrong

**Open issues include pull requests.** GitHub counts a pull request as an issue in its
search results and offers no separate issue number. On `apify/crawlee` the field reads 152,
which is 109 open issues and 43 open pull requests. The column here is called
`openIssuesAndPullRequests` for that reason.

**There is no watchers column.** In a search result GitHub's `watchers_count` is not
watchers, it is the star count again, exactly. The real number lives on a different
endpoint that allows 60 requests an hour, so an Actor that fetched it would truncate at 60
repositories. Leaving the column out is honest. Publishing stars twice under two names is
not.

### Monitoring

Turn on **Only new since the last run** and schedule it. The first run records a baseline
and returns everything. After that you get only repositories that were not there before,
marked `isNew`.

A query whose request fails is carried forward untouched, so a rate limit or a GitHub
outage cannot look like repositories vanishing. Nothing is ever reported as removed,
because a repository leaving a result set means the ranking moved or it was renamed.

### The token

Without one you get 10 searches a minute, which is 1,000 repositories a minute. A personal
access token with no scopes at all raises that to 30 a minute. Nothing else changes, and
the results are identical.

### Limits worth knowing before you buy

- 1,000 results per search window, set by GitHub. Splitting the date range is the way
  around it and the Actor does that for you.
- Forks are excluded unless you ask for them, which is what GitHub's own search does.
- Private repositories are never included, with or without a token.
- Contributor counts, README text and release data are not here. They need one request per
  repository against a 60 an hour limit, so they belong in a different Actor with its own
  honest ceiling rather than silently capping this one at 60 rows.

# Actor input Schema

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

What to search for. A topic, a product, a technology, a phrase. GitHub's own search syntax works here too.

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

Only repositories whose main language is this one, for example TypeScript or Python. Left empty, every language is included.

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

Drops everything below this star count. The quickest way to cut a broad query down to repositories people actually use.

## `createdFrom` (type: `string`):

GitHub returns at most 1,000 results for any one search. This Actor splits the creation date range automatically to reach the rest, and this narrows where it starts.

## `createdTo` (type: `string`):

Used with the start date to bound the search.

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

Off by default, which is what GitHub's own search does. On, forked copies come back alongside the originals.

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

Archived repositories are read only and no longer maintained. Turn this off to exclude them.

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

Relevance by default. Sorting by stars or updated is what you want when you are ranking rather than searching.

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

Only applies when you sort by something other than relevance.

## `maxResultsPerQuery` (type: `integer`):

GitHub hands back at most 1,000 for one search. Ask for more and this Actor splits the creation date range into windows and keeps going until it has them.

## `onlyNewSinceLastRun` (type: `boolean`):

Returns only repositories that were not there last time, marked isNew. The first run on a query records a baseline and returns everything with isNew empty. A query whose request fails is carried forward untouched, so an outage cannot look like a repository appearing.

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

Not needed. Without one GitHub allows 10 searches a minute, which is 1,000 repositories a minute. A personal access token with no scopes raises that to 30. Nothing else about the results changes.

## Actor input object example

```json
{
  "queries": [
    "model context protocol server"
  ],
  "includeForks": false,
  "includeArchived": true,
  "sort": "best-match",
  "order": "desc",
  "maxResultsPerQuery": 200,
  "onlyNewSinceLastRun": false
}
```

# Actor output Schema

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

One row per repository, with stars, language, licence, topics and dates.

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

Per query: matches on GitHub, rows returned, whether it was complete, and how many date windows and requests it took.

# 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": [
        "model context protocol server"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("gubidonius/github-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 = { "queries": ["model context protocol server"] }

# Run the Actor and wait for it to finish
run = client.actor("gubidonius/github-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 '{
  "queries": [
    "model context protocol server"
  ]
}' |
apify call gubidonius/github-search --silent --output-dataset

```

## MCP server setup

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