n8n-nodes-hackernewsapi
v0.1.3
Published
An n8n community node for interacting with the Hacker News API (Algolia). Supports searching stories, comments, polls, and more from Hacker News.
Maintainers
Readme
n8n-nodes-hackernewsapi
This is an n8n community node that lets you query the Hacker News Search API (Algolia) inside your n8n workflows.
The HN Search API provides read-only access to Hacker News data, including stories, comments, and polls with powerful full‑text search and filtering.
n8n is a fair-code licensed workflow automation platform.
Installation
Operations
Compatibility
Usage
Resources
Version history
License
Installation
Follow the official community nodes installation guide.
Operations
This node is read‑only and uses the public HN Search API (no credentials required).
Resource: Search
Search
- Endpoint:
GET /api/v1/search - Description: Full‑text search on Hacker News, sorted by relevance, then points, then number of comments.
- Key parameters:
Query: Full‑text search string.Tags: Filter by tags such asstory,comment,poll,pollopt,show_hn,ask_hn,front_page,author_:USERNAME,story_:ID.Numeric Filters: Conditions oncreated_at_i,points,num_comments(for examplepoints>100,num_comments>10).Page,Hits Per Page,Return All,Limit: Control pagination.
- Endpoint:
Search by Date
- Endpoint:
GET /api/v1/search_by_date - Description: Same as Search, but results are sorted by date (most recent first).
- Key parameters:
- Same as Search, typically combined with
numericFiltersoncreated_at_ifor time‑range queries.
- Same as Search, typically combined with
- Endpoint:
Resource: Item
- Get
- Endpoint:
GET /api/v1/items/:id - Description: Retrieve a single item (story, comment, poll, or poll option) by numeric ID, including its nested children.
- Key parameters:
Item ID: Numeric Hacker News item ID.
- Endpoint:
Compatibility
- n8n version: Built and tested with recent n8n 1.x/2.x versions.
- Node style: Declarative HTTP node using the n8n Nodes API v1.
- Authentication: Not required. The HN Search API is public and this node does not expose any credential options.
If you encounter a version‑specific issue, please open an issue in this repository with your n8n version and error details.
Usage
Add the node
- Install the package and restart n8n.
- In the editor, add the Hacker News API node to your workflow.
Example: Search for popular stories
- Set Resource to
Searchand Operation toSearch. - Set Query to a topic, for example
n8norTypeScript. - Optionally set:
- Tags to
storyto only return stories. - Numeric Filters to something like
points>100to only keep higher‑scoring posts.
- Tags to
- Run the node to get a list of matching stories in the node output.
Example: Fetch a story and its comments
- Add a Hacker News node with Resource =
Itemand Operation =Get. - Set Item ID to the numeric ID of the story (for example from a previous Search node).
- Run the node to receive the story plus its nested
children(comments) tree.
Resources
Version history
- 0.1.0
- Initial release.
- Supports:
- Search (
/api/v1/search) - Search by date (
/api/v1/search_by_date) - Get item (
/api/v1/items/:id)
- Search (
License
This project is licensed under the MIT License.
See the LICENSE file for details.
