One story with its top comments

One story with its top-level comments.

Request

GEThttps://tech-news.p.apihiver.com/v1/story/8863
Number. How many top-level comments to include (0–50, default 10).
Language
Client
1curl --request GET \
2  --url 'https://tech-news.p.apihiver.com/v1/story/8863?comments=%7Bcomments%7D' \
3  --header 'Accept: application/json' \
4  --header 'X-API-Key: YOUR_API_KEY'

One story with its top comments: Tech News API reference

One story with its top-level comments. This endpoint is part of the Tech News API: Top, new and best tech stories from Hacker News, full-text news search, story details with comments, and Ask/Show HN.

Example response (200, application/json)

Success.

1{
2  "id": 8863,
3  "url": "http://www.getdropbox.com/u/2/screencast.html",
4  "text": null,
5  "title": "My YC app: Dropbox - Throw away your USB drive",
6  "author": "dhouston",
7  "points": 104,
8  "comments": 71,
9  "published_at": "2007-04-04T19:16:40+00:00",
10  "top_comments": [
11    {
12      "text": "I have a few qualms with this app: 1. For a Linux user, you can already build such a system yourself quite trivially by getting an FTP account, mounting it locally with curlftpfs, and then using SVN or CVS on the mounted filesystem.  From Windows or Mac, this FTP account could be accessed through built-in software. 2. It doesn't actually replace a USB drive.  Most people I know e-mail files to the…",
13      "author": "BrandonM",
14      "replies": 1,
15      "published_at": "2007-04-05T15:16:54+00:00"
16    },
17    {
18      "text": "This is genius. It's is problem everyone is having, and everyone knew it ( http://www.aaronsw.com/weblog/lazybackup  ). If it really works as well as it looks in that demo then they nailed it. I'm both envious and inspired. I'll be surprised if YC does not fund them.",
19      "author": "brett",
20      "replies": 0,
21      "published_at": "2007-04-04T21:48:13+00:00"
22    },
23    {
24      "text": "Drew, I saw your short demo at BarCamp and I must say Dropbox looks great! Are you planning on having a Linux port as well, or is too early to talk about that? Also, as another SFP applicant I have to tell you that I really hope you get the funding - you deserve it.",
25      "author": "nefele",
26      "replies": 3,
27      "published_at": "2007-04-04T20:07:23+00:00"
28    }
29  ],
30  "discussion_url": "https://news.ycombinator.com/item?id=8863"
31}

Errors

  • 400 — A required parameter is missing or a value has the wrong format.
    1{
    2  "error": {
    3    "code": "INVALID_INPUT",
    4    "message": "story_id: Input should be a valid integer, unable to parse string as an integer"
    5  }
    6}
  • 404 — Nothing matches the value you sent.
    1{
    2  "error": {
    3    "code": "NOT_FOUND",
    4    "message": "No story with id 999999999."
    5  }
    6}

Gateway errors (missing key, no subscription, rate limits) are listed in Error codes.