技
Hacker News API
6 endpointsDeveloper & TechGlobalsocial:read6 real examples
Returns Hacker News stories, comments, user profiles, ranked story lists, newest item id and recent updates.
View as Markdown| GET | /hackernews/search | Stories or comments that match a search, 20 per page, by relevance or newest first. |
| GET | /hackernews/item | A story, poll or comment with its comment tree down to depth levels. |
| GET | /hackernews/user | Karma, bio and submission count of one account. |
| GET | /hackernews/top | Stories of the top, new, best, ask, show or job list, up to 30 at a time. |
| GET | /hackernews/maxItem | Id of the newest item on Hacker News, for following new posts. |
| GET | /hackernews/updates | Items and profiles that changed recently, as the official API lists them. |
search
GET
/v1/hackernews/searchStories or comments that match a search, 20 per page, by relevance or newest first.
scope social:read1 unitcached 10 minpaginated
Parameters
querystring required | Search terms. e.g. golang |
sortstring | relevance, or date for newest first.relevancedatedefault relevance |
tagsstring | Algolia tags to match: story, comment, poll, show_hn, ask_hn, front_page or author_<name>. default story |
cursorstring | meta.pagination.nextCursor of the previous page. Omit it for the first page. |
tunnelstring | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
proxystring | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
profileIdstring | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |
Response data
15 fields
author | Author |
avatarUrl | string |
id | string |
name | string |
url | string |
username | string |
commentCount | integer (int64) |
createdAt | string |
id | string |
points | integer (int64) |
storyId | string |
text | string |
title | string |
type | string |
url | string |
curl "https://api.hoshime.com/v1/hackernews/search?query=golang" \ -H "Authorization: Bearer $HOSHIME_TOKEN"
const res = await fetch("https://api.hoshime.com/v1/hackernews/search?query=golang", { headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, }, }); const { data, meta } = await res.json();
import os, requests res = requests.get( "https://api.hoshime.com/v1/hackernews/search?query=golang", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, ) body = res.json()
{ "data": [ { "author": { "avatarUrl": "", "id": "", "name": "", "url": "", "username": "withinboredom" }, "commentCount": 370, "createdAt": "2022-12-29T23:17:43Z", "id": "34179426", "points": 806, "storyId": "34179426", "text": "", "title": "Golang disables Nagle's Algorithm by default", "type": "story", "url": "https://withinboredom.info/blog/2022/12/29/golang-is-evil-on-shitty-networks/" }, { "author": { "avatarUrl": "", "id": "", "name": "", "url": "", "username": "0xedb" }, "commentCount": 525, "createdAt": "2022-04-29T13:51:56Z", "id": "31205072", "points": 748, "storyId": "31205072", "text": "", "title": "Lies we tell ourselves to keep using Golang", "type": "story", "url": "https://fasterthanli.me/articles/lies-we-tell-ourselves-to-keep-using-golang" } ], "meta": { "cached": false, "endpoint": "search", "fetchedAt": "2026-11-06T09:41:00Z", "pagination": { "nextCursor": "EpcDEgV…", "hasMore": true, "total": null }, "platform": "hackernews", "requestId": "req_2Xb9kQ…", "units": 1 } }
item
GET
/v1/hackernews/itemA story, poll or comment with its comment tree down to depth levels.
scope social:read1 unitcached 10 min
Parameters
idstring required | Item id or news.ycombinator.com item URL. e.g. 8863 |
depthinteger | Levels of comments to return: 0 for none, 1 for top-level comments. default 1 |
tunnelstring | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
proxystring | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
profileIdstring | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |
Response data
28 fields
author | Author |
avatarUrl | string |
id | string |
name | string |
url | string |
username | string |
commentCount | integer (int64) |
comments | Comment[] |
author | Author |
avatarUrl | string |
id | string |
name | string |
url | string |
username | string |
comments | Comment[] |
createdAt | string |
id | string |
likeCount | integer (int64) |
replyCount | integer (int64) |
text | string |
createdAt | string |
id | string |
parentId | string |
points | integer (int64) |
text | string |
title | string |
type | string |
url | string |
curl "https://api.hoshime.com/v1/hackernews/item?id=8863" \ -H "Authorization: Bearer $HOSHIME_TOKEN"
const res = await fetch("https://api.hoshime.com/v1/hackernews/item?id=8863", { headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, }, }); const { data, meta } = await res.json();
import os, requests res = requests.get( "https://api.hoshime.com/v1/hackernews/item?id=8863", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, ) body = res.json()
{ "data": { "author": { "avatarUrl": "", "id": "", "name": "", "url": "", "username": "dhouston" }, "commentCount": 71, "comments": [ { "author": { "avatarUrl": "", "id": "", "name": "", "url": "", "username": "dhouston" }, "comments": [], "createdAt": "2007-04-04T19:22:55Z", "id": "8865", "likeCount": 0, "replyCount": 1, "text": "oh, and a mac port is coming :)" }, { "author": { "avatarUrl": "", "id": "", "name": "", "url": "", "username": "zaidf" }, "comments": [], "createdAt": "2007-04-04T19:36:20Z", "id": "8869", "likeCount": 0, "replyCount": 1, "text": "This has great potential!<p>Only suggestion I would have is go slower on the demo. I know you lost me very early into it switching between w…" } ], "createdAt": "2007-04-04T19:16:40Z", "id": "8863", "parentId": "", "points": 104, "text": "", "title": "My YC app: Dropbox - Throw away your USB drive", "type": "story", "url": "http://www.getdropbox.com/u/2/screencast.html" }, "meta": { "cached": false, "endpoint": "item", "fetchedAt": "2026-11-06T09:41:00Z", "platform": "hackernews", "requestId": "req_2Xb9kQ…", "units": 1 } }
user
GET
/v1/hackernews/userKarma, bio and submission count of one account.
scope social:read1 unitcached 10 min
Parameters
usernamestring required | Username or news.ycombinator.com user URL. e.g. pg |
tunnelstring | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
proxystring | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
profileIdstring | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |
Response data
12 fields
avatarUrl | string |
bio | string |
createdAt | string |
followerCount | integer (int64) |
followingCount | integer (int64) |
id | string |
karma | integer (int64) |
name | string |
postCount | integer (int64) |
url | string |
username | string |
verified | boolean |
curl "https://api.hoshime.com/v1/hackernews/user?username=pg" \ -H "Authorization: Bearer $HOSHIME_TOKEN"
const res = await fetch("https://api.hoshime.com/v1/hackernews/user?username=pg", { headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, }, }); const { data, meta } = await res.json();
import os, requests res = requests.get( "https://api.hoshime.com/v1/hackernews/user?username=pg", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, ) body = res.json()
{ "data": { "avatarUrl": "", "bio": "Bug fixer.", "createdAt": "2006-10-09T18:21:32Z", "followerCount": 0, "followingCount": 0, "id": "pg", "karma": 157316, "name": "", "postCount": 15565, "url": "https://news.ycombinator.com/user?id=pg", "username": "pg", "verified": false }, "meta": { "cached": false, "endpoint": "user", "fetchedAt": "2026-11-06T09:41:00Z", "platform": "hackernews", "requestId": "req_2Xb9kQ…", "units": 1 } }
top
GET
/v1/hackernews/topStories of the top, new, best, ask, show or job list, up to 30 at a time.
scope social:read1 unitcached 5 minpaginated
Parameters
liststring | Which list to read: top, new, best, ask (Ask HN), show (Show HN) or job.topnewbestaskshowjobdefault top |
limitinteger | Items per page, 1 to 30. default 10 |
cursorstring | meta.pagination.nextCursor of the previous page. Omit it for the first page. |
tunnelstring | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
proxystring | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
profileIdstring | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |
Response data
16 fields
author | Author |
avatarUrl | string |
id | string |
name | string |
url | string |
username | string |
commentCount | integer (int64) |
id | string |
imageUrl | string |
points | integer (int64) |
publishedAt | string |
source | string |
summary | string |
title | string |
type | string |
url | string |
curl "https://api.hoshime.com/v1/hackernews/top" \ -H "Authorization: Bearer $HOSHIME_TOKEN"
const res = await fetch("https://api.hoshime.com/v1/hackernews/top", { headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, }, }); const { data, meta } = await res.json();
import os, requests res = requests.get( "https://api.hoshime.com/v1/hackernews/top", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, ) body = res.json()
{ "data": [ { "author": { "avatarUrl": "", "id": "", "name": "", "url": "", "username": "ChrisArchitect" }, "commentCount": 71, "id": "50388001", "imageUrl": "", "points": 51, "publishedAt": "2026-11-06T04:00:28Z", "source": "", "summary": "", "title": "US FAA says it will phase out floppy disks from air traffic control by 2028", "type": "story", "url": "https://www.reuters.com/world/us/us-faa-says-it-will-phase-out-floppy-disks-air-traffic-control-by-2028-2026-11-05/" }, { "author": { "avatarUrl": "", "id": "", "name": "", "url": "", "username": "PLenz" }, "commentCount": 920, "id": "50391456", "imageUrl": "", "points": 315, "publishedAt": "2026-11-06T12:13:51Z", "source": "", "summary": "", "title": "Tesla to wind down Cybertruck production", "type": "story", "url": "https://www.nbcnews.com/tech/tech-news/tesla-wind-cybertruck-production-years-poor-sales-markets-rcna607817" } ], "meta": { "cached": false, "endpoint": "top", "fetchedAt": "2026-11-06T09:41:00Z", "pagination": { "nextCursor": "EpcDEgV…", "hasMore": true, "total": null }, "platform": "hackernews", "requestId": "req_2Xb9kQ…", "units": 1 } }
maxItem
GET
/v1/hackernews/maxItemId of the newest item on Hacker News, for following new posts.
scope social:read1 unitcached 1 min
Parameters
tunnelstring | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
proxystring | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
profileIdstring | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |
Response data
1 fields
id | string |
curl "https://api.hoshime.com/v1/hackernews/maxItem" \ -H "Authorization: Bearer $HOSHIME_TOKEN"
const res = await fetch("https://api.hoshime.com/v1/hackernews/maxItem", { headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, }, }); const { data, meta } = await res.json();
import os, requests res = requests.get( "https://api.hoshime.com/v1/hackernews/maxItem", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, ) body = res.json()
{ "data": { "id": "50395889" }, "meta": { "cached": false, "endpoint": "maxItem", "fetchedAt": "2026-11-06T09:41:00Z", "platform": "hackernews", "requestId": "req_2Xb9kQ…", "units": 1 } }
updates
GET
/v1/hackernews/updatesItems and profiles that changed recently, as the official API lists them.
scope social:read1 unitcached 1 min
Parameters
tunnelstring | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
proxystring | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
profileIdstring | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |
Response data
2 fields
items | string[] |
profiles | string[] |
curl "https://api.hoshime.com/v1/hackernews/updates" \ -H "Authorization: Bearer $HOSHIME_TOKEN"
const res = await fetch("https://api.hoshime.com/v1/hackernews/updates", { headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, }, }); const { data, meta } = await res.json();
import os, requests res = requests.get( "https://api.hoshime.com/v1/hackernews/updates", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, ) body = res.json()
{ "data": { "items": [ "50391366", "50394480" ], "profiles": [ "lnkdinsuxs", "Veserv" ] }, "meta": { "cached": false, "endpoint": "updates", "fetchedAt": "2026-11-06T09:41:00Z", "platform": "hackernews", "requestId": "req_2Xb9kQ…", "units": 1 } }