Use cases / Hacker News
Show HN post stats API
A Show HN post raises one question for its author the next morning: was that good? A score on its own says little. The useful comparison is against other Show HN posts, including the ones that went nowhere.
What the official Hacker News interface gives, and where it stops
- "There is currently no rate limit." official documentation, checked 25 November 2026
The official Hacker News API is free, built on Firebase, and returns items one at a time by ID. If you need live stories, comments or user records, use it; the quoted sentence is from its own documentation. It returns the raw item and leaves comparison to you, which means collecting a large set of posts first.
What the FoxAPIs endpoint adds
This endpoint answers the comparison. Give a Hacker News item ID for a Show HN post and read its title, points, comment count, posting time with UTC hour and weekday, whether it reached 50 and 100 points, and how it did against the set of posts we hold, with the size of that set. You do not have to gather and store thousands of items to get a percentile. The figures describe the posts in our set at the time they were read. A post we do not hold is not charged. It does not predict how a new post will do, and a good posting hour is a pattern in past posts, not a promise.
Makers use it in a launch review, agencies in a report to a client, and writers to check a claim that a launch did unusually well. Quote the size of the comparison set together with any percentage, so a reader knows what the number is measured against.
GET /v1/showhn/post_outcome costs 5 credits for a successful call; an answer with no data is not charged. Plans and top-ups are on the pricing page. Endpoint page · Get a key
A real response
Captured 20 November 2026 from a live call, shortened here: long text and long lists are cut, and contact details and lists of people are left out.
{
"hn_id": 45931331,
"title": "Show HN: Epstein Files Organized and Searchable",
"hn_url": "https://news.ycombinator.com/item?id=45931331",
"points": 329,
"comments": 56,
"hour_utc": 19,
"of_posts": 76705,
"posted_at": "2025-11-14T19:50:16+00:00",
"reached_50": true,
"reached_100": true,
"weekday_utc": 5,
"beat_percent": 99.6,
"rank_by_points": 298
}
The call in curl, JavaScript and Python
curl
curl "https://api.foxapis.com/v1/showhn/post_outcome?hn_id=45931331" \ -H "Authorization: Bearer $FOXAPIS_KEY"
JavaScript
const res = await fetch("https://api.foxapis.com/v1/showhn/post_outcome?hn_id=45931331", {
method: "GET",
headers: { Authorization: "Bearer " + process.env.FOXAPIS_KEY },
});
if (!res.ok) throw new Error("HTTP " + res.status);
console.log(await res.json());
Python
import os, requests
res = requests.get(
"https://api.foxapis.com/v1/showhn/post_outcome?hn_id=45931331",
headers={"Authorization": "Bearer " + os.environ["FOXAPIS_KEY"]},
timeout=60,
)
res.raise_for_status()
print(res.json())
Questions people ask about the hacker news api
What is the Hacker News API rate limit?
The official documentation says there is currently no rate limit. That can change, so fetch considerately.
Does Hacker News need an API key?
No for the official API. This endpoint uses your FoxAPIs key because the comparison is computed here.
Can I look up any Hacker News story?
This endpoint is for Show HN posts in our set. Use the official API for other items.
Is the comparison live?
It is computed from the posts we hold, and the answer states how many there are.
Related
Hacker News is a name of its owner. FoxAPIs is not affiliated with or endorsed by Hacker News. You are responsible for using the data within the source's terms.
Run this free, then pay per call
Start with 10,000 credits, no card. They arrive once you confirm your email and expire 90 days after they are added; credits you buy never expire. Start with 10,000 credits
5 credits a call: $3.98 per 1,000 calls on Production, $4.90 on Builder.
Building an AI agent? See the MCP server