Builderoom

September 28, 2026

View repo

Near real-time REST API access to Hacker News public data via Firebase.

MIT

Product facts

Type
API, SDK & Library
Category
Development & Engineering › API Integration
Pricing
Free
License
MIT
Launched
Sep 28, 2026
Listed
Sep 28, 2026
Website
github.com

Overview

GitHubGitHub

Hacker News API is the official public data interface provided by Hacker News in partnership with Firebase, allowing developers to fetch Hacker News content in near real time. The API supports integration across Android, iOS, Web, and server-side platforms. ## Basics - **Base URI**: `https://hacker-news.firebaseio.com/v0/` - **Versioning**: Currently v0. Breaking changes occur only when non-optional fields are removed or existing fields are modified. Clients should ignore unknown new fields. - **Rate Limiting**: No rate limits currently apply. - **License**: MIT ## Data Model The API is essentially a direct export of Hacker News's in-memory data structures. Stories, comments, jobs, Ask HNs, and polls are collectively called items, identified by unique integer IDs and accessed at `/v0/item/<id>.json`. Each item may contain the following fields: - **id** (required): Unique identifier - **type**: One of `job`, `story`, `comment`, `poll`, `pollopt` - **by**: Author's username - **time**: Creation time (Unix Time) - **text**: Content text (HTML format) - **parent**: Parent item ID (for comments) - **kids**: List of child comment IDs (in display order) - **url**: Story link - **score**: Score or vote count - **title**: Title (HTML format) - **descendants**: Total comment count (for stories or polls) - **parts**: List of associated pollopts - **deleted** / **dead**: Deletion or dead status flags ## Design Notes The official documentation notes that this API is not an ideal public API design. For example, getting the total comment count for a story requires traversing and counting the tree; fetching the latest comments means iterating backward from maxid. Despite this, most Hacker News features can be implemented using the API. ## Use Cases Ideal for developers who need to read Hacker News public data to build third-party clients, analytics tools, or aggregation apps. Using the Firebase client libraries is recommended for better network efficiency and event listening capabilities.

Key features

  • Near Real-Time Data Access: Read Hacker News public data in near real time via Firebase.
  • Multi-Platform Support: Integrates with Android, iOS, Web, and server-side platforms.
  • Unified Item Model: Stories, comments, jobs, and polls are unified as items, accessed by ID.
  • No Rate Limits: The API currently has no call rate limits.
  • Versioned URI: Uses the v0 prefix to clearly define the scope of breaking changes.

Releases

Notify me

Initial · Hacker News API

Q&A

Does the API have rate limits?AI-generated
According to the documentation, the API currently has no rate limits.
How do I fetch data for a specific post or comment?AI-generated
All content types are items. Send a GET request to `/v0/item/<id>.json` to retrieve the corresponding data.
What is the API's versioning strategy?AI-generated
It is currently v0, with the URI prefix `https://hacker-news.firebaseio.com/v0/`. Only removing non-optional fields or modifying existing fields counts as a breaking change. Clients should ignore unexpected new fields.
Why is getting the total comment count cumbersome?AI-generated
The official docs explain that the API is essentially a direct export of HN's in-memory data structures, not optimized for network requests. To get the total comment count, you must traverse the kids tree and count manually.
View repo
Bookmark

This product has no owner yet

It was listed by the platform or its author left. If it is your work, prove your relationship to become the owner.

Claim this product

Alternatives

The product content on this page was translated by AI from the author's original.