# GitHub Repository Search (`datalantern/github-repository-search`) Actor

Search public GitHub repositories and export repository metadata with bounded pagination.

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

## Pricing

from $0.20 / 1,000 delivered 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 Search

Build a repository shortlist for developer-tool research or open-source inventory without collecting personal contact data.

### Example

```json
{
  "query": "topic:data-visualization",
  "sort": "stars",
  "maxResults": 20,
  "maxRequests": 3
}
```

Results go to the dataset. Key-value records: OUTPUT explains completion; RESULTS_CSV contains the rows from this run; CHECKPOINT can be supplied on the next run with the same source inputs. A completed checkpoint performs no requests. CSV string cells that could be interpreted as spreadsheet formulas are prefixed with an apostrophe.

### Completion and limits

Public repository metadata only. No private repositories, code download, personal emails or release monitoring. GitHub search exposes at most 1,000 matches; narrow the query. Shared unauthenticated quotas can stop a run.

All runs stop at the output/request limits, a 4 MiB response limit, a source error, or an invalid checkpoint. A valid zero-row response is distinct from a failed source. There are no automatic retries, proxy rotations or redirect fallbacks. A checkpoint remembers delivered IDs and the source cursor; delivery is acknowledged before an ID is recorded. A process crash between dataset delivery and checkpoint persistence can still repeat rows. Mutable upstream results can move during pagination. This is best-effort continuation, not an immutable snapshot, exactly-once delivery, or a change-monitoring service. Reset the checkpoint for a fresh export. Checkpoints are capped at 10,000 source IDs.

### Attribution and data rights

Repository metadata includes the declared SPDX identifier when present. This is not a legal license audit; repository source code is not downloaded.

Official source guidance: https://docs.github.com/en/rest/search/search#search-repositories

### What can this tool do?

Build a repository shortlist for developer-tool research or open-source inventory without collecting personal contact data.

### What data does it return?

Source-qualified records: id, repository, url, stars, forks, language, license, description. Exact missing values remain null or absent as described above. JSON/CSV can include nested fields as JSON cells.

### How to use it

Use example-input.json. Start with a small output limit. Read OUTPUT.complete and OUTPUT.reason before treating the export as complete. Continue with CHECKPOINT only when needed; omit it for a fresh snapshot.

### Pricing

Actor fees: $0.00005 per run start, plus $0.0002 per delivered repository ($0.20 per 1,000 results). No separate automatic dataset-item fee is intended.

For 100 delivered repositories, the Actor fee is $0.02005, including one start. Source errors and genuine empty results can still incur the run-start fee. These are Actor fee examples, not a promise of total platform cost or creator earnings. Source APIs are free within their rules; operating this tool through Apify can consume platform credits. Check the Store price and your account limits before running.

Set a small result cap and an Apify run spending limit. The exporter checks available result-event allowance before requesting and delivering data; it stops with a saved summary and checkpoint when the allowance is exhausted. A strict zero run limit produces no source request. Interrupted runs and checkpoint recovery can still repeat a delivered row; inspect the saved output before resuming.

### Is it legal?

Use the official source API within its rules. Preserve the attribution and license fields described above. Do not use this tool to circumvent authentication, restrictions or third-party rights. Source guide: https://docs.github.com/en/rest/search/search#search-repositories

### FAQ

**Does zero rows always mean no matching data?** No. A source error is reported separately and the run fails after saving a partial summary. A genuine empty source response can complete normally.

**Can it resume without duplicates?** It suppresses delivered source IDs while a checkpoint remains valid. Process crashes or upstream search changes can still lead to repeats or omissions; see the checkpoint limits above. It does not promise exactly-once delivery or monitoring.

### Feedback

Record the exact source input, completion summary and expected result when evaluating a problem; never share API keys or confidential source data in a public issue.

# Actor input Schema

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

Public source search expression. Narrow the query to the records needed for this export.

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

Ordering applied by the source API; best-match uses the source default relevance ordering.

## `maxResults` (type: `integer`):

Maximum unique output rows for this run. Source limits, request limits or spending allowance may stop the export earlier.

## `maxRequests` (type: `integer`):

Stops with an explicit checkpoint when reached. This limits source work as well as waiting time.

## `checkpoint` (type: `object`):

Paste the previous CHECKPOINT object with the same source inputs. Omit for a new export.

## Actor input object example

```json
{
  "query": "topic:data-visualization",
  "sort": "stars",
  "maxResults": 20,
  "maxRequests": 3
}
```

# Actor output Schema

## `records` (type: `string`):

No description

## `csv` (type: `string`):

No description

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

No description

## `checkpoint` (type: `string`):

No description

# 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("datalantern/github-repository-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 = {}

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

```

## MCP server setup

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