Hacker News APIunofficial
Hacker News front page (HTML) and story search via the Algolia index behind hn.algolia.com. Public, logged out.
- ycombinator.com
all live 2 operations, checked by the installs that call them.
Try it
Set up API Anything for your agents:
npx -y api-anything setupThen 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 frontPageOperations
| Operation | Method | Login | Writes | Status |
|---|---|---|---|---|
frontPage() -> title, url, points, commentsThe 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_atSearch 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 neitherpointsnorcomments. Self posts (Ask HN) have a relativeurlsuch asitem?id=.... Only the first page is included, with no pagination.searchreturns 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.