Hacker News scraper API: search results as JSON
Send any Hacker News page URL with recipe=hackernews and get title, points, comments and 5 more fields as JSON. No selectors to write, no proxies to pick.
- 1 page type
- 8 fields
- 1 credits a page · $0.10 per 1,000
- Working · 100% in 7 days
5,000 free credits for 7 days, no card.
curl -G 'https://api.ujeebu.com/scrape' \
-H "ApiKey: $UJEEBU_API_KEY" \
--data-urlencode 'url=https://news.ycombinator.com/show' \
--data-urlencode 'recipe=hackernews'
{
"result": {
"results": [
{
"title": "Show HN: AegisKernel – Zero-trust POSIX runti...",
"points": "6",
"comments": "0"
}
]
},
"success": true
}
Hacker News API or the page data?
Official API: open
Hacker News has an official API (Hacker News API). Anyone can read stories, comments, users and live lists through the official Firebase API, with no key. When you need the public page data instead (fields the API does not return, the official rate limits, or no developer key to apply for), the recipe gives it to you.
Source: Hacker News API on github.com, checked November 6, 2026.
How to get Hacker News data as JSON today
- Get a free API key: 5,000 free credits for 7 days, no card.
- Send any Hacker News page URL with
recipe=hackernewsto the Scrape API (the call). - Get 8 fields as JSON, 1 credits a page, billed only when the call succeeds.
Ujeebu's Hacker News recipe returns title, points, comments and 5 more fields from any public Hacker News page as JSON: send the URL with recipe=hackernews to the Scrape API, 1 credits a page, no Hacker News account or partner approval needed.
What you get from Hacker News
The fields of each page type and a real sample from our last validation, shortened.
Search and listing pages recipe=hackernews 1 credits a page
| Field | Type | Example |
|---|---|---|
results | list of 3+ items | |
results[].comments | number (as text) | 0 |
results[].date | date | 2026-11-06T17:00:23 |
results[].item_url | URL | https://news.ycombinator.com/item?id=50394991 |
results[].points | number (as text) | 6 |
results[].rank | number (as text) | 1 |
results[].site | text | adikshatriyag-crypto.github.io |
results[].title | text | Show HN: AegisKernel – Zero-trust POSIX runtime for AI agents in <0... |
results[].url | URL | https://adikshatriyag-crypto.github.io/aegis-kernel/ |
Sample answer, validated 2026-11-14
{
"results": [
{
"comments": "0",
"date": "2026-11-06T17:00:23",
"item_url": "https://news.ycombinator.com/item?id=50394991",
"points": "6",
"rank": "1",
"site": "adikshatriyag-crypto.github.io",
"title": "Show HN: AegisKernel – Zero-trust POSIX runtime for AI agents in <0.016ms",
"url": "https://adikshatriyag-crypto.github.io/aegis-kernel/"
},
{
"comments": "0",
"date": "2026-11-06T18:15:25",
"item_url": "https://news.ycombinator.com/item?id=50396090",
"points": "2",
"rank": "2",
"site": "nyneon.net",
"title": "Show HN: Search Danish supermarket offers in English",
"url": "https://nyneon.net/denmark-supermarket-offers/"
}
]
}
One call
Send the page URL and the recipe name to the Scrape API. The recipe brings the extract rules and the settings that work on Hacker News (a plain request (no browser needed)).
curl -G 'https://api.ujeebu.com/scrape' \
-H "ApiKey: $UJEEBU_API_KEY" \
--data-urlencode 'url=https://news.ycombinator.com/show' \
--data-urlencode 'recipe=hackernews'
import os, requests
r = requests.get(
"https://api.ujeebu.com/scrape",
params={"url": "https://news.ycombinator.com/show", "recipe": "hackernews"},
headers={"ApiKey": os.environ["UJEEBU_API_KEY"]},
timeout=120,
)
for item in r.json()["result"]["results"][:3]:
print(item["title"], item["points"], item["comments"])
# Example output:
# Show HN: AegisKernel – Zero-trust POS... 6 0
# Show HN: Search Danish supermarket of... 2 0
const params = new URLSearchParams({
url: "https://news.ycombinator.com/show",
recipe: "hackernews",
});
const res = await fetch(`https://api.ujeebu.com/scrape?${params}`, {
headers: { ApiKey: process.env.UJEEBU_API_KEY },
});
const { result } = await res.json();
for (const item of result.results.slice(0, 3)) {
console.log(item.title, item.points, item.comments);
}
// Example output:
// Show HN: AegisKernel – Zero-trust POS... 6 0
// Show HN: Search Danish supermarket of... 2 0
The answer is {"result": {...}} with the headers Ujb-Recipe and Ujb-Credits. Your own parameters always win over the recipe.
Search Hacker News with parameters
One call, no URL: send recipe=hackernews/search with the parameters below. We build the Hacker News search URL and answer the listing JSON, at the same credits as the page call.
| Parameter | Type | Values |
|---|---|---|
section | enum | news, newest, front, ask, show, jobs |
page | int | 1 to 10 |
One call (section=news)
curl -G 'https://api.ujeebu.com/scrape' \
-H 'ApiKey: YOUR_API_KEY' \
-d 'recipe=hackernews/search' \
-d 'section=news'
import os, requests
r = requests.get(
"https://api.ujeebu.com/scrape",
params={"recipe": "hackernews/search", "section": "news"},
headers={"ApiKey": os.environ["UJEEBU_API_KEY"]},
timeout=120,
)
for item in r.json()["result"]["results"][:3]:
print(item["title"], item["points"], item["comments"])
# Example output:
# Show HN: AegisKernel – Zero-trust POS... 6 0
# Show HN: Search Danish supermarket of... 2 0
const params = new URLSearchParams({
recipe: "hackernews/search",
section: "news",
});
const res = await fetch(`https://api.ujeebu.com/scrape?${params}`, {
headers: { ApiKey: process.env.UJEEBU_API_KEY },
});
const { result } = await res.json();
for (const item of result.results.slice(0, 3)) {
console.log(item.title, item.points, item.comments);
}
// Example output:
// Show HN: AegisKernel – Zero-trust POS... 6 0
// Show HN: Search Danish supermarket of... 2 0
The answer carries the built URL in the Ujb-Url header; a missing or invalid parameter answers 400 naming it (free). Have the URL already? Send it with recipe=hackernews/listing. Search with parameters in the docs
What people build with Hacker News data
Research datasets
Build datasets of public pages for analysis, search or LLM pipelines.
Learn moreTrend tracking
Follow what gets attention over time: scores, comments, stars.
Price
Same price as the page call, no fee for the recipe. Only successful responses are billed; blocked, timed-out and failed requests are free.
| Page type | Credits a page | Per 1,000, Starter | Per 1,000, Pro |
|---|---|---|---|
| Search results | 1 | $0.16 | $0.10 |
FAQ
Hacker News API vs scraping: which one should I use?
Use the official Hacker News API when it returns what you need. Anyone can read stories, comments, users and live lists through the official Firebase API, with no key. Use the page data when you need what the public page shows: Ujeebu's Hacker News recipe returns title, points, comments and 5 more fields from any public Hacker News page as JSON: send the URL with recipe=hackernews to the Scrape API, 1 credits a page, no Hacker News account or partner approval needed.
What does the Hacker News recipe return?
JSON with 8 fields from search results (recipe=hackernews), for example title, points, comments, date, item_url. The answer is {"result": {...}} with the fields shown on this page.
How much does it cost to scrape Hacker News?
1 credits a page ($0.10 per 1,000 on Pro, $0.16 on Starter). Same price as the page call, no fee for the recipe. Only successful responses are billed; blocked, timed-out and failed requests are free.
Do I need proxies or a headless browser?
No. The recipe brings the settings that work on Hacker News: a plain request (no browser needed). Send only the URL and recipe=hackernews.
What happens when Hacker News changes its pages?
We check Hacker News every day and re-validate the recipe on real pages every week, then fix it when the site changes. Until a fix is live, the API answers 404 "the recipe has no working version" instead of empty data, and that call is free.
Can I search Hacker News with parameters?
Yes, in one call: send recipe=hackernews/search with section, page and no URL. We build the Hacker News search URL (returned in the Ujb-Url header), apply recipe=hackernews/listing and answer its JSON, at the same credits as the page call. A missing or invalid parameter answers 400 naming it, and that call is free.
Related recipes
GitHubSearch results, Page · 5 credits- Stack OverflowSearch results · 5 credits
Hugging FaceSearch results, Page · 1 credits
LinkedInSearch results, Detail page, Profile · 5 credits
AmazonSearch results · 5 credits
X (Twitter)Profile · 5 credits
Logos and names belong to their owners. Ujeebu is not affiliated with Hacker News.
Get Hacker News data as JSON today.
5,000 free credits for 7 days. No card.