# GitHub Trending & Repo Scraper (`vashiiq/github`) Actor

GitHub trending repositories by language and period, full repository details (stars, forks, topics, license, activity) and repository search.

- **URL**: https://apify.com/vashiiq/github.md
- **Developed by:** [anthony leblanc](https://apify.com/vashiiq) (community)
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$3.00 / 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/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 Trending & Repo Scraper

Get GitHub repositories as clean rows: what’s trending today, this week or this month for any languages, full details for repositories you list, or results of a GitHub search.

### What it does

- Trending: rank, stars, forks and new stars in the period, for any number of languages.
- Repos: stars, forks, open issues, watchers, topics, license, homepage and activity dates.
- Search: GitHub search syntax (language:, stars:>, topic:...) sorted by stars, forks or recent updates.
- No personal data: repository data and usernames only.

**Why this one:** Trending, full repository details and search in one Actor, several languages per run, numbers as numbers, and a clear message (plus an optional token) when GitHub’s free API limit is reached.

In our last check, 20 runs over varied inputs succeeded 100% of the time.

### Use cases

- Spotting rising open-source projects early
- Tracking competitors’ and your own repositories
- Research lists of projects by language or topic

### Input example

```json
{
  "mode": "trending",
  "languages": [
    "python"
  ],
  "since": "weekly",
  "maxItems": 5
}
```

- mode: trending, repos or search
- languages + since: trending
- repos: owner/name list
- query + sort: search
- githubToken: optional, user’s own

### Output sample

Real results from a run of this Actor:

```json
[
  {
    "repo": "apify/crawlee",
    "owner": "apify",
    "name": "crawlee",
    "url": "https://github.com/apify/crawlee",
    "description": "Crawlee—A web scraping and browser automation library for Node.js to build reliable crawlers. In JavaScript and TypeScript. Extract data for AI, LLMs, RAG, or GPTs. Download HTML, PDF, JPG, PNG, and other files from websites. Works with Puppeteer, Playwright, Cheerio, JSDOM, and raw HTTP. Both headful and headless mode. With proxy rotation.",
    "language": "TypeScript",
    "stars": 26275,
    "forks": 1736,
    "openIssues": 152,
    "watchers": 135,
    "topics": [
      "apify",
      "automation",
      "crawler",
      "crawling",
      "headless",
      "headless-chrome",
      "javascript",
      "nodejs",
      "npm",
      "playwright",
      "puppeteer",
      "scraper",
      "scraping",
      "typescript",
      "web-crawler",
      "web-crawling",
      "web-scraping"
    ],
    "license": "Apache-2.0",
    "homepage": "https://crawlee.dev",
    "isFork": false,
    "isArchived": false,
    "defaultBranch": "master",
    "sizeKb": 176629,
    "createdAt": "2016-08-26T18:35:03.000Z",
    "updatedAt": "2026-10-27T19:45:23.000Z",
    "pushedAt": "2026-10-27T16:50:56.000Z",
    "sourceUrl": "https://github.com/apify/crawlee",
    "scrapedAt": "2026-10-27T20:35:37.245Z"
  },
  {
    "repo": "react/react",
    "owner": "react",
    "name": "react",
    "url": "https://github.com/react/react",
    "description": "The library for web and native user interfaces.",
    "language": "JavaScript",
    "stars": 251784,
    "forks": 51574,
    "openIssues": 1502,
    "watchers": 6608,
    "topics": [
      "declarative",
      "frontend",
      "javascript",
      "library",
      "react",
      "ui"
    ],
    "license": "MIT",
    "homepage": "https://react.dev",
    "isFork": false,
    "isArchived": false,
    "defaultBranch": "main",
    "sizeKb": 1130153,
    "createdAt": "2013-05-24T16:15:54.000Z",
    "updatedAt": "2026-10-27T19:55:24.000Z",
    "pushedAt": "2026-10-27T15:08:39.000Z",
    "sourceUrl": "https://github.com/react/react",
    "scrapedAt": "2026-10-27T20:35:37.487Z"
  }
]
```

**Fields:**

- repo, owner, name, url, description, language, stars, forks
- Trending: rank, starsInPeriod, period
- Repos/search: openIssues, watchers, topics, license, homepage, isFork, isArchived, defaultBranch, sizeKb, createdAt, updatedAt, pushedAt

### Pricing

Pay per result: **$3.00 per 1,000 results**. You pay only for results you get; Apify platform costs are included. Set a maximum charge for a run and the Actor stops cleanly when it's reached, keeping everything collected so far.

### Tips

- Trending needs no token. For repos and search beyond 60 requests an hour, add your own GitHub token (no permissions needed).
- Search returns at most 1,000 results per query (a GitHub limit); split big searches with stars:>N ranges.

### FAQ

**Do I need an account on GitHub?** No. It only reads public pages and data.

**Is my token stored?** It is a secret input field: Apify encrypts it and it is only used for this run’s requests to GitHub.
**Something broke or a field is missing?** Open an issue on the Issues tab and include your run link. We fix scrapers quickly when sites change.

### Legal

This Actor collects publicly available data only. You're responsible for using it lawfully and in line with GitHub's terms.

# Actor input Schema

## `mode` (type: `string`):

Trending: GitHub's trending repositories. Repos: details for repositories you list. Search: GitHub repository search.

## `languages` (type: `array`):

Trending mode: e.g. python, typescript, rust. Leave empty for all languages.

## `since` (type: `string`):

Trending mode: trending today, this week or this month.

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

Repos mode: owner/name or GitHub links, e.g. apify/crawlee.

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

Search mode: GitHub search syntax works, e.g. web scraping language:typescript stars:>100.

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

Search mode: order of results.

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

Your own GitHub token raises the API limit from 60 to 5,000 requests an hour (repos and search modes). No scopes needed.

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

Stop after this many rows. You are only charged for rows you get.

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

Not usually needed.

## Actor input object example

```json
{
  "mode": "trending",
  "languages": [
    "python",
    "typescript"
  ],
  "since": "daily",
  "sort": "stars",
  "maxItems": 100,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `repositories` (type: `string`):

One row per repository.

# 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 = {
    "languages": [
        "python",
        "typescript"
    ],
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("vashiiq/github").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 = {
    "languages": [
        "python",
        "typescript",
    ],
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("vashiiq/github").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 '{
  "languages": [
    "python",
    "typescript"
  ],
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call vashiiq/github --silent --output-dataset

```

## MCP server setup

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

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/pPJQhuf5KeSAYRnmq/builds/4Y1LP2ZkXduTdac5e/openapi.json
