Overview
The Hacker News API gives you free, real-time access to the stories, comments, jobs, and polls from the popular tech news community. No authentication is required — you can start fetching top stories and their details with a simple GET request. It is an excellent beginner API for learning asynchronous data fetching since story items are retrieved individually by ID.
Beginner Tip
Start by fetching the topstories endpoint to get a list of up to 500 story IDs, then fetch individual items by ID. Keep in mind each story is a separate request, so use Promise.all() in JavaScript to fetch multiple items in parallel.
Measurement Record
What actually happened when we called this API from our own infrastructure. Every value below was recorded by the request, not copied from the provider's documentation.
- Request
- GET https://hacker-news.firebaseio.com/v0/topstories.json?print=pretty
- Result
- HTTP 200 · application/json · 5,003 bytes
- Response time
- 166 ms (median of 3) · fastest 161 ms
- Transport
- TLSv1.3 · TLS_AES_256_GCM_SHA384 · certificate issued by Google Trust Services
- Browser CORS
- Allowed — Access-Control-Allow-Origin: https://apisscore.com
- Served by
- nginx
- Recorded
- 2026-08-10
Available Data
The kind of data this API exposes, based on its documentation. We could not call the endpoint to confirm the exact field names.
Captured Response
Captured from a real request to https://hacker-news.firebaseio.com/v0/topstories.json?print=pretty on 2026-08-10. Long arrays and nested objects are truncated to keep the shape readable.
[ 49241679 ]
Implementation Example
Calls a real endpoint of this API. Replace any placeholder credentials with your own key.
const url = "https://hacker-news.firebaseio.com/v0/topstories.json?print=pretty";
const response = await fetch(url);
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data); What Can You Build?
Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.
How This API Fails
We deliberately sent this API a broken request and recorded exactly what came back on 2026-08-10. Knowing the shape of an error before you hit it makes error handling much easier to write.
Returned an HTML error page rather than JSON — worth knowing if your client assumes every response can be parsed as JSON.
Common Errors & Troubleshooting
Generated guidance based on this API's documentation, not observed by us. Treat it as a starting point and check against the provider's own error reference.
Measured Score Breakdown
Live HTTP request to the API endpoint
Fully tested on Aug 10, 2026
Technical Specifications
Similar APIs
View All →4chan
⭐ Beginner's PickThe 4chan API provides read-only, public access to boards, threads, and posts on 4chan with no authentication required.
Fuck Off as a Service
⭐ Beginner's PickFuck Off as a Service (FOAAS) is a humorous REST API that returns creative dismissal messages in various formats.
Hashnode
⭐ Beginner's PickHashnode is a developer blogging platform whose public GraphQL API lets you query posts, publications, and author profiles without any authentication.
Lanyard
⭐ Beginner's PickLanyard is a free, open-source API that exposes your real-time Discord presence such as what you are playing or listening to via a simple REST API or WebSocket.
Ayrshare
⭐ Beginner's PickAyrshare is a social media API platform that lets you publish posts, retrieve analytics, and manage multiple social media accounts across platforms like Twitter, Instagram, Facebook, and LinkedIn from a single API.