# Hacker News Scraper — Stories, Comments & Users API (`sian.agency/hacker-news-scraper`) Actor

Hacker News scraper & data API. Extract front-page stories, full comment threads, Ask/Show HN, jobs, polls, search results and user profiles: title, score, author, comment count, body text, links, karma — clean JSON/CSV. Fast overview or full detail. No-code, no API key needed.

- **URL**: https://apify.com/sian.agency/hacker-news-scraper.md
- **Developed by:** [SIÁN OÜ](https://apify.com/sian.agency) (community)
- **Categories:** Social media, News, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.50 / 1,000 overview item 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/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.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.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/platform/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

## Hacker News Scraper — Stories, Comments, Jobs & Users 🚀

[![SIÁN Agency Store](https://img.shields.io/badge/Store-SI%C3%81N%20Agency-1AE392)](https://apify.com/sian.agency?fpr=sian) [![Google News Scraper](https://img.shields.io/badge/Store-Google%20News%20Scraper-4285F4)](https://apify.com/sian.agency/google-news-scraper?fpr=sian) [![Douban Movie Scraper](https://img.shields.io/badge/Store-Douban%20Movie%20Scraper-2D963D)](https://apify.com/sian.agency/douban-movie-scraper?fpr=sian) [![Bilibili Video Scraper](https://img.shields.io/badge/Store-Bilibili%20Video%20Scraper-00A1D6)](https://apify.com/sian.agency/bilibili-video-scraper?fpr=sian)

#### 🎉 Pull the entire Hacker News front page, full comment threads, search results and user profiles into one clean dataset — no API key, no code.
##### Built for founders, researchers, growth teams and devs who track what tech is talking about.

---

### 📋 Overview

**Want to know what tech is reading right now?** Hacker News Scraper turns any front-page list, search query, comment thread or user profile into clean, structured JSON/CSV — ready for your dashboard, model or spreadsheet.

**Why thousands of professionals choose us:**
- ✅ **Everything HN, one tool**: stories, comments, Ask HN, Show HN, jobs, polls and user profiles
- ⚡ **Fast overview mode**: top/new/best lists and full-text search in seconds
- 🎯 **Deep detail mode**: full body text, the parent chain and the whole comment thread (`kids`)
- 💰 **Pay-per-result**: only pay for items you actually extract — generous free tier, unlimited paid
- 💎 **Author enrichment**: optionally attach each author's karma, account age and submission count
- ✨ **Zero setup**: no account, no API key, no rate-limit juggling — just press Start

---

### ✨ Features

- 📰 **Front-Page Lists**: scrape Top, Newest, Best, Ask HN, Show HN and Jobs
- 🔎 **Full-Text Search**: find every story or comment mentioning a keyword, product or company
- 🏷️ **Type Filters**: restrict to stories, comments, polls, jobs, Ask HN or Show HN
- 🧵 **Full Comment Threads**: detail mode returns the body text and child comment IDs
- 👤 **User Profiles**: karma, account creation date, bio and submission count by username
- 🔗 **Paste-a-URL**: drop in a `news.ycombinator.com` or search URL and go
- 🆕 **Sort by Date or Relevance**: choose recency or best-match ranking for searches
- 📦 **Clean Exports**: JSON, CSV and Excel straight from the Apify dataset

---

### 🎬 Quick Start

Pick a mode, set what you want, press **Start**. Results stream into the dataset in seconds. Below: pull the 30 top front-page stories.

```bash
curl -X POST https://api.apify.com/v2/acts/sian.agency~hacker-news-scraper/runs?token=YOUR_TOKEN \
-H 'Content-Type: application/json' \
-d '{"scrapeMode": "overview", "searchMode": "byList", "list": "top", "maxResults": 30}'
````

***

### 🚀 Getting Started (3 Simple Steps)

#### Step 1: Choose your mode

Pick **Overview** (fast lists/search), **Detail** (full text + thread) or **User** (profiles).

#### Step 2: Tell it what to scrape

Select a list, type a search query, or paste item IDs / usernames.

#### Step 3: Press Start

Items stream into the dataset — export to JSON, CSV or Excel.

**That's it! In under a minute, you'll have:**

- A structured table of stories, comments or profiles
- Scores, authors, comment counts and links
- A dataset ready for analysis, alerts or dashboards

***

### 📥 Input Configuration

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| scrapeMode | string | No | `overview`, `detail` or `user` |
| searchMode | string | No | `byList`, `byQuery`, `bySearchUrl`, `byItemUrl`, `byUser` (auto-detected) |
| list | string | No | Front-page list: `top`, `new`, `best`, `ask`, `show`, `job` |
| query | string | No | Full-text search query |
| tags | string | No | `story`, `comment`, `poll`, `job`, `ask_hn`, `show_hn` |
| byDate | boolean | No | Sort search by recency instead of relevance |
| searchUrls | array | No | Paste search or front-page URLs |
| itemUrls | array | No | Detail mode: item IDs or `item?id=` URLs |
| usernames | array | No | User mode: usernames or `user?id=` URLs |
| withUser | boolean | No | Detail mode: also fetch each author's profile |
| maxResults | integer | No | Max items per run (FREE: 25, PAID: unlimited) |
| maxPages | integer | No | Search paging depth |
| hitsPerPage | integer | No | Search page size |

**Example — search stories about "rust":**

```json
{
  "scrapeMode": "overview",
  "searchMode": "byQuery",
  "query": "rust",
  "tags": "story",
  "maxResults": 100
}
```

**Example — full detail on specific items:**

```json
{
  "scrapeMode": "detail",
  "itemUrls": ["48649435", "https://news.ycombinator.com/item?id=37392676"],
  "withUser": true
}
```

***

### 📤 Output

Results are saved to the Apify dataset with rich, structured fields including:

| Field | Type | Description |
|-------|------|-------------|
| id | number | The Hacker News item ID |
| type | string | story · comment · job · poll |
| storyTitle | string | The item title |
| target\_url | string | The external link the story points to |
| score | number | Points / upvotes |
| author | string | Submitting username |
| num\_comments | number | Total comment count |
| time | number | Creation time (epoch seconds) |
| text | string | Body text (Ask HN / comment / text post) |
| kid\_ids | array | Child comment IDs (the thread) |
| url | string | Hacker News page for the item |
| karma | number | User mode: account karma |
| about | string | User mode: profile bio |

**Example:**

```json
{
  "id": 48649435,
  "url": "https://news.ycombinator.com/item?id=48649435",
  "type": "story",
  "storyTitle": "Jerry's Map",
  "target_url": "http://www.jerrysmap.com/the-map",
  "score": 318,
  "author": "turtleyacht",
  "num_comments": 47,
  "time": 1718900000,
  "kid_count": 12
}
```

***

### 💼 Use Cases & Examples

#### 1. Tech Trend Tracking

**Founders & analysts watching what's gaining traction.**

**Input:** `list: top`, overview mode
**Output:** ranked front-page stories with scores and comment counts
**Use:** a daily snapshot of what the tech community is reading.

#### 2. Brand & Product Monitoring

**Growth teams tracking mentions of their product or competitors.**

**Input:** `query: "your product"`, `tags: story,comment`
**Output:** every story and comment mentioning the keyword
**Use:** sentiment, alerts and reputation monitoring.

#### 3. Comment & Thread Analysis

**Researchers studying discussion structure.**

**Input:** detail mode on a story ID
**Output:** body text plus the full child comment thread
**Use:** discourse analysis, summarization, training data.

#### 4. Hiring & Jobs Intelligence

**Recruiters mining "Who is hiring?" and the jobs list.**

**Input:** `list: job` or `query: "who is hiring"`
**Output:** job posts with text and links
**Use:** a structured feed of tech roles.

#### 5. User & Community Research

**Community managers profiling top contributors.**

**Input:** user mode with a list of usernames
**Output:** karma, account age, bio and submission count
**Use:** influencer mapping and outreach.

#### 6. Dataset Building for AI

**ML engineers building tech-news corpora.**

**Input:** search or list mode at scale
**Output:** clean, labeled rows of stories and comments
**Use:** fine-tuning, RAG and benchmarks.

***

### 🔗 Integration Examples

#### JavaScript/Node.js

```javascript
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: 'YOUR_TOKEN' });

const run = await client.actor('sian.agency/hacker-news-scraper').call({
  scrapeMode: 'overview',
  searchMode: 'byList',
  list: 'top',
  maxResults: 30,
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items[0]);
```

#### Python

```python
from apify_client import ApifyClient
client = ApifyClient('YOUR_TOKEN')

run = client.actor('sian.agency/hacker-news-scraper').call(
    run_input={'scrapeMode': 'overview', 'query': 'rust', 'tags': 'story'}
)

for item in client.dataset(run['defaultDatasetId']).iterate_items():
    print(item)
```

#### cURL

```bash
curl -X POST 'https://api.apify.com/v2/acts/sian.agency~hacker-news-scraper/runs?token=YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"scrapeMode": "overview", "list": "best", "maxResults": 50}'
```

#### Automation Workflows (N8N / Zapier / Make)

1. **Trigger**: Schedule (e.g. hourly) or webhook
2. **HTTP Request**: Call the actor API
3. **Process**: Handle the JSON results
4. **Action**: Save to a sheet, send a Slack alert, or feed a model

***

### 📊 Performance & Pricing

#### FREE Tier (Try It Now)

- **25 items** per run — full feature access, same quality
- No credit card required
- Perfect for testing and small projects

#### PAID Tier (Production Ready)

- **Unlimited** items per run
- Pay-per-result: only charged for items you actually extract
- Best for monitoring, dashboards and large datasets

💰 **Transparent pay-per-result pricing** — you're never charged for an invalid run.

🔗 [View current pricing](https://apify.com/sian.agency/hacker-news-scraper?fpr=sian)

***

### ❓ Frequently Asked Questions

**Q: How many items can I scrape?**
A: FREE tier: 25 per run. PAID tier: unlimited.

**Q: Can I get the full comment thread of a story?**
A: Yes — use **Detail** mode. You get the body text plus the child comment IDs.

**Q: Can I search for a keyword across all of Hacker News?**
A: Yes — use **Overview** mode with a `query` and optional `tags` to restrict to stories, comments, Ask HN, etc.

**Q: What output formats are available?**
A: JSON, CSV and Excel — export directly from the Apify dataset.

**Q: Do I need a Hacker News account or API key?**
A: No. The actor only reads publicly available content — no login required.

**Q: Can I get user karma and profile info?**
A: Yes — use **User** mode with usernames, or enable author enrichment in Detail mode.

**Q: Is this legal?**
A: Yes — we only extract publicly available data. See the legal section below.

***

### 🐛 Troubleshooting

**No results returned**

- In `byQuery` mode, make sure `query` is set; in `byList` mode, make sure `list` is valid.
- Some niche searches genuinely return few hits — try broader terms or `byDate: false`.

**Hit the free-tier cap**

- FREE runs stop at 25 items. Upgrade to PAID for unlimited items per run.

**Detail mode returned fewer rows than expected**

- Deleted or dead items are skipped automatically — that's expected.

**Search isn't recent enough**

- Set `byDate: true` to sort by recency instead of relevance.

***

### ⚖️ Is it legal to scrape data?

Our actors are ethical and do not extract any private user data, such as email addresses, gender, or location. They only extract what the user has chosen to share publicly. We therefore believe that our actors, when used for ethical purposes by Apify users, are safe.

However, you should be aware that your results could contain personal data. Personal data is protected by the **GDPR** in the European Union and by other regulations around the world. You should not scrape personal data unless you have a legitimate reason to do so. If you're unsure whether your reason is legitimate, consult your lawyers.

You can also read Apify's blog post on the [legality of web scraping](https://blog.apify.com/is-web-scraping-legal/).

***

### 🤝 Support

[![Telegram Support](https://img.shields.io/badge/Telegram-Support%20Group-0088cc?logo=telegram)](https://t.me/+vyh1sRE08sAxMGRi)

**Join our active support community**

- For issues or questions, open an issue in the actor's repository
- Check [SIÁN Agency Store](https://apify.com/sian.agency?fpr=sian) for more automation tools
- 📧 <apify@sian-agency.online>

***

### 📌 Disclaimer

This actor is an independent tool and is **not affiliated with, endorsed by, or sponsored by Hacker News or Y Combinator**. "Hacker News" and "Y Combinator" are trademarks of their respective owners. The actor accesses only publicly available content and is intended for lawful use in line with applicable terms and regulations.

***

**Built by [SIÁN Agency](https://www.sian-agency.online)** | **[More Tools](https://apify.com/sian.agency?fpr=sian)**

# Actor input Schema

## `scrapeMode` (type: `string`):

🧭 **CHOOSE WHAT TO EXTRACT:**

- **Overview** — fast list/search results (title, score, author, comment count, link). Best for trends & monitoring.
- **Detail** — full items including the body text, parent and the whole comment thread (`kids`). Best for deep analysis.
- **User** — profiles by username (karma, account age, bio, submission count).

💡 **TIP:** Start with Overview to discover, then run Detail on the IDs you care about.

## `searchMode` (type: `string`):

🔀 **HOW TO FIND ITEMS.** Leave blank to auto-detect from the fields you fill in.

- **byList** — a Hacker News front-page list (set *List* below).
- **byQuery** — full-text search (set *Search Query*).
- **bySearchUrl** — paste a `hn.algolia.com` or `news.ycombinator.com` URL.
- **byItemUrl** — Detail mode: paste explicit item IDs or `item?id=` URLs.
- **byUser** — User mode: set *Usernames*.

## `list` (type: `string`):

📰 **FRONT-PAGE LIST** (used when Search Mode = By list). Pick which Hacker News list to pull.

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

🔎 **FULL-TEXT SEARCH** (used when Search Mode = By query). Any keyword, phrase, product or company name.

💡 **TIP:** Combine with *Tags* below to restrict to stories, comments, Ask HN, etc.

## `tags` (type: `string`):

🏷️ **RESTRICT THE SEARCH** by item type (used with *Search Query*).

- `story` · `comment` · `poll` · `job`
- `ask_hn` · `show_hn` · `front_page`

💡 You can also target one author with `author_<username>`.

## `byDate` (type: `boolean`):

🆕 **SORT BY RECENCY** instead of relevance when searching. Off = most relevant first, On = newest first.

## `searchUrls` (type: `array`):

🔗 **PASTE URLs** (used when Search Mode = By search URL). Each line a `hn.algolia.com` search URL (filters carried through verbatim) or a `news.ycombinator.com` front-page URL.

💡 **BULK EDIT:** Click "Bulk edit" to paste many URLs, one per line.

## `itemUrls` (type: `array`):

🧵 **EXPLICIT ITEMS** (Detail mode, Search Mode = By item ID/URL). Each line a numeric item ID (e.g. `48649435`) or a full `https://news.ycombinator.com/item?id=...` URL.

💡 **BULK EDIT:** Click "Bulk edit" to paste many IDs, one per line.

## `usernames` (type: `array`):

👤 **USER PROFILES** (User mode). Each line a Hacker News username (e.g. `pg`) or a `user?id=` URL.

💡 **BULK EDIT:** Click "Bulk edit" to paste many usernames, one per line.

## `withUser` (type: `boolean`):

👤 **AUTHOR ENRICHMENT** (Detail mode). Also fetch each item author's karma, account age and submission count, adding `author_karma`, `author_created` and `author_submitted_count` to the row.

⚙️ Adds one extra request per unique author.

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

🔢 **HARD CAP** on the number of items saved this run.

- **FREE users:** up to 25 items per run
- **PAID users:** unlimited

💡 Lower this to keep runs cheap while testing.

## `maxPages` (type: `integer`):

📄 **SEARCH PAGING** — how many result pages to fetch in query/search-URL modes (each page = *Hits Per Page* items).

## `hitsPerPage` (type: `integer`):

🔢 **PAGE SIZE** for search modes (max 1000). Higher = fewer requests for the same number of results.

## Actor input object example

```json
{
  "scrapeMode": "overview",
  "searchMode": "byList",
  "list": "top",
  "query": "rust",
  "tags": "story",
  "byDate": false,
  "searchUrls": [],
  "itemUrls": [],
  "usernames": [],
  "withUser": false,
  "maxResults": 100,
  "maxPages": 2,
  "hitsPerPage": 50
}
```

# Actor output Schema

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

The scraped Hacker News items and user profiles.

# 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 = {
    "scrapeMode": "overview",
    "searchMode": "byList",
    "list": "top",
    "query": "",
    "tags": "story",
    "searchUrls": [],
    "itemUrls": [],
    "usernames": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("sian.agency/hacker-news-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 = {
    "scrapeMode": "overview",
    "searchMode": "byList",
    "list": "top",
    "query": "",
    "tags": "story",
    "searchUrls": [],
    "itemUrls": [],
    "usernames": [],
}

# Run the Actor and wait for it to finish
run = client.actor("sian.agency/hacker-news-scraper").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 '{
  "scrapeMode": "overview",
  "searchMode": "byList",
  "list": "top",
  "query": "",
  "tags": "story",
  "searchUrls": [],
  "itemUrls": [],
  "usernames": []
}' |
apify call sian.agency/hacker-news-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=sian.agency/hacker-news-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Hacker News Scraper — Stories, Comments & Users API",
        "description": "Hacker News scraper & data API. Extract front-page stories, full comment threads, Ask/Show HN, jobs, polls, search results and user profiles: title, score, author, comment count, body text, links, karma — clean JSON/CSV. Fast overview or full detail. No-code, no API key needed.",
        "version": "1.0",
        "x-build-id": "kRnTzk4AZU5dsRwGa"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/sian.agency~hacker-news-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-sian.agency-hacker-news-scraper",
                "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/sian.agency~hacker-news-scraper/runs": {
            "post": {
                "operationId": "runs-sync-sian.agency-hacker-news-scraper",
                "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/sian.agency~hacker-news-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-sian.agency-hacker-news-scraper",
                "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": {
                    "scrapeMode": {
                        "title": "🧭 Scrape Mode",
                        "enum": [
                            "overview",
                            "detail",
                            "user"
                        ],
                        "type": "string",
                        "description": "🧭 **CHOOSE WHAT TO EXTRACT:**\n\n- **Overview** — fast list/search results (title, score, author, comment count, link). Best for trends & monitoring.\n- **Detail** — full items including the body text, parent and the whole comment thread (`kids`). Best for deep analysis.\n- **User** — profiles by username (karma, account age, bio, submission count).\n\n💡 **TIP:** Start with Overview to discover, then run Detail on the IDs you care about.",
                        "default": "overview"
                    },
                    "searchMode": {
                        "title": "🔀 Search Mode (optional)",
                        "enum": [
                            "byList",
                            "byQuery",
                            "bySearchUrl",
                            "byItemUrl",
                            "byUser"
                        ],
                        "type": "string",
                        "description": "🔀 **HOW TO FIND ITEMS.** Leave blank to auto-detect from the fields you fill in.\n\n- **byList** — a Hacker News front-page list (set *List* below).\n- **byQuery** — full-text search (set *Search Query*).\n- **bySearchUrl** — paste a `hn.algolia.com` or `news.ycombinator.com` URL.\n- **byItemUrl** — Detail mode: paste explicit item IDs or `item?id=` URLs.\n- **byUser** — User mode: set *Usernames*.",
                        "default": "byList"
                    },
                    "list": {
                        "title": "📰 Front-Page List",
                        "enum": [
                            "top",
                            "new",
                            "best",
                            "ask",
                            "show",
                            "job"
                        ],
                        "type": "string",
                        "description": "📰 **FRONT-PAGE LIST** (used when Search Mode = By list). Pick which Hacker News list to pull.",
                        "default": "top"
                    },
                    "query": {
                        "title": "🔎 Search Query",
                        "type": "string",
                        "description": "🔎 **FULL-TEXT SEARCH** (used when Search Mode = By query). Any keyword, phrase, product or company name.\n\n💡 **TIP:** Combine with *Tags* below to restrict to stories, comments, Ask HN, etc.",
                        "default": ""
                    },
                    "tags": {
                        "title": "🏷️ Search Tags",
                        "type": "string",
                        "description": "🏷️ **RESTRICT THE SEARCH** by item type (used with *Search Query*).\n\n- `story` · `comment` · `poll` · `job`\n- `ask_hn` · `show_hn` · `front_page`\n\n💡 You can also target one author with `author_<username>`.",
                        "default": "story"
                    },
                    "byDate": {
                        "title": "🆕 Sort By Date",
                        "type": "boolean",
                        "description": "🆕 **SORT BY RECENCY** instead of relevance when searching. Off = most relevant first, On = newest first.",
                        "default": false
                    },
                    "searchUrls": {
                        "title": "🔗 Search URLs",
                        "uniqueItems": true,
                        "type": "array",
                        "description": "🔗 **PASTE URLs** (used when Search Mode = By search URL). Each line a `hn.algolia.com` search URL (filters carried through verbatim) or a `news.ycombinator.com` front-page URL.\n\n💡 **BULK EDIT:** Click \"Bulk edit\" to paste many URLs, one per line.",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "itemUrls": {
                        "title": "🧵 Item IDs or URLs",
                        "uniqueItems": true,
                        "type": "array",
                        "description": "🧵 **EXPLICIT ITEMS** (Detail mode, Search Mode = By item ID/URL). Each line a numeric item ID (e.g. `48649435`) or a full `https://news.ycombinator.com/item?id=...` URL.\n\n💡 **BULK EDIT:** Click \"Bulk edit\" to paste many IDs, one per line.",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "usernames": {
                        "title": "👤 Usernames",
                        "uniqueItems": true,
                        "type": "array",
                        "description": "👤 **USER PROFILES** (User mode). Each line a Hacker News username (e.g. `pg`) or a `user?id=` URL.\n\n💡 **BULK EDIT:** Click \"Bulk edit\" to paste many usernames, one per line.",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "withUser": {
                        "title": "👤 Enrich With Author Profile (Detail)",
                        "type": "boolean",
                        "description": "👤 **AUTHOR ENRICHMENT** (Detail mode). Also fetch each item author's karma, account age and submission count, adding `author_karma`, `author_created` and `author_submitted_count` to the row.\n\n⚙️ Adds one extra request per unique author.",
                        "default": false
                    },
                    "maxResults": {
                        "title": "🔢 Max Results",
                        "minimum": 1,
                        "type": "integer",
                        "description": "🔢 **HARD CAP** on the number of items saved this run.\n\n- **FREE users:** up to 25 items per run\n- **PAID users:** unlimited\n\n💡 Lower this to keep runs cheap while testing.",
                        "default": 100
                    },
                    "maxPages": {
                        "title": "📄 Max Search Pages",
                        "minimum": 1,
                        "type": "integer",
                        "description": "📄 **SEARCH PAGING** — how many result pages to fetch in query/search-URL modes (each page = *Hits Per Page* items).",
                        "default": 2
                    },
                    "hitsPerPage": {
                        "title": "🔢 Hits Per Page",
                        "minimum": 1,
                        "maximum": 1000,
                        "type": "integer",
                        "description": "🔢 **PAGE SIZE** for search modes (max 1000). Higher = fewer requests for the same number of results.",
                        "default": 50
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
