# Hacker News Launches Scraper (`scrupulous_waterbird_m4w/hn-launches`) Actor

Pull Hacker News Show HN, Launch HN, front page, or single-item threads. Title, author, points, comments, external URL. Public Algolia API, no auth, no proxy.

- **URL**: https://apify.com/scrupulous\_waterbird\_m4w/hn-launches.md
- **Developed by:** [Mori](https://apify.com/scrupulous_waterbird_m4w) (community)
- **Categories:** Automation, Agents, MCP servers
- **Stats:** 1 total users, 0 monthly users, 0.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 web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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 Launches Scraper

Pull Hacker News Show HN, Launch HN, front page, or single-item threads.
Title, author, points, comment count, external URL. Powered by the public
[Hacker News Algolia API](https://hn.algolia.com/api) - no auth, no proxy,
no captcha.

### What it does

- show\_hn - top Show HN stories (optionally text-filtered and date-bounded).
  Default window: last 7 days. Sort: most points first.
- launch\_hn - top Launch HN stories (YC launches). Same filter options.
- front\_page - current Hacker News front page (top 30 by points).
- item - single HN story by objectID plus its full comment tree, flattened.

Each story record carries: title, author, points, numComments,
createdAt, url (external link), hnUrl (canonical HN item URL).

### Input

| Field        | Required | Type    | Description |
|---|---|---|---|
| mode         | yes      | enum    | show\_hn (default) / launch\_hn / front\_page / item |
| query        | no       | string  | Free-text search applied to titles (show\_hn / launch\_hn only). Empty = no text filter. |
| daysBack     | no       | integer | Date window for show\_hn / launch\_hn. 0 = no date filter. Max 30. |
| objectID     | yes (item mode) | string | HN story id (e.g. 46205632). Ignored in other modes. |
| maxItems     | no       | integer | Cap on results. Default 30, max 100. For item mode, caps comment count. |

### Output

One record per story (or comment, in item mode):

```json
{
  "mode": "show_hn",
  "kind": "story",
  "source": "hn-algolia",
  "objectID": 46205632,
  "title": "Show HN: ...",
  "url": "https://...",
  "hnUrl": "https://news.ycombinator.com/item?id=46205632",
  "author": "keepamovin",
  "points": 3346,
  "numComments": 278,
  "createdAt": "2025-12-09T15:00:38.000Z",
  "query": null,
  "daysBack": 7,
  "fetchedAt": "2026-07-08T..."
}
```

item mode also emits one record per nested comment (kind=comment)
with parentId, storyId, and text (raw HTML).

### Limitations

- HN Algolia search returns at most 1000 hits per query - for very deep
  historical scans, run multiple passes with tighter daysBack windows.
- No HTML rendering required - pure JSON API.

### Changelog

- 0.1.0 - initial release.

# Actor input Schema

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

What to fetch. One of: 'show\_hn' (Show HN stories — search by points, default), 'launch\_hn' (Launch HN stories), 'front\_page' (current HN front page), 'item' (single story + nested comments by objectID).

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

Optional free-text search applied to titles (only used in modes show\_hn / launch\_hn). Empty = no text filter (just the tag).

## `daysBack` (type: `integer`):

Window in days for show\_hn / launch\_hn modes (date-bounded via search\_by\_date). 0 = no date filter. Max 30.

## `objectID` (type: `string`):

For mode='item': the HN story ID (e.g. 46205632). Ignored in other modes.

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

Number of stories / comments to fetch per run. For 'item' mode this caps the number of top-level comments returned.

## Actor input object example

```json
{
  "mode": "show_hn",
  "daysBack": 7,
  "maxItems": 30
}
```

# 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 = {
    "query": "",
    "objectID": ""
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrupulous_waterbird_m4w/hn-launches").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 = {
    "query": "",
    "objectID": "",
}

# Run the Actor and wait for it to finish
run = client.actor("scrupulous_waterbird_m4w/hn-launches").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 '{
  "query": "",
  "objectID": ""
}' |
apify call scrupulous_waterbird_m4w/hn-launches --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=scrupulous_waterbird_m4w/hn-launches",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/0u79w2KUXsdqHxiK0/builds/74rO5qrJbRohJ96b5/openapi.json
