<!-- BusyBot node reference — https://busybot.net/tools/hacker-news/ -->

> Node: Hacker News (`hacker_news`) · Action · v1
> Category: Communication · Credentials: none
> Updated: 2026-08-16

# Hacker News

> Retrieve articles, user profiles, and search items from Hacker News.

## Overview

Hacker News is a social news website focusing on technology and startups. This tool provides read-only access via the HN Algolia Search API (http://hn.algolia.com/api/v1/). It supports three resources: Article (get a single item by ID with optional comments), User (get a user profile by username), and All (search/list items with keyword and tag filtering). The All resource supports pagination via returnAll/limit pattern using Algolia page-based pagination. No authentication is required — this is a public API.

**Category:** Communication  
**Tool Name:** `hacker_news`  
**Version:** 1

**Appearance:** Icon: `lucide-Newspaper` | Color: `#FF6600`

## Node Type

**Action** — processes input items and produces output

## Input / Output

| Direction | Port(s) |
|-----------|--------|
| Input | `Input` |
| Output | `Output`, `Error` |

## Credentials

This tool does not require any credentials.

### Resources

| Resource | Value |
|----------|-------|
| All | `all` |
| Article | `article` |
| User | `user` |

### Operations

| Operation | Value | Description |
|-----------|-------|-------------|
| Get Many | `getAll` | Get many items (All resource) |
| Get | `get` | Get a Hacker News article (Article resource) |
| Get | `get` | Get a Hacker News user (User resource) |

### Parameters

#### All: Get Many

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Return All | `boolean` | No | `false` | Whether to return all results or only up to a given limit. |
| Limit | `number` | No | `100` | Max number of results to return. _(shown when Return All is `false`)_ |
| Additional Fields | `collection` | No | `{}` | Extra search filters. Add only the ones you need. |
| — Keyword | `string` | No | — | The keyword for filtering the results of the query. Supports expressions like {{ $json.term }}. |
| — Tags | `multiOptions` | No | `[]` | Tags for filtering the results of the query. |
| | | | | Options: `ask_hn` (Ask HN posts), `comment` (comments), `front_page` (front page items), `poll` (polls), `show_hn` (Show HN posts), `story` (stories) |

#### Article: Get

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Article ID | `string` | Yes | — | The ID of the Hacker News article to be returned. Supports expressions like {{ $json.id }}. |
| Additional Fields | `collection` | No | `{}` | Extra options for the article lookup. |
| — Include Comments | `boolean` | No | `false` | Whether to include all the comments in a Hacker News article. |

#### User: Get

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Username | `string` | Yes | — | The Hacker News username to be returned. Supports expressions like {{ $json.author }}. |

#### All Operations

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Max Concurrency | `number` | No | `10` | Maximum number of items to process concurrently. |

## Output Data

Each Hacker News result is merged into the incoming item JSON, so the fields you sent in pass through and binary data is forwarded. The API response fields are written at the top level of the item — not nested under a wrapper property.

How many output items an input item produces depends on the operation:

| Operation | Output items |
|-----------|--------------|
| `all` / `getAll` | **Fans out** — one output item per search hit. With Return All on, every page of results is fetched and emitted; otherwise up to Limit items. A search with no hits emits the input item unchanged. |
| `article` / `get` | One item — the article record. Its comment tree arrives under `children` only when Include Comments is on; with the option off the property is stripped before output. |
| `user` / `get` | One item — the user profile record. |

Because search fans out, downstream nodes see one item per story and can be wired directly without a Split Out node.

## Usage Examples

- Get a Hacker News article by ID
- Get a Hacker News user profile by username
- Search Hacker News for articles matching a keyword
- List all front page stories from Hacker News
- Search Hacker News for Ask HN posts about a topic

## Example Configuration

Get a specific article:

```json
{
  "type": "hacker_news",
  "parameters": {
    "resource": "article",
    "operation": "get",
    "articleId": "12345678"
  }
}
```

Get an article together with its comment tree:

```json
{
  "type": "hacker_news",
  "parameters": {
    "resource": "article",
    "operation": "get",
    "articleId": "{{ $json.storyId }}",
    "additionalFields": {
      "includeComments": true
    }
  }
}
```

Get a user profile:

```json
{
  "type": "hacker_news",
  "parameters": {
    "resource": "user",
    "operation": "get",
    "username": "pg"
  }
}
```

Search with a keyword and tag filter, capped at 100 results:

```json
{
  "type": "hacker_news",
  "parameters": {
    "resource": "all",
    "operation": "getAll",
    "returnAll": false,
    "limit": 100,
    "additionalFields": {
      "keyword": "artificial intelligence",
      "tags": ["story", "show_hn"]
    }
  }
}
```

Pull every matching result, paging through the API:

```json
{
  "type": "hacker_news",
  "parameters": {
    "resource": "all",
    "operation": "getAll",
    "returnAll": true,
    "maxConcurrency": 5
  }
}
```

### Error Handling

| Mode | Behavior |
|------|----------|
| **stop** | Halts workflow on first error |
| **continue** | Skips failed items, passes successful ones through |
| **errorPort** | Routes failed items to Error output port |

## Tips

Retrieve Hacker News articles, user profiles, and search items via the public Algolia HN Search API.

### Important Notes

- The `additionalFields` parameter structure varies by resource type
- For article resources: use `includeComments` boolean field
- For all resources: use `keyword` string and `tags` array fields
- Always ensure conditional parameters match their display requirements
- The `limit` parameter only appears when `returnAll` is set to `false`