Skip to Content
API ReferenceHacker News

Hacker News

Tech news aggregator — stories, items, users, and comments.

  • Stories: Top, new, best, ask, show, and job stories
  • Items: Get any item (story, comment, job, poll) by ID
  • Users: User profiles with karma and submissions
  • Comments: Recursive comment trees with configurable depth

Items

GET /hackernews/items/:itemId — 1 credit

Get a Hacker News item (story, comment, job, poll) by its ID.

ParamTypeRequiredDefaultDescription
itemIdintegerYesHacker News item ID
curl -H "x-api-key: sk_byc_xxx" \ https://api.bycrawl.com/hackernews/items/8863

Response

{ "id": 8863, "type": "story", "by": "dhouston", "time": 1175714200, "timeISO": "2007-04-04T19:16:40.000Z", "title": "My YC app: Dropbox - Throw away your USB drive", "url": "http://www.getdropbox.com/u/2/screencast.html", "text": null, "score": 104, "descendants": 71, "commentIds": [9224, 8917, 8884], "parent": null, "deleted": false, "dead": false, "hnUrl": "https://news.ycombinator.com/item?id=8863" }

Users

GET /hackernews/users/:username — 1 credit

Get a Hacker News user profile by username.

ParamTypeRequiredDefaultDescription
usernamestringYesHacker News username (case-sensitive)
curl -H "x-api-key: sk_byc_xxx" \ https://api.bycrawl.com/hackernews/users/pg

Response

{ "id": "pg", "karma": 157316, "about": "Bug fixer.", "created": 1160418092, "createdISO": "2006-10-09T18:21:32.000Z", "submissionCount": 15565, "recentSubmissions": [39667625, 37278578, 37278345] }

Stories

GET /hackernews/stories/:storyType — 2 credits

Get Hacker News stories by type.

ParamTypeRequiredDefaultDescription
storyTypestringYesStory type: top, new, best, ask, show, job
countintegerNo30Number of stories (max 50)
curl -H "x-api-key: sk_byc_xxx" \ "https://api.bycrawl.com/hackernews/stories/top?count=10"

Response

{ "stories": [ { "id": 47372367, "type": "story", "by": "vinhnx", "time": 1773451908, "timeISO": "2026-03-14T01:31:48.000Z", "title": "JPEG Compression", "url": "https://www.sophielwang.com/blog/jpeg", "score": 162, "descendants": 30, "hnUrl": "https://news.ycombinator.com/item?id=47372367" } ], "storyType": "top", "total": 500 }

Comments

GET /hackernews/items/:itemId/comments — 2 credits

Get comment tree for a Hacker News item.

ParamTypeRequiredDefaultDescription
itemIdintegerYesHacker News item ID
depthintegerNo3Max comment depth (max 5)
curl -H "x-api-key: sk_byc_xxx" \ "https://api.bycrawl.com/hackernews/items/8863/comments?depth=2"

Response

{ "item": { "id": 8863, "type": "story", "by": "dhouston", "title": "My YC app: Dropbox - Throw away your USB drive", "score": 104, "descendants": 71, "hnUrl": "https://news.ycombinator.com/item?id=8863" }, "comments": [ { "comment": { "id": 9224, "type": "comment", "by": "BrandonM", "time": 1175786214, "timeISO": "2007-04-05T15:16:54.000Z", "text": "Looks like a great idea...", "parent": 8863, "hnUrl": "https://news.ycombinator.com/item?id=9224" }, "replies": [] } ], "totalComments": 71 }