# Dollar Hunter - Multi-Source Data API (`chuckling_yarn/dollar-hunter-multi-source`) Actor

Fetch structured data from GitHub, Hacker News, and Reddit. No browser needed, instant results, minimal cost.

- **URL**: https://apify.com/chuckling\_yarn/dollar-hunter-multi-source.md
- **Developed by:** [Jonatan J. Martinez Collymoore](https://apify.com/chuckling_yarn) (community)
- **Categories:** Developer tools, News, Social media
- **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

## Multi-Source Data API — GitHub, HN & Reddit 🚀

**Apify Actor** that fetches trending data from **GitHub**, **Hacker News**, and **Reddit** in one unified API call. Built for content curators, developer dashboard builders, news aggregators, and trend researchers.

> ⚡ **Zero browser overhead** — all data comes via free REST APIs, so runs are fast and cheap.

---

### Features ✨

| Feature | Description |
|---------|-------------|
| **3 Sources, 1 API** | Fetch from GitHub Trending, Hacker News top stories, Reddit hot posts, or all at once |
| **Smart Retry Logic** | Automatic 3-attempt retry with exponential backoff on network errors and rate limits |
| **Rate Limit Handling** | Detects 429 responses and waits for `Retry-After` headers automatically |
| **Parallel Fetching** | When using `all` sources, fetches in parallel for maximum speed |
| **Customizable Filters** | Language filter for GitHub, subreddit selection for Reddit, time period for age |
| **Input Validation** | Validates all inputs before making API calls |
| **Detailed Logging** | Emoji-rich console output at every step for full transparency |

---

### Input Schema 📥

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `source` | select | `github` | Data source: `github`, `hackernews`, `reddit`, or `all` |
| `language` | string | `python` | Programming language filter for GitHub trending |
| `subreddit` | string | `programming` | Subreddit to fetch hot posts from |
| `maxResults` | integer | `15` | Max items per source (1–100) |
| `since` | select | `24h` | Time period: `24h`, `7d`, or `30d` |

#### Example input

```json
{
  "source": "all",
  "language": "typescript",
  "subreddit": "webdev",
  "maxResults": 10,
  "since": "7d"
}
````

***

### Output Schema 📤

The actor pushes a single dataset entry with this structure:

```json
{
  "source": "all",
  "totalResults": 30,
  "fetchedAt": "2026-07-17T12:00:00.000Z",
  "config": {
    "language": "typescript",
    "subreddit": "webdev",
    "maxResults": 10,
    "since": "7d"
  },
  "results": [
    {
      "_source": "github",
      "name": "vercel/ai",
      "stars": 12450,
      "forks": 1200,
      "description": "Build AI-powered applications...",
      "url": "https://github.com/vercel/ai",
      "language": "TypeScript",
      "topics": ["ai", "llm", "sdk"]
    },
    {
      "_source": "hackernews",
      "title": "Show HN: A new open-source database",
      "url": "https://example.com",
      "score": 342,
      "by": "username",
      "type": "story",
      "descendants": 87
    },
    {
      "_source": "reddit",
      "title": "What are you building?",
      "url": "https://reddit.com/r/webdev/...",
      "score": 156,
      "subreddit": "webdev",
      "comments": 43,
      "author": "user123"
    }
  ]
}
```

#### Result fields by source

| Source | Key Fields |
|--------|------------|
| **GitHub** | `name`, `stars`, `forks`, `description`, `url`, `language`, `topics`, `starsToday` |
| **Hacker News** | `title`, `url`, `score`, `by`, `type`, `descendants`, `time` |
| **Reddit** | `title`, `url`, `permalink`, `score`, `subreddit`, `comments`, `author`, `domain` |

All results include a `_source` field indicating the origin (`github`, `hackernews`, or `reddit`). When using `all` mode, results are sorted by score/stars descending.

***

### Use Cases 🎯

#### 1. Developer Dashboard Widget

Display trending GitHub repos, popular HN discussions, and active Reddit threads in a single developer dashboard panel.

```json
// Input: {"source": "all", "language": "javascript", "maxResults": 5, "since": "24h"}
```

#### 2. News & Content Aggregator

Build a daily digest of the most important developer news across all three platforms without managing separate integrations.

```json
// Input: {"source": "all", "maxResults": 20, "since": "24h"}
```

#### 3. Trend Monitoring Bot

Track what's gaining traction in a specific language ecosystem (e.g., Rust) by monitoring GitHub repos, HN discussions, and Reddit posts.

```json
// Input: {"source": "all", "language": "rust", "subreddit": "rust", "maxResults": 10, "since": "7d"}
```

#### 4. Social Proof & Link Curation

Find high-engagement content for newsletters, social media posts, or blog references by scoring across platforms.

```json
// Input: {"source": "hackernews", "maxResults": 30, "since": "24h"}
```

#### 5. Competitive Research

Track what open-source projects are trending in your competitor's tech stack.

```json
// Input: {"source": "github", "language": "python", "maxResults": 25, "since": "7d"}
```

#### 6. Multilingual Community Monitoring

Monitor niche subreddits and language-specific GitHub repos for emerging technologies.

```json
// Input: {"source": "all", "language": "kotlin", "subreddit": "androiddev", "maxResults": 10}
```

***

### FAQ ❓

#### Q: Why is Reddit returning no data?

**A:** As of mid-2023, Reddit restricts API access from many cloud IP ranges (including Apify's). The Reddit source tries multiple endpoints but will gracefully fail with a clear message if blocked. To use Reddit data reliably, consider setting up a Reddit OAuth app or running the actor from a residential IP.

#### Q: Is this actor free to use?

**A:** Yes! All three data sources (GitHub, HN, Reddit) use free public REST APIs. You only pay for Apify platform compute time, which is minimal since there's no browser overhead.

#### Q: How many results can I fetch?

**A:** Up to 100 per source. Using `all` mode with `maxResults: 100` fetches up to 300 total items (100 from each source).

#### Q: What happens if one source fails?

**A:** In `all` mode, each source is fetched independently. If one fails (e.g., GitHub rate limited), the other two still return data. Failures are logged clearly.

#### Q: Does the actor handle API rate limits?

**A:** Yes! It automatically detects 429 (Too Many Requests) responses and respects `Retry-After` headers with exponential backoff. GitHub rate limit remaining is logged after each request.

#### Q: What time period options are available?

**A:** `24h` (last 24 hours), `7d` (last 7 days), or `30d` (last 30 days). This primarily affects GitHub's search query; HN and Reddit always return their current top/hot lists.

#### Q: Can I run this on a schedule?

**A:** Absolutely. Set up an Apify schedule (e.g., every 6 hours) to build a continuous data pipeline for dashboards or monitoring.

#### Q: What's in the `_source` field?

**A:** Every result includes `_source` set to `"github"`, `"hackernews"`, or `"reddit"` so you can easily filter or tag items by origin in downstream processing.

***

### Pricing 💰

This actor uses **free REST APIs** — no paid API keys required. Apify platform charges are based on compute time only, which is typically **under 3 seconds per run** (~$0.001 USD per run on Apify). Scheduled runs at any interval are cost-effective.

***

### Technical Notes 🔧

- **Runtime:** Node.js 20 (Playwright image — retained for compatibility, but Playwright is not used)
- **Retry Strategy:** 3 attempts with exponential backoff (1s → 2s → 4s, capped at 15s)
- **Timeout:** 30s per individual request
- **Edge Cases Handled:**
  - Empty responses from any source
  - Network timeouts and connection resets
  - Rate limiting (429) with Retry-After support
  - Missing fields in API responses (graceful fallback to defaults)
  - Invalid subreddit names (returns empty array)
  - Malformed JSON responses (caught and logged)
  - Partial failures in `all` mode (other sources still return data)

***

*Built with ❤️ for the Dollar Hunter project — set & forget income through automation.*

# Actor input Schema

## `source` (type: `string`):

Which source(s) to fetch data from. Choose 'github' for trending repos, 'hackernews' for top stories, 'reddit' for hot posts, or 'all' to combine all three sources.

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

Programming language filter for GitHub trending repositories. Examples: python, javascript, typescript, rust, go, java, swift, kotlin, cpp, ruby

## `subreddit` (type: `string`):

Subreddit to fetch hot posts from. Popular choices: programming, python, javascript, rust, golang, webdev, datascience, machinelearning, devops

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

Maximum number of results to return per source (1-100). When using 'all', up to this many items are fetched from each source then combined and sorted.

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

Time period filter applied to GitHub trending repositories. '24h' = last day, '7d' = last week, '30d' = last month.

## Actor input object example

```json
{
  "source": "github",
  "language": "python",
  "subreddit": "programming",
  "maxResults": 15,
  "since": "24h"
}
```

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("chuckling_yarn/dollar-hunter-multi-source").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("chuckling_yarn/dollar-hunter-multi-source").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 '{}' |
apify call chuckling_yarn/dollar-hunter-multi-source --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Dollar Hunter - Multi-Source Data API",
        "description": "Fetch structured data from GitHub, Hacker News, and Reddit. No browser needed, instant results, minimal cost.",
        "version": "2.0",
        "x-build-id": "gcu2tSzOfDzId9y3c"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/chuckling_yarn~dollar-hunter-multi-source/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-chuckling_yarn-dollar-hunter-multi-source",
                "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-multi-source/runs": {
            "post": {
                "operationId": "runs-sync-chuckling_yarn-dollar-hunter-multi-source",
                "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-multi-source/run-sync": {
            "post": {
                "operationId": "run-sync-chuckling_yarn-dollar-hunter-multi-source",
                "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": {
                    "source": {
                        "title": "Data Source",
                        "enum": [
                            "github",
                            "hackernews",
                            "reddit",
                            "all"
                        ],
                        "type": "string",
                        "description": "Which source(s) to fetch data from. Choose 'github' for trending repos, 'hackernews' for top stories, 'reddit' for hot posts, or 'all' to combine all three sources.",
                        "default": "github"
                    },
                    "language": {
                        "title": "GitHub Language Filter",
                        "type": "string",
                        "description": "Programming language filter for GitHub trending repositories. Examples: python, javascript, typescript, rust, go, java, swift, kotlin, cpp, ruby",
                        "default": "python"
                    },
                    "subreddit": {
                        "title": "Reddit Subreddit",
                        "type": "string",
                        "description": "Subreddit to fetch hot posts from. Popular choices: programming, python, javascript, rust, golang, webdev, datascience, machinelearning, devops",
                        "default": "programming"
                    },
                    "maxResults": {
                        "title": "Max Results",
                        "minimum": 1,
                        "maximum": 100,
                        "type": "integer",
                        "description": "Maximum number of results to return per source (1-100). When using 'all', up to this many items are fetched from each source then combined and sorted.",
                        "default": 15
                    },
                    "since": {
                        "title": "Time Period",
                        "enum": [
                            "24h",
                            "7d",
                            "30d"
                        ],
                        "type": "string",
                        "description": "Time period filter applied to GitHub trending repositories. '24h' = last day, '7d' = last week, '30d' = last month.",
                        "default": "24h"
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
