# GitHub Repository Insights (`receptional_blender/github-repo-insights`) Actor

Turn any list of GitHub repos, users/orgs or a search query into clean, structured JSON — stars, forks, watchers, open issues, language, topics, license, homepage and timestamps. Powered by the public GitHub REST API; no login required, add a token to raise the rate limit.

- **URL**: https://apify.com/receptional\_blender/github-repo-insights.md
- **Developed by:** [Assia Fadli](https://apify.com/receptional_blender) (community)
- **Categories:** Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.01 / 1,000 results

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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js/docs.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python/docs.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/integrations/mcp.md).

If your project is in a different language, use 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 Insights

Turn GitHub repositories into clean, structured data. Point this actor at specific
repos, at whole users/organizations, or at a GitHub search query, and get back one
tidy JSON row per repository — stars, forks, watchers, open issues, language, topics,
license, homepage and timestamps.

It runs on the official **[GitHub REST API](https://docs.github.com/en/rest)**. No
login and no proxy are needed; an optional personal access token only raises the
rate limit.

### Why use it

- **Three ways in, one shape out.** Mix explicit repos, user/org listings and a
  search query in a single run — every source produces the same flat record.
- **Never fails on one bad input.** A missing repo (404) or a rate-limit hit (403)
  becomes a labelled `error` row; the run keeps going.
- **No dependencies to fear.** Just the Apify SDK and Node 20's built-in `fetch`.
- **Pay only for what you get.** Billed per delivered repository (pay-per-event) —
  error rows are never charged.

### Input

| Field | Type | Default | Description |
| --- | --- | --- | --- |
| `repos` | array | — | Repositories to fetch, each as `"owner/name"` (e.g. `"apify/crawlee"`). |
| `searchQuery` | string | — | Optional GitHub repository search query. Returns the most-starred matches first. |
| `users` | array | — | Optional list of GitHub usernames/organizations. Fetches each account's repositories. |
| `maxResults` | integer | `30` | Max repositories per source (per user and for the search query). Capped at 100 by the API. |
| `githubToken` | string (secret) | — | Optional personal access token. Raises the rate limit from 60 to 5,000 requests/hour. |

Provide at least one of `repos`, `users` or `searchQuery`. You can combine all three.

#### Example input

```json
{
  "repos": ["apify/crawlee", "facebook/react"],
  "searchQuery": "web scraping language:python stars:>1000",
  "users": ["apify"],
  "maxResults": 30
}
````

### Output

Each dataset record is a flat repository object:

```json
{
  "fullName": "apify/crawlee",
  "owner": "apify",
  "name": "crawlee",
  "description": "Crawlee—A web scraping and browser automation library…",
  "stars": 18500,
  "forks": 810,
  "watchers": 18500,
  "openIssues": 130,
  "language": "TypeScript",
  "topics": ["crawler", "scraper", "playwright", "puppeteer"],
  "license": "Apache-2.0",
  "homepage": "https://crawlee.dev",
  "url": "https://github.com/apify/crawlee",
  "createdAt": "2021-05-31T14:15:11Z",
  "updatedAt": "2024-06-01T00:00:00Z",
  "pushedAt": "2024-06-01T00:00:00Z",
  "size": 45000,
  "defaultBranch": "master",
  "archived": false,
  "isFork": false
}
```

| Field | Description |
| --- | --- |
| `fullName` | Repository full name (`owner/name`). |
| `owner` | Owner login. |
| `name` | Repository name. |
| `description` | Repository description. |
| `stars` | Stargazer count. |
| `forks` | Fork count. |
| `watchers` | Watcher count. |
| `openIssues` | Open issues + pull requests count. |
| `language` | Primary language. |
| `topics` | Array of repository topics. |
| `license` | SPDX license identifier (e.g. `MIT`, `Apache-2.0`). |
| `homepage` | Project homepage URL, if set. |
| `url` | Link to the repository on GitHub. |
| `createdAt` | Creation timestamp (ISO 8601). |
| `updatedAt` | Last metadata update timestamp (ISO 8601). |
| `pushedAt` | Last push timestamp (ISO 8601). |
| `size` | Repository size in kilobytes. |
| `defaultBranch` | Default branch name. |
| `archived` | Whether the repository is archived. |
| `isFork` | Whether the repository is a fork. |

When an input can't be fetched, its row is `{ "input": "<value>", "error": "<message>" }`
instead — the run continues.

### Rate limits

The GitHub REST API allows **60 requests/hour** unauthenticated. Providing a
`githubToken` raises this to **5,000 requests/hour**; a read-only token with no
scopes is enough. Hitting the limit produces an `error` row (HTTP 403) rather than
crashing the run.

### Data source

This actor uses the official GitHub REST API:

- Base URL: `https://api.github.com`
- Repo details: `GET /repos/{owner}/{repo}`
- User repos: `GET /users/{user}/repos?sort=updated`
- Search: `GET /search/repositories?q=<query>&sort=stars&order=desc`

Requests send the required `User-Agent` and `Accept: application/vnd.github+json` headers.

### Billing

This actor uses the **pay-per-event** pricing model. You are charged once per
repository successfully delivered to the dataset (event `repo-scraped`). Error rows
are never charged.

***

Built by **Assia Fadli**. Licensed under **MIT**.

# Actor input Schema

## `repos` (type: `array`):

Specific repositories to fetch, each as "owner/name" (e.g. "apify/crawlee").

## `searchQuery` (type: `string`):

Optional GitHub repository search query. Returns the most-starred matches first. Supports GitHub search syntax, e.g. "web scraping language:python stars:>1000".

## `users` (type: `array`):

Optional list of GitHub usernames or organizations. Fetches each account's repositories, most recently updated first.

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

Maximum number of repositories to return per source (per user, and for the search query). Capped at 100 by the GitHub API.

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

Optional GitHub personal access token. Not required, but raises the rate limit from 60 to 5,000 requests per hour. A read-only token with no scopes is enough.

## Actor input object example

```json
{
  "repos": [
    "apify/crawlee",
    "facebook/react"
  ],
  "users": [
    "apify"
  ],
  "maxResults": 30
}
```

# 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 = {
    "repos": [
        "apify/crawlee",
        "facebook/react"
    ],
    "maxResults": 30
};

