Skip to main content

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

No API key required!

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

The Hacker News API is public — no credentials required.
Fetch the top N stories so the agent summarises a focused set instead of the full feed.
The front page changes slowly — cache it briefly to avoid repeated calls.

Reddit

Reddit discussions

ArXiv

Academic papers

DuckDuckGo

Web search