Hacker News connects to a Nagent workspace with no credentials. Once it is connected, agents can call 14 Hacker News actions, such as "Get Ask HN Story IDs", "Get Best HackerNews Stories" and "Get Hacker News Item". Nothing is enabled on connect: each action is allowed one at a time, and an action with side effects runs or waits for a person according to the agent's level.
Every operation an agent can call against Hacker News, with input parameters and output schema.
HACKERNEWS_GET_ASK_STORIESGet up to 200 latest Ask HN story IDs from Hacker News. Returns an array of item IDs for Ask HN posts in ranked order.
Input parameters
Output format for JSON response.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
HACKERNEWS_GET_BEST_STORIESGet up to 500 best story IDs from HackerNews ranked by score. Returns story IDs only. Use the returned IDs with get_item_with_id action to fetch full story details.
Input parameters
Output formatting options for the API response.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
HACKERNEWS_GET_ITEMTool to get a Hacker News item by its unique ID from the Firebase API. Use when you need to retrieve details about a specific story, comment, job, poll, or pollopt.
Input parameters
The unique integer ID of the item (story, comment, job, poll, or pollopt) to retrieve from Hacker News.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
HACKERNEWS_GET_ITEM_WITH_IDGet a specific item from Hacker News using its ID. Limits response size to prevent context overflow.
Input parameters
The unique numeric ID of the Hacker News item (story, comment, job, poll, or pollopt). Can be obtained from other HN API endpoints like search or front page.
Maximum depth of nested comment replies to include. 0 means no children, 1 means direct replies only, 2 means replies to replies, etc. Default is 2.
Maximum number of direct child comments to include in the response. Higher values return more comments but increase response size. Default is 10.
Whether to truncate long text content (comments, story text) to 500 characters. Set to False to get full text. Default is True to prevent context overflow.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
HACKERNEWS_GET_JOB_STORIESGet up to 200 latest job story IDs from Hacker News. Returns an array of item IDs for job postings that can be used to fetch full job details.
Input parameters
Set to 'pretty' for formatted JSON output. If not specified, returns compact JSON.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
HACKERNEWS_GET_LATEST_POSTSGet the latest posts from Hacker News based on optional filters. Results can be limited using the size parameter.
Input parameters
Page number for pagination (0-indexed). Default is 0.
Maximum number of results to return. Default is 5. Set to 0 or None to return all results from the page (up to 20 per page).
Tags to filter posts. Multiple tags are ANDed. Available tags: story, comment, poll, pollopt, show_hn, ask_hn, front_page, author_<USERNAME>, story_<ID>. Example: \['story'\] for stories only, \['comment', 'story_12345'\] for comments on story 12345.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
HACKERNEWS_GET_MAX_ITEM_IDTool to get the current largest item ID from Hacker News. Use when you need to discover the most recent items or iterate through all items in the system by walking backward from this ID.
Input parameters
Set to 'pretty' for formatted JSON output. Leave unset for compact JSON.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
HACKERNEWS_GET_NEW_STORIESGet up to 500 newest story IDs from Hacker News. Returns an array of item IDs sorted by recency (most recent first). Use these IDs with the Get Item action to retrieve full story details.
Input parameters
Set to 'pretty' for formatted JSON output. Leave empty for compact JSON.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
HACKERNEWS_GET_SHOW_STORIESTool to retrieve up to 200 latest Show HN story IDs from Hacker News. Use when you need to find recent Show HN posts where people share their projects, products, or creations.
Input parameters
Set to 'pretty' for formatted JSON output. Leave empty for compact JSON.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
HACKERNEWS_GET_TOP_STORIESGet up to 500 top story IDs from HackerNews including jobs. Returns story IDs sorted by front page position. Use the returned IDs with get_item_with_id action to fetch full story details.
Input parameters
Output formatting options for the API response.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
HACKERNEWS_GET_UPDATESGet recently changed items and user profiles from Hacker News. Use this to monitor recent activity or updates on the platform.
Input parameters
Set to 'pretty' for formatted JSON output. Leave unset for compact output.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
HACKERNEWS_GET_USERRetrieve a Hacker News user's public profile by their username. Returns the user's username, karma score, and optional bio/about text. Use this to look up information about HN community members.
Input parameters
The case-sensitive username of the Hacker News user to retrieve (e.g., 'pg', 'dang').
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
HACKERNEWS_GET_USER_BY_USERNAMETool to get a user profile by their case-sensitive username from the HackerNews Firebase API. Use when you need detailed user information including creation date, karma, bio, and submission history. Only users with public activity are available.
Input parameters
The case-sensitive username of the Hacker News user to retrieve. Only users with public activity (comments or story submissions) are available.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
HACKERNEWS_SEARCH_POSTSSearch Hacker News posts using full-text search powered by Algolia. Use this action to find stories, comments, and discussions on Hacker News matching specific keywords. Supports filtering by post type (story, comment, show_hn, ask_hn) and by author.
Input parameters
Page number for pagination (0-indexed).
Maximum number of results to return. Default is 5. Set to None or 0 to return all results from the page (up to 20).
Filter by tag type. Use comma-separated tags for AND logic. Available tags: story, comment, poll, pollopt, show_hn, ask_hn, front_page, author_<USERNAME> (e.g., author_pg), story_<ID> (e.g., story_123456).
Full-text search query. Supports AND, OR, NOT operators.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
Agents can call 14 Hacker News actions on Nagent, including "Get Ask HN Story IDs", "Get Best HackerNews Stories" and "Get Hacker News Item". Get Ask HN Story IDs: Get up to 200 latest Ask HN story IDs from Hacker News. Each action is listed on this page with its input parameters and its output.
Hacker News connects with no credentials, under your workspace's own connection. Nothing is enabled on connect: each action is allowed one at a time and can be scoped to the agents that need it.
It also takes 1 optional input: print. It returns data, error and successful.