// Run the Actor and wait for it to finish
const run = await client.actor("receptional_blender/github-repo-insights").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 = {
    "repos": [
        "apify/crawlee",
        "facebook/react",
    ],
    "maxResults": 30,
}

# Run the Actor and wait for it to finish
run = client.actor("receptional_blender/github-repo-insights").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "repos": [
    "apify/crawlee",
    "facebook/react"
  ],
  "maxResults": 30
}' |
apify call receptional_blender/github-repo-insights --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=receptional_blender/github-repo-insights",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "GitHub Repository Insights",
        "description": "Turn any list of GitHub repos, users/orgs or a search query into clean, structured JSON — stars, forks, watchers, open issues, language, topics, license, homepage and timestamps. Powered by the public GitHub REST API; no login required, add a token to raise the rate limit.",
        "version": "1.0",
        "x-build-id": "TqmHhYrFX2hoUeYZj"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/receptional_blender~github-repo-insights/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-receptional_blender-github-repo-insights",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/receptional_blender~github-repo-insights/runs": {
            "post": {
                "operationId": "runs-sync-receptional_blender-github-repo-insights",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/receptional_blender~github-repo-insights/run-sync": {
            "post": {
                "operationId": "run-sync-receptional_blender-github-repo-insights",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "repos": {
                        "title": "Repositories",
                        "type": "array",
                        "description": "Specific repositories to fetch, each as \"owner/name\" (e.g. \"apify/crawlee\").",
                        "items": {
                            "type": "string"
                        }
                    },
                    "searchQuery": {
                        "title": "Search query",
                        "type": "string",
                        "description": "Optional GitHub repository search query. Returns the most-starred matches first. Supports GitHub search syntax, e.g. \"web scraping language:python stars:>1000\"."
                    },
                    "users": {
                        "title": "Users / organizations",
                        "type": "array",
                        "description": "Optional list of GitHub usernames or organizations. Fetches each account's repositories, most recently updated first.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "maxResults": {
                        "title": "Max results",
                        "minimum": 1,
                        "maximum": 100,
                        "type": "integer",
                        "description": "Maximum number of repositories to return per source (per user, and for the search query). Capped at 100 by the GitHub API.",
                        "default": 30
                    },
                    "githubToken": {
                        "title": "GitHub token (optional)",
                        "type": "string",
                        "description": "Optional GitHub personal access token. Not required, but raises the rate limit from 60 to 5,000 requests per hour. A read-only token with no scopes is enough."
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
