Hacker News Search: stories by keyword with points and comments avatar

Hacker News Search: stories by keyword with points and comments

Pricing

from $0.55 / 1,000 story listeds

Go to Apify Store
Hacker News Search: stories by keyword with points and comments

Hacker News Search: stories by keyword with points and comments

Search Hacker News stories by keyword, up to 100 queries per run: one row per story with rank, title, link, domain, points, comment count, date and type (story, Ask HN, Show HN, job), sorted by relevance or date, with a minimum-points and recency filter. Pay per story.

Pricing

from $0.55 / 1,000 story listeds

Rating

0.0

(0)

Developer

Steadydata Team

Steadydata Team

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

16 hours ago

Last modified

Share

Search Hacker News stories by keyword, up to 100 queries per run: one row per story with rank, title, link, domain, points, comment count, date and type (story, Ask HN, Show HN, job), sorted by relevance or date, with a minimum-points and recency filter. Pay per story.

Why this scraper

  • Only delivered results are charged. Inputs that fail come back as clear error records at no cost.
  • The official Hacker News search API (Algolia), not a scraped page: one request per 100 stories, no browser, no blocking. Measured: 40 stories on "web scraping" plus the 30 front-page stories in one run for a few hundredths of a cent.
  • Ready to filter and rank: minPoints and sinceDays are applied by the API, sortBy switches between relevance and newest, type separates stories from Ask HN, Show HN and jobs, domain is extracted from the link, and Ask HN text comes as plain text instead of HTML. The submitter's username is not delivered.

Who this is for

Type queries in queries (up to 100 per run), or front_page for the current front page; choose sortBy, minPoints, sinceDays and maxResultsPerQuery (default 50, ceiling 500). Every row carries the query, rank, story id, title, link, domain, points, comment count, posting time, type, the Ask HN text when there is one, and the Hacker News link.

Who this is not for

Comments are not delivered, only their count. The submitter's username is left out on purpose. url and domain are empty for Ask HN and other text-only posts, text is filled only for those, and points is empty for job postings, which Hacker News does not score. Relevance is Algolia's ranking (text match weighted by points and recency); it is not the front-page order, which front_page gives.

Input example

{
"queries": [
"web scraping",
"front_page"
],
"sortBy": "relevance",
"minPoints": 0,
"sinceDays": 0,
"maxResultsPerQuery": 50
}

Output example

  • query
  • rank
  • storyId
  • title
  • url
  • domain
  • points
  • commentCount
  • createdAt
  • type
  • text
  • hnUrl

Error codes: INVALID_QUERY, NO_RESULTS, BLOCKED.

One delivered row looks like this:

{
"query": "web scraping",
"rank": 1,
"storyId": "22180559",
"title": "Congrats! Web scraping is legal! (US precedent)",
"url": "https://parsers.me/us-court-fully-legalized-website-scraping-and-technically-prohibited-it/",
"domain": "parsers.me",
"points": 1057,
"commentCount": 388,
"createdAt": "2020-01-29T14:06:37Z",
"type": "story",
"text": null,
"hnUrl": "https://news.ycombinator.com/item?id=22180559",
"status": "ok"
}

Pricing

Pay per event: one story-listed event per delivered result. No charge for inputs that fail, no separate platform-usage surcharge.

Free Apify plan: this actor delivers up to 25 rows per run for accounts on the Apify free plan, and then stops with a message. That limit is set by us, not by Apify. It exists so the actor keeps paying for itself for the people who do pay. Any paid Apify plan runs it at full size, billed per delivered row, with failed rows never charged.

Reviews: if this actor saves you time, a short review on this page is the one thing that helps most. Ratings are what other buyers look at first, and we have no other way to ask.

FAQ

Can I get the newest stories about a topic? Yes: sortBy = date, and sinceDays = 7 for the last week.

How do I get only popular stories? Set minPoints, for example 100; the filter is applied by the API, so the rows you get are all above it.

Do I pay for queries without results? No. A query with no stories comes back as one free error row.

Can I read the linked articles? Not with this actor; the url column is the input for a page or feed reader. The RSS and Atom Feed Reader from the related actors below reads the site's feed.

Is the front page live? Yes, front_page returns the 30 stories on the front page at run time, in front-page order.

Is personal data collected? createdAt is the posting time in UTC as an ISO timestamp; hnUrl is the story's discussion page.

What happens when the source changes? Sources change from time to time; that is the nature of this work. The actor is monitored daily and fixed fast, and while it is broken you are not charged, because only delivered results cost anything.