List Stories
hackernews.list_stories
ActionBusiness appsconnection required
Calls the Hacker News API with the connection's credentials.
Read the item ids in one of Hacker News's story lists: top, new, best, ask, show or jobs.
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
2 fields, none 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 |
|---|---|---|---|---|---|
story_list Which list to read. 'topstories' is the front page and includes job posts; ask, show and jobs hold up to 200 ids, the other three up to 500. | string | No | topstories | one of "topstories", "newstories", "beststories", "askstories", "showstories", "jobstories" | — |
limit Keep only this many ids from the front of the list. | number | No | 30 | 1–500 | — |
Example configuration
Every value below is the contract’s own example or default — nothing invented.
{
"limit": 30,
"story_list": "topstories"
}Output
One shape.
result
| Field | Type | Example |
|---|---|---|
story_list Which list these ids came from. | string | — |
ids The item ids, in the order Hacker News ranked them. | array | — |
count How many ids were returned after the limit. | number | — |
total How many ids the list held before the limit. | number | — |
{
"count": 0,
"ids": [],
"story_list": "",
"total": 0
}Notes
- These are ids only. Read each one with Hacker News: Get Item, or search instead if you want whole records in one request.
Related Hacker News nodes
See List Stories 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.