# Dollar Hunter - GitHub Trending Repos (`chuckling_yarn/dollar-hunter-github-trending`) Actor

Get trending GitHub repositories by language. Perfect for developers, recruiters, and tech investors tracking open source trends.

- **URL**: https://apify.com/chuckling\_yarn/dollar-hunter-github-trending.md
- **Developed by:** [Jonatan J. Martinez Collymoore](https://apify.com/chuckling_yarn) (community)
- **Categories:** Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-usage

## 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 Trending Repos Search — Apify Actor

> Scrape trending GitHub repositories by programming language, time period, and sort order. Zero API keys required. Returns stars, forks, topics, and full metadata for every repo.

[![Built with Apify](https://img.shields.io/badge/Apify-Actor-blue?logo=apify)](https://apify.com)
[![Node](https://img.shields.io/badge/Node-18%2B-green)](https://nodejs.org)

---

### ✨ Features

- 🔍 **Filter by language** — Python, JavaScript, Rust, Go, TypeScript, and 20+ more
- ⏱ **Time period** — Daily, weekly, or monthly trending repos
- 📊 **Sort options** — By stars (hot) or last updated (fresh)
- 📄 **Pagination** — Fetch up to 100 results (GitHub max), auto-paginates
- 🔁 **Auto-retry** — 3 retry attempts with exponential backoff on rate limits and server errors
- 🛡 **No API key** — Uses the public GitHub Search API (unauthenticated)
- 📦 **Structured output** — Clean JSON with name, description, stars, forks, URL, language, topics, author, updated date
- 🏆 **Top N summary** — Console output shows top 5 with star counts

---

### 📥 Input

| Field | Type | Default | Possible Values | Description |
|-------|------|---------|----------------|-------------|
| `language` | string | `python` | See [Supported Languages](#-supported-languages) | Programming language filter |
| `maxResults` | integer | `25` | `1` – `100` | Maximum repos to return (per run) |
| `since` | string | `daily` | `daily`, `weekly`, `monthly` | Time range for trending repos |
| `sort` | string | `stars` | `stars`, `updated` | Sort by star count or last update |

#### 🌐 Supported Languages

| | | | |
|---|---|---|---|
| python | javascript | typescript | rust |
| go | java | kotlin | swift |
| cpp | csharp | ruby | php |
| shell | lua | haskell | elixir |
| scala | dart | r | perl |
| zig | crystal | solidity | |

---

### 📤 Output

Each run produces a single dataset entry with the following structure:

| Field | Type | Description |
|-------|------|-------------|
| `language` | string | Language requested |
| `since` | string | Time period requested |
| `sort` | string | Sort field requested |
| `totalResults` | integer | Number of repos returned |
| `results` | array | Array of repository objects |

Each repository object in `results`:

| Field | Type | Description |
|-------|------|-------------|
| `name` | string | Full repo name (e.g. `owner/repo`) |
| `description` | string | Repo description (max 500 chars) |
| `stars` | integer | Star count |
| `forks` | integer | Fork count |
| `url` | string | GitHub URL |
| `language` | string | Detected language |
| `topics` | array | GitHub topic tags |
| `updated` | string | Last update timestamp (ISO 8601) |
| `author` | string | Owner login |

---

### 🎯 Use Cases

1. **🔬 Tech scouting** — Find what's trending in open source. Spot the next big framework before it goes mainstream.
2. **🎯 Developer recruiting** — Discover top talent contributing to trending projects in your stack.
3. **📈 Market & trend research** — Track language popularity shifts over time. Compare Rust vs Go activity weekly.
4. **🤖 AI/ML training data** — Curate repositories for fine-tuning code models, RAG datasets, or benchmark collections.
5. **📰 Content creation** — Generate "Trending This Week" roundups for newsletters, blogs, or social media.
6. **📊 Competitive intelligence** — Monitor which open-source projects are gaining traction in your industry.

---

### 📋 Example

#### Input
```json
{
  "language": "rust",
  "maxResults": 10,
  "since": "weekly",
  "sort": "stars"
}
````

#### Output (sample)

```json
{
  "language": "rust",
  "since": "weekly",
  "sort": "stars",
  "totalResults": 10,
  "results": [
    {
      "name": "rustdesk/rustdesk",
      "description": "An open-source remote desktop, and alternative to TeamViewer.",
      "stars": 84523,
      "forks": 11234,
      "url": "https://github.com/rustdesk/rustdesk",
      "language": "Rust",
      "topics": ["remote-desktop", "rust", "vnc"],
      "updated": "2025-07-16T12:34:56Z",
      "author": "rustdesk"
    }
  ]
}
```

***

### ❓ FAQ

#### ❔ Do I need a GitHub API token?

No. The actor calls the public GitHub Search API without authentication. GitHub's unauthenticated rate limit (~10 req/min) is sufficient for occasional use at 25 results per run. For higher throughput, the actor automatically retries on 403/429 with `Retry-After` header support.

#### ❔ Why am I getting fewer results than `maxResults`?

GitHub's Search API caps unauthenticated requests at 100 results per query and may return fewer if there aren't enough trending repos in the given language + time window. The actor transparently handles pagination and returns whatever is available.

#### ❔ Can I run this on a schedule?

Yes! Apify lets you schedule any actor on a cron. Set `since: "weekly"` with a weekly schedule to get a consistent snapshot of trending projects over time.

#### ❔ What happens when GitHub rate-limits me?

Built-in retry logic catches 403 (rate limit) and 429 (too many requests) responses, reads the `Retry-After` header, waits the specified duration (up to 120 seconds), and retries up to 3 times. Partial results are preserved if a retry ultimately fails.

***

### 💰 Pricing

| Metric | Cost |
|--------|------|
| Per run (25 repos) | $0.00 |
| Per run (100 repos) | $0.00 |
| Platform fee | Apify platform usage charges apply |

This actor only charges for successful data pushes. Failed runs are free.

***

### 🏷 Tags

`github` `trending` `open-source` `developer-tools` `scraper` `repositories` `stars` `programming-languages`

***

<p align="center">
  <sub>Built with ❤️ for the open-source community</sub>
</p>

# Actor input Schema

## `language` (type: `string`):

Filter trending repos by programming language. Choose from 20+ popular languages including Python, JavaScript, Rust, Go, TypeScript, and more.

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

Which time range to look for trending repositories. Daily shows repos created in the last 24 hours, weekly shows the last 7 days, monthly shows the last 30 days.

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

Sort results by number of stars (hot repos) or by last updated timestamp (recently active repos).

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

Maximum number of trending repositories to return (between 1 and 100). More results may increase run time due to pagination.

## Actor input object example

```json
{
  "language": "python",
  "since": "daily",
  "sort": "stars",
  "maxResults": 25
}
```

# 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 = {
    "language": "python",
    "since": "daily",
    "sort": "stars",
    "maxResults": 25
};

// Run the Actor and wait for it to finish
const run = await client.actor("chuckling_yarn/dollar-hunter-github-trending").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 = {
    "language": "python",
    "since": "daily",
    "sort": "stars",
    "maxResults": 25,
}

# Run the Actor and wait for it to finish
run = client.actor("chuckling_yarn/dollar-hunter-github-trending").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 '{
  "language": "python",
  "since": "daily",
  "sort": "stars",
  "maxResults": 25
}' |
apify call chuckling_yarn/dollar-hunter-github-trending --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Dollar Hunter - GitHub Trending Repos",
        "description": "Get trending GitHub repositories by language. Perfect for developers, recruiters, and tech investors tracking open source trends.",
        "version": "2.0",
        "x-build-id": "QkD9HuP5j9tio2FL1"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/chuckling_yarn~dollar-hunter-github-trending/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-chuckling_yarn-dollar-hunter-github-trending",
                "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/chuckling_yarn~dollar-hunter-github-trending/runs": {
            "post": {
                "operationId": "runs-sync-chuckling_yarn-dollar-hunter-github-trending",
                "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/chuckling_yarn~dollar-hunter-github-trending/run-sync": {
            "post": {
                "operationId": "run-sync-chuckling_yarn-dollar-hunter-github-trending",
                "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": {
                    "language": {
                        "title": "Programming Language",
                        "enum": [
                            "python",
                            "javascript",
                            "typescript",
                            "rust",
                            "go",
                            "java",
                            "kotlin",
                            "swift",
                            "cpp",
                            "csharp",
                            "ruby",
                            "php",
                            "shell",
                            "lua",
                            "haskell",
                            "elixir",
                            "scala",
                            "dart",
                            "r",
                            "perl",
                            "zig",
                            "crystal",
                            "solidity"
                        ],
                        "type": "string",
                        "description": "Filter trending repos by programming language. Choose from 20+ popular languages including Python, JavaScript, Rust, Go, TypeScript, and more.",
                        "default": "python"
                    },
                    "since": {
                        "title": "Time Period",
                        "enum": [
                            "daily",
                            "weekly",
                            "monthly"
                        ],
                        "type": "string",
                        "description": "Which time range to look for trending repositories. Daily shows repos created in the last 24 hours, weekly shows the last 7 days, monthly shows the last 30 days.",
                        "default": "daily"
                    },
                    "sort": {
                        "title": "Sort By",
                        "enum": [
                            "stars",
                            "updated"
                        ],
                        "type": "string",
                        "description": "Sort results by number of stars (hot repos) or by last updated timestamp (recently active repos).",
                        "default": "stars"
                    },
                    "maxResults": {
                        "title": "Maximum Results",
                        "minimum": 1,
                        "maximum": 100,
                        "type": "integer",
                        "description": "Maximum number of trending repositories to return (between 1 and 100). More results may increase run time due to pagination.",
                        "default": 25
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
