Skip to content

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/searchStories or comments that match a search, 20 per page, by relevance or newest first.
GET/hackernews/itemA story, poll or comment with its comment tree down to depth levels.
GET/hackernews/userKarma, bio and submission count of one account.
GET/hackernews/topStories of the top, new, best, ask, show or job list, up to 30 at a time.
GET/hackernews/maxItemId of the newest item on Hacker News, for following new posts.
GET/hackernews/updatesItems and profiles that changed recently, as the official API lists them.

item

GET/v1/hackernews/item

A story, poll or comment with its comment tree down to depth levels.

scope social:read1 unitcached 10 min

Parameters

id
string
required
Item id or news.ycombinator.com item URL.
e.g. 8863
depth
integer
Levels of comments to return: 0 for none, 1 for top-level comments.
default 1
tunnel
string
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.
proxy
string
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.
profileId
string
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
authorAuthor
avatarUrlstring
idstring
namestring
urlstring
usernamestring
commentCountinteger (int64)
commentsComment[]
authorAuthor
avatarUrlstring
idstring
namestring
urlstring
usernamestring
commentsComment[]
createdAtstring
idstring
likeCountinteger (int64)
replyCountinteger (int64)
textstring
createdAtstring
idstring
parentIdstring
pointsinteger (int64)
textstring
titlestring
typestring
urlstring
curl "https://api.hoshime.com/v1/hackernews/item?id=8863" \
  -H "Authorization: Bearer $HOSHIME_TOKEN"
200 Real response
{
  "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/user

Karma, bio and submission count of one account.

scope social:read1 unitcached 10 min

Parameters

username
string
required
Username or news.ycombinator.com user URL.
e.g. pg
tunnel
string
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.
proxy
string
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.
profileId
string
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
avatarUrlstring
biostring
createdAtstring
followerCountinteger (int64)
followingCountinteger (int64)
idstring
karmainteger (int64)
namestring
postCountinteger (int64)
urlstring
usernamestring
verifiedboolean
curl "https://api.hoshime.com/v1/hackernews/user?username=pg" \
  -H "Authorization: Bearer $HOSHIME_TOKEN"
200 Real response
{
  "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/top

Stories of the top, new, best, ask, show or job list, up to 30 at a time.

scope social:read1 unitcached 5 minpaginated

Parameters

list
string
Which list to read: top, new, best, ask (Ask HN), show (Show HN) or job.
topnewbestaskshowjob
default top
limit
integer
Items per page, 1 to 30.
default 10
cursor
string
meta.pagination.nextCursor of the previous page. Omit it for the first page.
tunnel
string
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.
proxy
string
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.
profileId
string
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
authorAuthor
avatarUrlstring
idstring
namestring
urlstring
usernamestring
commentCountinteger (int64)
idstring
imageUrlstring
pointsinteger (int64)
publishedAtstring
sourcestring
summarystring
titlestring
typestring
urlstring
curl "https://api.hoshime.com/v1/hackernews/top" \
  -H "Authorization: Bearer $HOSHIME_TOKEN"
200 Real response
{
  "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/maxItem

Id of the newest item on Hacker News, for following new posts.

scope social:read1 unitcached 1 min

Parameters

tunnel
string
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.
proxy
string
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.
profileId
string
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
idstring
curl "https://api.hoshime.com/v1/hackernews/maxItem" \
  -H "Authorization: Bearer $HOSHIME_TOKEN"
200 Real response
{
  "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/updates

Items and profiles that changed recently, as the official API lists them.

scope social:read1 unitcached 1 min

Parameters

tunnel
string
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.
proxy
string
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.
profileId
string
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
itemsstring[]
profilesstring[]
curl "https://api.hoshime.com/v1/hackernews/updates" \
  -H "Authorization: Bearer $HOSHIME_TOKEN"
200 Real response
{
  "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
  }
}
esc
↑↓ move↵ open