API Anything

Hacker News APIunofficial

Hacker News front page (HTML) and story search via the Algolia index behind hn.algolia.com. Public, logged out.

all live 2 operations, checked by the installs that call them.

Try it

Set up API Anything for your agents:

npx -y api-anything setup

Then ask your agent, which finds this site by itself, or call it from a shell:

api-anything pull hacker-news
api-anything call hacker-news frontPage

Operations

OperationMethodLoginWritesStatus
frontPage() -> title, url, points, comments

The 30 stories currently on the Hacker News front page: title, url, points ("N points"), comments ("N comments" or "discuss").

GET no no Live1 confirmation · 100% success; last worked
search(query) -> title, url, points, num_comments, objectID, author, created_at

Search Hacker News stories via the Algolia index behind hn.algolia.com; returns up to 30 hits with title, url, points, num_comments, objectID, author, created_at.

POST no no Live6 confirmations · 100% success; last worked

Notes

No account is needed.

  • frontPage: job posts have neither points nor comments. Self posts (Ask HN) have a relative url such as item?id=.... Only the first page is included, with no pagination.
  • search returns stories only, ranked by popularity, and only page 0 (30 hits).

About these operations

Each operation is a request learned from Hacker News's own web pages: API Anything replays it over plain HTTP and falls back to a browser when it must. Read them as JSON.

← All shared sites