# Hacker News Scraper – Top, New, Best $1.00/1K (`fluyeporlaweb/hacker-news-scraper`) Actor

Scrape Hacker News top, new, best, Ask, Show and job stories or search all HN by keyword: title, URL, points, comments, date. Official APIs, no login.

- **URL**: https://apify.com/fluyeporlaweb/hacker-news-scraper.md
- **Developed by:** [Pablo Navarro](https://apify.com/fluyeporlaweb) (community)
- **Categories:** News, Developer tools, AI
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.15 / 1,000 items

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Hacker News Scraper API – Top, New, Best & Search

**Hacker News scraper** and API that reads the **official Hacker News Firebase API** and the **Algolia HN Search API** to return **story title, URL, points, comment count and date** for top, new, best, Ask HN, Show HN and job lists, or any keyword search.

### What does it do?

- Front-page lists: top, new, best, Ask HN, Show HN and jobs, in HN rank order.
- Full-text keyword search over all of Hacker News (relevance or newest first), with a "last N days" filter.
- Minimum points filter.
- Clean JSON: id, rank, type, title, URL, HN discussion link, points, comments, ISO date.
- No usernames, profiles or comment bodies.

### Use cases

- **Tech newsletters and digests**: the top 30 stories every morning.
- **Launch monitoring**: track mentions of your product or competitors on HN.
- **AI agents and RAG**: feed fresh developer news to an LLM.
- **Trend research**: what topics reach 100+ points.

### Input

| Field | Description |
|---|---|
| `mode` | Which list to fetch, or "search" to search all Hacker News. Example: top |
| `query` | Only for mode "search". Example: AI agents |
| `tags` | Only for mode "search". Algolia tags: story, show_hn, ask_hn, front_page, poll. Example: story |
| `sortBy` | Only for mode "search". Example: date |
| `sinceDays` | Only for mode "search". 0/empty = any time. Example: 7 |
| `minPoints` | Keep only items with at least this score. Example: 100 |
| `maxItems` | Example: 30 |

Example input:

```json
{
  "mode": "search",
  "query": "AI agents",
  "sortBy": "date",
  "minPoints": 50,
  "maxItems": 25
}
```

### Output

Real output (first items of a run on 30 Oct 2026):

```json
[
  {
    "id": 50296486,
    "rank": 1,
    "type": "story",
    "title": "We ran AI agent swarms in Minecraft and Mindustry",
    "url": "https://labs.ycombinator.com/projects/games/index.html",
    "hnUrl": "https://news.ycombinator.com/item?id=50296486",
    "points": 289,
    "commentsCount": 100,
    "createdAt": "2026-10-29T21:40:28Z",
    "source": "algolia"
  },
  {
    "id": 50291116,
    "rank": 2,
    "type": "story",
    "title": "Launch HN: Simantic (YC F26) – Firmware Simulation for AI Agents",
    "url": null,
    "hnUrl": "https://news.ycombinator.com/item?id=50291116",
    "points": 69,
    "commentsCount": 21,
    "createdAt": "2026-10-29T15:56:32Z",
    "source": "algolia"
  }
]
```

Export the results as JSON, CSV or Excel, read them through the API, or send them to Google Sheets, Make, Zapier, n8n or webhooks. You can also run this Actor from AI agents through the Apify MCP server.

### Pricing

Pay per event: **$0.15 per 1,000 items** plus $0.00005 per run start. There is no extra platform usage charge.

### FAQ

**Which APIs does it use?** The official Hacker News API (hacker-news.firebaseio.com) for lists and the public Algolia HN Search API (hn.algolia.com/api) for search.

**Does it return comments or usernames?** No. It returns story-level metadata only, to avoid personal data.

**How fast is it?** 30 top stories take a few seconds.

**Can I schedule it?** Yes, use Apify schedules (e.g. hourly) and webhooks.

**Why fewer items than maxItems?** Deleted/dead items are skipped, and the minPoints filter can remove items.

**Do I need a login or API key?** No. It uses the source's public API; you only need an Apify account.

**Can AI agents use it?** Yes. Call it through the Apify API, or from Claude, Cursor or any MCP client via the Apify MCP server.

### Data source and license

Sources: [Hacker News API](https://github.com/HackerNews/API) (Y Combinator, public, no key) and [HN Search API by Algolia](https://hn.algolia.com/api). Linked articles belong to their publishers. Not affiliated with Y Combinator or Algolia.

This Actor is not affiliated with or endorsed by the data source. You are responsible for using the data in line with the source's license and terms.

# Actor input Schema

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

Which list to fetch, or "search" to search all Hacker News. Example: top

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

Only for mode "search". Example: AI agents

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

Only for mode "search". Algolia tags: story, show_hn, ask_hn, front_page, poll. Example: story

## `sortBy` (type: `string`):

Only for mode "search". Example: date

## `sinceDays` (type: `integer`):

Only for mode "search". 0/empty = any time. Example: 7

## `minPoints` (type: `integer`):

Keep only items with at least this score. Example: 100

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

Example: 30

## Actor input object example

```json
{
  "mode": "top",
  "tags": "story",
  "sortBy": "relevance",
  "maxItems": 30
}
```

# Actor output Schema

## `items` (type: `string`):

No description

## `summary` (type: `string`):

No description

# 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 = {
    "mode": "top",
    "maxItems": 30
};

// Run the Actor and wait for it to finish
const run = await client.actor("fluyeporlaweb/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 = {
    "mode": "top",
    "maxItems": 30,
}

# Run the Actor and wait for it to finish
run = client.actor("fluyeporlaweb/hacker-news-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "mode": "top",
  "maxItems": 30
}' |
apify call fluyeporlaweb/hacker-news-scraper --silent --output-dataset

```

## MCP server setup

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

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/50ncZamNtf3XlzV2A/builds/pXkzRBI3XFQvSSXZT/openapi.json
