Read-only integration with the official Hacker News API for fetching tech news, discussions, and community content. Optimized for LLM agents to create curated daily reports.
This integration provides read-only access to Hacker News content through the official Firebase-hosted API. It enables agents to:
- Fetch top, best, and new stories from the front page
- Access Ask HN discussions and Show HN project showcases
- Retrieve job postings from YC companies
- Get story details with threaded comment discussions
- Look up user profiles and karma
Designed specifically for LLM agents that need to monitor tech news, create curated digests, or analyze community discussions. All responses include ISO timestamps and pre-computed HN URLs for easy reference.
No authentication required. The Hacker News API is public with no rate limits.
Authentication Fields:
- None - this is a public API
- Description: Fetches the current top stories from the Hacker News front page, sorted by ranking.
- Inputs:
limit(optional): Maximum number of stories to return (1-100, default: 30)
- Outputs:
stories: Array of story objects with id, title, url, hn_url, score, by, time, descendants, typefetched_at: ISO timestamp when data was fetchedcount: Number of stories returned
- Description: Fetches the highest-voted stories over time (evergreen high-quality content).
- Inputs:
limit(optional): Maximum number of stories to return (1-100, default: 30)
- Outputs:
stories: Array of story objectsfetched_at: ISO timestampcount: Number of stories returned
- Description: Fetches the newest submissions to Hacker News, sorted by submission time.
- Inputs:
limit(optional): Maximum number of stories to return (1-100, default: 30)
- Outputs:
stories: Array of story objectsfetched_at: ISO timestampcount: Number of stories returned
- Description: Fetches "Ask HN" posts where users ask the community questions.
- Inputs:
limit(optional): Maximum number of stories to return (1-100, default: 30)
- Outputs:
stories: Array of Ask HN posts with question text contentfetched_at: ISO timestampcount: Number of stories returned
- Description: Fetches "Show HN" posts showcasing user projects and creations.
- Inputs:
limit(optional): Maximum number of stories to return (1-100, default: 30)
- Outputs:
stories: Array of Show HN posts with project URLsfetched_at: ISO timestampcount: Number of stories returned
- Description: Fetches job postings, typically from YC companies and tech startups.
- Inputs:
limit(optional): Maximum number of jobs to return (1-100, default: 30)
- Outputs:
jobs: Array of job postings with title, url, text, by, timefetched_at: ISO timestampcount: Number of jobs returned
- Description: Fetches a single story with its threaded comment discussion.
- Inputs:
story_id(required): The Hacker News story IDcomment_limit(optional): Maximum top-level comments to fetch (1-50, default: 20)comment_depth(optional): How many levels deep to fetch replies (1-5, default: 2)
- Outputs:
story: Full story details (id, title, url, score, by, time, descendants)comments: Threaded comment tree with nested repliesfetched_at: ISO timestamp
- Description: Fetches a Hacker News user's public profile.
- Inputs:
username(required): Hacker News username (case-sensitive)
- Outputs:
id: Usernamekarma: User's karma scorecreated: Account creation date (ISO timestamp)about: User's self-description (HTML, if set)profile_url: Link to HN profile
autohive-integrations-sdkaiohttp>=3.9.0
Example 1: Get today's top 10 stories for a daily digest
{
"limit": 10
}Example 2: Fetch a trending story with community discussion
{
"story_id": 12345678,
"comment_limit": 30,
"comment_depth": 3
}Example 3: Discover new projects from Show HN
{
"limit": 20
}To run the tests:
- Navigate to the integration's directory:
cd hackernews - Install dependencies:
pip install -r requirements.txt -t dependencies - Run the tests:
python tests/test_hackernews.py
The Hacker News API is public and provided under the MIT license with no rate limits. See the official API documentation for details.