Export Hacker News stories, comments and jobs to CSV

Founders track mentions of their product, recruiters read Who is Hiring threads and researchers study what developers talk about. Hacker News has two free official APIs. Here's how to use them, and when a hosted scraper saves you time.

Hacker News Scraper: $0.20 per 1,000 items. Apify's free plan gives you $5 of credit every month, which covers about 25,000 items a month. No start fee; failed items are free.

Try Hacker News Scraper

The free way: HN's official APIs

  • Algolia HN Search API (hn.algolia.com/api/v1/search): full-text search with filters on tags, points and dates. Free, no key.
  • Firebase API (hacker-news.firebaseio.com/v0): one item at a time by ID, plus top, new, best, ask, show and job lists.
curl "https://hn.algolia.com/api/v1/search_by_date?query=postgres&tags=story&numericFilters=points>50"

The catch: a search returns at most 1,000 hits (50 pages), so big exports have to be split by date range, and you write the pagination and CSV code yourself. More in HN API vs a scraper.

The no-code way

  1. Open the Hacker News Scraper on Apify.
  2. Enter a query, content type (story, comment, Ask HN, Show HN, job, poll or front page), a date range, an author, and minimum points or comments.
  3. Run and download CSV, Excel or JSON. Paging past the API's 1,000-result cap is handled for you.
  4. Schedule it daily to watch new mentions of your product or competitors.
curl -X POST "https://api.apify.com/v2/acts/blueberry_rainstorm~hacker-news-scraper/run-sync-get-dataset-items?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "searchQuery": "AI agents",
  "contentType": "story",
  "sortBy": "date",
  "minPoints": 20,
  "maxItems": 500
}'

What it costs

$0.20 per 1,000 items. 5,000 stories and comments cost $1, and Apify's free credit covers about 25,000 items a month.

Questions

Is the Hacker News API free?

Yes. Both the Algolia search API and the Firebase API are free and need no key. The scraper adds date splitting past the 1,000-result cap, filters and CSV export for $0.20 per 1,000 items.

How do I export Who is Hiring posts?

Set contentType to job for HN job posts, or comment with a query such as "remote python" and a date range to search the hiring threads' comments. Export to CSV and filter in Excel.

Can I track mentions of my product?

Yes. Schedule a daily run with your product name as the query, sorted by date, and send new rows to Slack or email.

Hacker News Scraper: $0.20 per 1,000 items. Apify's free plan gives you $5 of credit every month, which covers about 25,000 items a month. No start fee; failed items are free.

Try Hacker News Scraper

Related guides

Free tools for the same job