Get Item
hackernews.get_item
ActionBusiness appsconnection required
Calls the Hacker News API with the connection's credentials.
Read one Hacker News item by id — a story, comment, job, poll or poll option.
Connection
- Required
- Yes — the node will not save without one
- Auth type
- No auth
- Providers
- Hacker News
- Secret shape
- no credential — the Hacker News API is public; the connection is a pair of hosts
- Config it needs
- base_url, search_base_url
- Resolved by
- config.connection_id, else node.connection_id
Configuration
1 field, 1 required. A dotted path is a nested object and name[] an array of objects — the editor renders the same tree.
| Field | Type | Required | Default | Constraints | Example |
|---|---|---|---|---|---|
item_id The numeric id of the Hacker News item to read. | string | Yes | — | — | 8863 |
Example configuration
Every value below is the contract’s own example or default — nothing invented.
{
"item_id": "8863"
}Output
One shape.
result
| Field | Type | Example |
|---|---|---|
id The item's unique id. | number | — |
type What the item is: story, comment, job, poll or pollopt. | string | — |
by The username of the item's author. | string | — |
time When the item was created, as a Unix timestamp in seconds. | number | — |
title The title of a story, poll or job, as HTML. | string | — |
url The URL a story links to; absent on text posts and comments. | string | — |
text The body of a comment, text post or poll, as HTML. | string | — |
score The story's score, or the vote count for a poll option. | number | — |
descendants The total comment count on a story or poll. | number | — |
kids The ids of the item's direct comments, in display order. | array | — |
parent For a comment: the id of the item it replies to. | number | — |
poll For a poll option: the id of the poll it belongs to. | number | — |
parts For a poll: the ids of its options, in display order. | array | — |
deleted True when the item has been deleted. | boolean | — |
dead True when the item has been killed by moderation or flags. | boolean | — |
{
"by": "",
"dead": false,
"deleted": false,
"descendants": 0,
"id": 0,
"kids": [],
"parent": 0,
"parts": [],
"poll": 0,
"score": 0,
"text": "",
"time": 0,
"title": "",
"type": "",
"url": ""
}Notes
- Only 'id' is guaranteed; which of the other fields appear depends on the item's type.
- 'kids' holds comment ids, not comments — read each one with this node, or use Hacker News: Get Thread for the whole tree in one call.
Related Hacker News nodes
See Get Item run in a workflow.
In a technical demo we add the Hacker News connection, drop the node on the canvas and let Workflow Health pre-flight it before the first real run.