# GitHub Context Extractor (LLM-Ready Markdown, 5k req/hr) (`automationnation/github-context-extractor`) Actor

Extract clean README markdown, stars, contributors, and release info for LLMs and RAG pipelines. Bring your own GitHub token to get 5,000 requests/hour instead of the 60/hour unauthenticated limit most scrapers hit after ~15 repos.

- **URL**: https://apify.com/automationnation/github-context-extractor.md
- **Developed by:** [Nathan Carter](https://apify.com/automationnation) (community)
- **Categories:** Developer tools
- **Features:** Limited permissions
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 github repo context bundle extracteds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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 Context Extractor (LLM-Ready)

Instant access to GitHub repository context for AI developers and RAG pipelines. This Actor bypasses the clutter of the GitHub UI to provide structured metadata and raw, sanitized Markdown—perfect for feeding into LLMs.

### 🎯 Why use this Actor?

Instead of manually navigating repositories or dealing with slow headless scrapers, this tool provides an instant "Context Bundle" for any public repo.

- **LLM-Optimized:** Extracts the README as raw Markdown, stripped of broken image links.
- **High Reliability:** Built on GitHub's public API—no fragile HTML selectors or client-side rendering issues.
- **Developer-Centric:** Focuses on metrics that matter for AI evaluation (Stars, Issues, Last Commit, Contributors).

### 📊 What Data Do You Get?

Flat JSON, ready to drop straight into a prompt or vector store:

- `repoName`, `repoDescription`, `repoUrl`: Core repo identity.
- `readmeMarkdown`: Sanitized Markdown ready for prompt injection.
- `stars`, `forks`, `issuesCount`, `primaryLanguage`, `lastCommitDate`: Core repo metadata.
- `topContributors`: Top 5 contributors, each with `username` and `avatarUrl`.
- `latestReleaseTag`, `latestReleaseUrl`: The latest release tag and its release notes link.

### 💡 Use Cases

- **RAG Pipelines:** Automatically scrape repo documentation to index it into your vector database.
- **Library Evaluation:** Feed a repo's README into Claude/GPT to see if it fits your project needs before installing.
- **Competitor Intelligence:** Track the development velocity and contribution activity of open-source projects.

### ⚡ Pricing

- **Pay Per Event:** $1.00 per 1,000 results.

# Actor input Schema

## `repoUrls` (type: `array`):

GitHub repository URLs to extract an LLM context bundle from.

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

Raises GitHub's API rate limit from 60 requests/hour (unauthenticated) to 5,000/hour. A fine-grained token with public-repo read access is enough — no scopes/permissions needed for private repos. Without this, each repo costs ~4 API calls, so you'll hit GitHub's limit after ~15 repos/hour.

## `proxyConfiguration` (type: `object`):

Proxy settings. Only relevant without a GitHub token — rotating proxies help spread load across GitHub's per-IP unauthenticated rate limit.

## Actor input object example

```json
{
  "repoUrls": [
    "https://github.com/apify/crawlee"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `results` (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 = {
    "repoUrls": [
        "https://github.com/apify/crawlee"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("automationnation/github-context-extractor").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 = { "repoUrls": ["https://github.com/apify/crawlee"] }

# Run the Actor and wait for it to finish
run = client.actor("automationnation/github-context-extractor").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 '{
  "repoUrls": [
    "https://github.com/apify/crawlee"
  ]
}' |
apify call automationnation/github-context-extractor --silent --output-dataset

```

## MCP server setup

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

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/eJ1ZjduflCdqKyr97/builds/dscwzDhe9JQQP4z5G/openapi.json
