Overview
Hacker News tool allows you to fetch top stories, new stories, and comments from Hacker News. No API key required. The user asks for tech news; the agent fetches Hacker News stories and returns them.Installation
Quick Start
1
Simple Usage
2
With Configuration
Use the same tool with an agent — see Usage with Agent below, or pass env vars and options from the sections above.
Usage with Agent
Available Methods
get_top_stories(limit=10)
Get top stories from Hacker News.get_new_stories(limit=10)
Get newest stories.get_best_stories(limit=10)
Get best stories.get_story(story_id)
Get a specific story by ID.Function-Based Usage
CLI Usage
Error Handling
Common Errors
How It Works
Best Practices
No API key needed
No API key needed
The Hacker News API is public — no credentials required.
Limit story count
Limit story count
Fetch the top N stories so the agent summarises a focused set instead of the full feed.
Cache the front page
Cache the front page
The front page changes slowly — cache it briefly to avoid repeated calls.
Related Tools
Reddit discussions
ArXiv
Academic papers
DuckDuckGo
Web search

