Hacker News Scraper avatar

Hacker News Scraper

Pricing

from $0.00005 / actor start

Go to Apify Store
Hacker News Scraper

Hacker News Scraper

Extract Hacker News posts instantly — title, URL, points, author, comments. Supports Top, New, Show HN, Ask HN and Jobs feeds. Pagination built in. Clean JSON output. No API key needed.

Pricing

from $0.00005 / actor start

Rating

0.0

(0)

Developer

Moritz Knopp

Moritz Knopp

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

2 days ago

Last modified

Categories

Share

This Actor scrapes posts from Hacker News using the Apify SDK and Crawlee. It supports five feeds — Top, New, Show HN, Ask HN, and Jobs — and extracts the rank, title, URL, points, author, comment count, and post age for each story. Pagination is handled automatically so you can collect up to 500 items in a single run.


Input parameters

ParameterTypeRequiredDefaultDescription
typestringYes"top"Feed to scrape. One of top, new, show, ask, jobs.
maxItemsintegerNo100Maximum number of posts to collect (1 – 500).

Output fields

Each item saved to the dataset has the following fields:

FieldTypeDescription
ranknumberPosition of the post on the page (e.g. 1, 2, 3).
titlestringHeadline text of the post.
urlstringLink the title points to. Internal HN links are converted to absolute URLs.
pointsnumberKarma points (upvotes). 0 for jobs posts.
authorstringHN username of the submitter.
commentCountnumberNumber of comments on the post. 0 if none or not applicable.
timePostedstringISO timestamp or relative age string (e.g. "2024-01-15 10:30:00").
typestringFeed type that was scraped, mirrors the type input field.

Example input

{
"type": "top",
"maxItems": 30
}

Example output

[
{
"rank": 1,
"title": "Introducing an open-source AI coding assistant",
"url": "https://example.com/blog/ai-coding-assistant",
"points": 487,
"author": "jsmith",
"commentCount": 214,
"timePosted": "2024-05-10 08:15:42",
"type": "top"
},
{
"rank": 2,
"title": "Ask HN: What's your most productive terminal setup?",
"url": "https://news.ycombinator.com/item?id=39999999",
"points": 312,
"author": "devnerd42",
"commentCount": 178,
"timePosted": "2024-05-10 07:44:10",
"type": "top"
}
]