Hacker News Scraper icon

News & feeds · Developer tools

Hacker News Scraper

Scrape Hacker News stories (top, new, best, ask, show, jobs) plus per-story metadata in one call — title, URL, score, author, comment count, posted-at — export to JSON or CSV. A Hacker News API wrapper that handles pagination, fan-out, retries, and rate-limit pacing.

Free Apify credit covers a first run. No credit card to try.

What this Actor scrapes

This Actor fetches Hacker News story lists from any of the six available feeds — top, new, best, ask, show, or jobs — fans out to each individual story record, and writes one typed dataset row per story. The underlying Firebase API returns only item IDs at the feed level; we perform the full N+1 enrichment call per story and assemble the complete record before it hits your dataset.

You pick the feed and the result cap; we deliver clean, schema-validated rows on a schedule in JSON, CSV, or Excel — ready to pipe into Google Sheets, S3, a data warehouse, a webhook, or a RAG pipeline.

What we handle for you

  • 🛡️ Browser fingerprint rotationcurl-cffi impersonates real Chrome, Firefox, and Safari TLS handshakes so we look like a browser, not a Python script.
  • 🌐 Residential proxy rotation via Apify Proxy — fresh session and exit IP on every block or rate-limit response.
  • 🔁 Retries with exponential backoff on 408 / 429 / 5xx — up to 5 attempts per request, Retry-After header honoured.
  • 🧱 Rate-limit-aware pacing — when the target pushes back we slow down and surface a clear status message instead of silently returning an empty dataset.
  • 🧊 Clean, typed dataset rows — Pydantic-validated, ISO-8601 timestamps, stable IDs, feed rank included.
  • 💰 Pay-Per-Event pricing — you pay only for results that land in your dataset. No data, no charge.

Use cases

  • Trend monitoring — diff top stories hourly to see which posts gain traction fastest.
  • Comment-volume alerts — pipe rows into Slack when a story passes 100 comments.
  • Lead gen for dev tools — surface Show HN launches that mention your stack and reach out early.
  • Newsletter curation — feed the top 10 stories from the best feed into a weekly digest.
  • ML training data — historical top-story metadata for score-prediction or topic-classification models.
  • Show HN tracker — schedule a daily run against the show feed to watch new product launches.

Input

Paste this into the Apify Console, or send it as the run input over the API. Proxy settings are on by default; you rarely need to touch them.

FieldTypeRequiredWhat it does
feed string no Which Hacker News story feed to pull from. top mirrors the front page; best is the time-decayed best-of; ask / show / jobs are the dedicated sub-feeds.
maxResults integer no Total dataset items to keep. The feeds expose up to 500 items each; pulling all of them costs ~500 results. Set to 0 for the feed's full length (up to 500).
includeText boolean no Fetch the full self-post body for Ask HN / Show HN entries. Has no effect on regular link stories.
concurrency integer no How many story records to fetch in parallel. The Firebase endpoint is generous; 8 is comfortable.
{
  "feed": "top",
  "maxResults": 3,
  "includeText": false,
  "concurrency": 4,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}

Output

One row per result, schema-validated before it is written. Export JSON, CSV, Excel or XML from the run, or read it over the API.

idtypetitleurlpermalinkbyscoredescendantstexttimeposted_atscraped_atrank

{
  "id": 39000000,
  "type": "story",
  "title": "Show HN: Devil Scrapes \u2014 public-data Apify Actors with honest pricing",
  "url": "https://apify.com/DevilScrapes",
  "permalink": "https://news.ycombinator.com/item?id=39000000",
  "by": "devilscrapes",
  "score": 142,
  "descendants": 33,
  "text": null,
  "time": 1747353600,
  "posted_at": "2026-05-15T20:00:00+00:00",
  "scraped_at": "2026-05-15T20:05:00+00:00",
  "rank": 1
}

Pricing

EventPriceWhen
Actor start$0.20Once per run, covers warm-up and proxy session setup.
Result emitted$0.0020Per result written to the dataset.

You pay only for results that land. Cap any run with maxTotalChargeUsd. See pricing & billing for worked examples.

FAQ

Is scraping Hacker News legal?
Yes — Y Combinator makes Hacker News data available through a documented, open API at github.com/HackerNews/API. We fetch only what that API surfaces, pace requests responsibly, and surface every call in the run log.
Why use this instead of calling the API myself?
The raw API returns an array of item IDs at the feed level — you need a separate round-trip per story to get title, score, and comment count. At 500 stories that is 501 HTTP calls to coordinate, de-duplicate, and fan out concurrently. We do that work, add ISO timestamps, attach the feed rank column (which the API does not expose), and deliver structured rows you can export or schedule without writing a line of code.
What about the hacker news show HN tracker use case?
Set feed to show and schedule your run on a cron. Each run captures the Show HN feed at that point in time with title, score, comment count, and author — ready for a Slack alert or spreadsheet diff without any glue code.
Can I export Hacker News data to a spreadsheet?
Yes — finish a run, open Storage → Dataset, and click Export as CSV or Export as Excel. Every field in the output table maps cleanly to a spreadsheet column. You can also connect the dataset URL directly to a Google Sheets IMPORTDATA formula.
Can I scrape comments too?
Not in this Actor — comment trees fan out 10-100x per story and would multiply cost significantly. A sibling hacker-news-comments-scraper will follow if there is enough demand.
How fresh is the data?
The upstream API reflects changes in near-real time. Your run captures whatever the feed contained the moment each story record was fetched.

Ready to run it?

Open the listing on Apify, paste the input above, and watch rows land. If it ever breaks, it is our problem before it is yours.

Related Actors

Teams that run this also run