hacker_news_scraper
Search Hacker News stories, comments, Show HN and Ask HN by keyword or fetch the current front page, returning points, authors and comment counts without an API key.
Instructions
Search Hacker News stories, comments, Show HN and Ask HN posts by keyword, or pull the current front page — via the free Algolia HN API, no API key. One row per story or comment with points, author, comment count and text. Billed to your own Apify account: ~$0.0005 per Story (Apify free-plan price, lower on paid plans).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| author | No | Author username — Enter a Hacker News username, e.g. pg, to only return items posted by that user. Leave empty to include every author. | |
| sortBy | No | Sort by — relevance uses Algolia's default ranking (Hacker News' own /search), date returns the newest items first (/search_by_date), and points sorts the matched items by score, highest first. Ignored for front_page queries. Options: relevance = Relevance; date = Newest first; points = Highest points first. | relevance |
| queries | Yes | Search queries — Enter one search term per row, e.g. apify or rust. Leave a row empty, or type front_page, to fetch the current Hacker News front page instead of running a search. Example: ["front_page"]. | |
| minPoints | No | Minimum points — Enter the minimum score an item must have to be included, e.g. 50. Set to 0 to disable this filter. | |
| sinceDays | No | Only items from the last N days — Enter how many days back to search, e.g. 7 for the last week. Set to 0 to disable this filter and search all time. | |
| maxResults | No | Max results per query — Enter how many rows to return for each entry in queries, e.g. 50. Algolia serves at most 1000 hits per query. | |
| contentType | No | Content type — Choose which kind of Hacker News item to search: story (links and text posts), comment, show_hn, ask_hn, poll, or all to search every type. Ignored for front_page queries, which always return front-page stories. Options: story = Stories; comment = Comments; show_hn = Show HN; ask_hn = Ask HN; poll = Polls; all = All types. | story |