Hacker News
| Metadata | Value |
|---|---|
| Category | media |
| Capabilities | http |
| Website | https://news.ycombinator.com |
Returns shapes
Section titled “Returns shapes”Readme
Section titled “Readme”Read Hacker News stories, comments, and discussions using the Algolia HN Search API.
No Setup Required
Section titled “No Setup Required”This adapter uses the public Algolia HN Search API — no authentication needed.
Why Algolia?
Section titled “Why Algolia?”The official HN Firebase API requires multiple requests to fetch a story with comments (one per comment). Algolia returns the entire comment tree in a single request, making it much faster.
| Operation | Description |
|---|---|
list_posts | List stories by feed type (front, new, ask, show) |
search_posts | Search stories by keyword |
get_post | Get a single story with all comments |
The list_posts operation supports different feeds via the feed param:
| Feed | Description | HN URL |
|---|---|---|
front (default) | Front page / top stories | news.ycombinator.com |
new | Newest submissions | news.ycombinator.com/newest |
ask | Ask HN posts | news.ycombinator.com/ask |
show | Show HN posts | news.ycombinator.com/show |
Examples
Section titled “Examples”# Front page stories (default)POST /api/adapters/hackernews/post.list{"limit": 30}
# Newest storiesPOST /api/adapters/hackernews/post.list{"feed": "new"}
# Ask HN postsPOST /api/adapters/hackernews/post.list{"feed": "ask", "limit": 20}
# Show HN postsPOST /api/adapters/hackernews/post.list{"feed": "show"}
# Search storiesPOST /api/adapters/hackernews/post.search{"query": "rust programming"}
# Get story with commentsPOST /api/adapters/hackernews/post.get{"id": "46826597"}Entity Aggregation
Section titled “Entity Aggregation”Stories also appear in aggregated endpoints:
# All posts from all sourcesGET /api/posts
# Search across all sourcesGET /api/posts/search?query=typescript