Ycombinitor avatar

Ycombinitor

Pricing

Pay per usage

Go to Apify Store
Ycombinitor

Ycombinitor

Collect every article's title, score, author, age, and URL from the Hacker News front page in seconds, no browser required.

Pricing

Pay per usage

Rating

0.0

(0)

Developer

LIAICHI MUSTAPHA

LIAICHI MUSTAPHA

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

a month ago

Last modified

Share

Hacker News Front-Page Scraper

Collect every article's title, score, author, age, and URL from the Hacker News front page in seconds — no browser required.

What does this Actor do?

This Actor fetches the Hacker News front page and extracts the top stories using a fast, lightweight HTTP crawler (Cheerio). For each story it captures:

FieldDescription
rankPosition on the front page (1-based)
idHN item ID
titleStory headline
urlLink to the article
domainDomain shown beneath the title
scoreNumber of upvote points
authorHN username of the submitter
ageTextRelative age string (e.g., "4 hours ago")
ageTimestampISO 8601 timestamp of submission
commentsCountNumber of comments
commentsUrlDirect link to the HN discussion
scrapedAtISO 8601 timestamp of when the record was scraped

Input

{
"maxItems": 30
}
ParameterTypeDefaultDescription
maxItemsinteger30Maximum stories to collect (1–30). HN shows ≤30 stories per page.

Output example

[
{
"rank": 1,
"id": "49170165",
"title": "Show HN: Simple algorithm and color space to generate diverse skin tones",
"url": "https://toneyalexander.github.io/inclusive-color-space/",
"domain": "toneyalexander.github.io",
"score": 288,
"author": "automatoney",
"ageText": "4 hours ago",
"ageTimestamp": "2026-08-04T15:16:22",
"commentsCount": 67,
"commentsUrl": "https://news.ycombinator.com/item?id=49170165",
"scrapedAt": "2026-08-04T19:00:00.000Z"
}
]

Limitations

  • Scrapes only the current front page (≤30 stories). Paginated pages (/news?p=2) are not fetched.
  • Job listings and special posts (e.g., "Hiring") often have no score, author, or comments count — those fields will be null.
  • Score and comment counts change constantly; each run reflects a point-in-time snapshot.
  • Hacker News does not provide an API for front-page items in this format, so the Actor scrapes HTML directly. Structural changes to HN's markup may require selector updates.

Running locally

# Install dependencies
npm install
# Build TypeScript
npm run build
# Run the Actor (reads input from storage/key_value_stores/default/INPUT.json)
apify run
# Or purge previous storage first
apify run --purge

Results are saved to storage/datasets/default/ as newline-delimited JSON.