# GitHub Explore Scraper - Trending Repos, Stars & Metadata (`samer-samaha/github-scraper`) Actor

Scrape GitHub Explore trending repos: name, owner, stars, language, description. Clean JSON, no API key needed.

- **URL**: https://apify.com/samer-samaha/github-scraper.md
- **Developed by:** [Sam S](https://apify.com/samer-samaha) (community)
- **Categories:** Developer tools, AI
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 result delivereds

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 Explore Scraper - Trending Repos, Stars & Metadata

Scrape GitHub Explore trending repos: name, owner, stars, language, description. Clean JSON, no API key needed.

### What you get

Every row contains:

- `id`
- `sourceUrl`
- `title`
- `owner`
- `primaryLanguage`
- `starCount`
- `description`
- `scrapedAt`

```json
{
  "id": "modular/modular",
  "sourceUrl": "https://github.com/modular/modular",
  "title": "modular / modular",
  "owner": "modular",
  "primaryLanguage": "Mojo",
  "starCount": "27.5k",
  "description": "The Modular Platform (includes MAX & Mojo)",
  "scrapedAt": "2026-01-01T00:00:00.000Z"
}
```

### Input

| Field | Type | Required | Description |
|---|---|---|---|
| `startUrls` | array | yes | Trending or Explore pages to scrape. Each language and time period is a separate page with its own repositories — add more (github.com/trending/<language>?since=daily|weekly|monthly) for broader coverage. |
| `maxItems` | integer | no | Stops the run once this many results have been delivered. You are only charged for results actually returned. Default: `500`. |
| `useBrowser` | boolean | no | Leave off unless results come back empty. Off is several times faster and cheaper; turn it on only if the site renders its listings with JavaScript. Default: `false`. |
| `proxyConfiguration` | object | no | Datacenter proxies are enough for most targets. Switch to residential only if you see blocks. Default: `{"useApifyProxy":true}`. |

### Use cases

- Developer newsletters — a weekly list of what is actually trending, by language.
- Investor and hiring scouting — early traction signals before a project is widely known.
- Training-corpus curation — filter candidate repositories by language and momentum.

### Pricing

$3.00 per 1,000 results. You are charged once per record written to the dataset, and never for a result you do not receive — validation failures and duplicates are dropped before billing.

**The first 10 results of every run are free**, so you can check that the output has the fields you need before paying for any of it.

### Notes

- GitHub's REST and GraphQL APIs have no trending endpoint — trending is computed by GitHub and published only as a web page.
- Each language and time period is a separate page with its own repositories. The default input covers Explore plus nine trending views; add more `github.com/trending/<language>?since=daily|weekly|monthly` URLs for wider coverage.
- GitHub caps each of these pages at roughly 20 repositories and renders no pagination, so breadth comes from the number of URLs, not from paging.

### Support

Open an issue on this Actor if a field stops populating or a run returns nothing. Selector drift is a bug, not a fact of life — these parsers are re-tested weekly against the live site.

# Actor input Schema

## `startUrls` (type: `array`):

Trending or Explore pages to scrape. Each language and time period is a separate page with its own repositories — add more (github.com/trending/<language>?since=daily|weekly|monthly) for broader coverage.

## `maxItems` (type: `integer`):

Stops the run once this many results have been delivered. You are only charged for results actually returned.

## `useBrowser` (type: `boolean`):

Leave off unless results come back empty. Off is several times faster and cheaper; turn it on only if the site renders its listings with JavaScript.

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

Datacenter proxies are enough for most targets. Switch to residential only if you see blocks.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://github.com/explore"
    },
    {
      "url": "https://github.com/trending?since=daily"
    },
    {
      "url": "https://github.com/trending?since=weekly"
    },
    {
      "url": "https://github.com/trending?since=monthly"
    },
    {
      "url": "https://github.com/trending/python?since=weekly"
    },
    {
      "url": "https://github.com/trending/javascript?since=weekly"
    },
    {
      "url": "https://github.com/trending/typescript?since=weekly"
    },
    {
      "url": "https://github.com/trending/rust?since=weekly"
    },
    {
      "url": "https://github.com/trending/go?since=weekly"
    },
    {
      "url": "https://github.com/trending/java?since=weekly"
    }
  ],
  "maxItems": 500,
  "useBrowser": false,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

All records found in this run.

# 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 = {
    "startUrls": [
        {
            "url": "https://github.com/explore"
        },
        {
            "url": "https://github.com/trending?since=daily"
        },
        {
            "url": "https://github.com/trending?since=weekly"
        },
        {
            "url": "https://github.com/trending?since=monthly"
        },
        {
            "url": "https://github.com/trending/python?since=weekly"
        },
        {
            "url": "https://github.com/trending/javascript?since=weekly"
        },
        {
            "url": "https://github.com/trending/typescript?since=weekly"
        },
        {
            "url": "https://github.com/trending/rust?since=weekly"
        },
        {
            "url": "https://github.com/trending/go?since=weekly"
        },
        {
            "url": "https://github.com/trending/java?since=weekly"
        }
    ],
    "maxItems": 500,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("samer-samaha/github-scraper").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 = {
    "startUrls": [
        { "url": "https://github.com/explore" },
        { "url": "https://github.com/trending?since=daily" },
        { "url": "https://github.com/trending?since=weekly" },
        { "url": "https://github.com/trending?since=monthly" },
        { "url": "https://github.com/trending/python?since=weekly" },
        { "url": "https://github.com/trending/javascript?since=weekly" },
        { "url": "https://github.com/trending/typescript?since=weekly" },
        { "url": "https://github.com/trending/rust?since=weekly" },
        { "url": "https://github.com/trending/go?since=weekly" },
        { "url": "https://github.com/trending/java?since=weekly" },
    ],
    "maxItems": 500,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("samer-samaha/github-scraper").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 '{
  "startUrls": [
    {
      "url": "https://github.com/explore"
    },
    {
      "url": "https://github.com/trending?since=daily"
    },
    {
      "url": "https://github.com/trending?since=weekly"
    },
    {
      "url": "https://github.com/trending?since=monthly"
    },
    {
      "url": "https://github.com/trending/python?since=weekly"
    },
    {
      "url": "https://github.com/trending/javascript?since=weekly"
    },
    {
      "url": "https://github.com/trending/typescript?since=weekly"
    },
    {
      "url": "https://github.com/trending/rust?since=weekly"
    },
    {
      "url": "https://github.com/trending/go?since=weekly"
    },
    {
      "url": "https://github.com/trending/java?since=weekly"
    }
  ],
  "maxItems": 500,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call samer-samaha/github-scraper --silent --output-dataset

```

## MCP server setup

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

```

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/gfNLo044mAJfMbbUk/builds/66t3G85zuL1Ip1Yxl/openapi.json
