Get Thread
hackernews.get_thread
ActionBusiness appsconnection required
Calls the Hacker News API with the connection's credentials.
Read one item together with its whole comment tree already nested, from the Hacker News search index.
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 id. | number | — |
title The story title, when the item is a story. | string | — |
url The story's link, when it has one. | string | — |
author The username who posted the item. | string | — |
points The item's score. | number | — |
text The item's body text, as HTML. | string | — |
parent_id The id of the item this one replies to. | number | — |
created_at ISO-8601 timestamp of when the item was posted. | string | — |
children The replies, each with its own nested children. | array | — |
{
"author": "",
"children": [],
"created_at": "",
"id": 0,
"parent_id": 0,
"points": 0,
"text": "",
"title": "",
"url": ""
}Notes
- This reads the Algolia-hosted search index, not the official API, so a very new comment may not be in the tree yet.
Related Hacker News nodes
See Get Thread 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.