Hacker News Comment Threads

Every comment on the Hacker News stories you give, one row each in thread order: depth, parent, position among replies, author, time, plain text and reply count. Whole discussions drop straight into a sheet or an AI summary; many stories per call.

$0.50 per 1,000 records

You pay only for the records you get. Zero records cost zero. 10,000 free records of this API to start (5,000 at the base price of $1 per 1,000), no card.

Try it
Ready-made, maintained by usPosts, 11 fieldsv1.0

Data from hn.algolia.com/api

Get this data

Try it here with a few records, download the sample, fill a Google Sheet, or call it from your own code.

Try it

Stories
Hacker News story links or ids, such as ["https://news.ycombinator.com/item?id=8863"] or ["8863"]. A comment link reads the replies under it. One per line, or separated by commas.
Example: https://news.ycombinator.com/item?id=8863
Maximum depthoptional
Deepest reply level to keep: 1 keeps only top-level comments, 2 adds their replies and so on. Empty keeps every level.
Example: 10
Maximum resultsoptional
Most comments per story, in thread order, from 1 to 10,000.
Example: 500

Run it on this page, or call it from your code with the endpoint in the developer section. A free key covers 10,000 records of this API, no card. Create a free key

For developers: the API and MCPThe endpoint, code in curl, JavaScript and Python, every input, and files for your tools
Endpoint
POSThttps://pullrow.dev/v1/apis/hacker-news-comment-threads/run
  • Small runs answer in the same request; longer ones answer 202 with a run to poll.
  • fields returns only the fields you name. The examples send the ones picked on this page.
  • Idempotency-Key is optional. A retry with it is never charged twice.
  • You pay for records returned. Zero records cost zero.

Every run option, explained

Calling it needs a key
10,000 free records of this API to start. No card.
curl
curl -X POST "https://pullrow.dev/v1/apis/hacker-news-comment-threads/run" \
  -H "Authorization: Bearer $PULLROW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "input": {
    "stories": [
      "https://news.ycombinator.com/item?id=8863"
    ]
  },
  "max_items": 50
}'

Inputs

Send them as input in the request body. Leave one out to use its default.

storieslistrequired
Hacker News story links or ids, such as ["https://news.ycombinator.com/item?id=8863"] or ["8863"]. A comment link reads the replies under it.
example: https://news.ycombinator.com/item?id=8863
max_depthnumber
Deepest reply level to keep: 1 keeps only top-level comments, 2 adds their replies and so on. Empty keeps every level.
example: 10
max_resultsnumber
Most comments per story, in thread order, from 1 to 10,000.
default: 1000example: 500

What's in each record

11 fields: 8 here, 3 technical ones under Technical details.

Basics

  • Story title

    Title of that story.

    Example My YC app: Dropbox - Throw away your USB drive

  • Depth

    Reply level: 1 for a top-level comment, 2 for a reply to one, and so on.

    Example 1

  • Position

    Place among the replies to the same parent, 1 for the oldest.

    Example 1

  • Author

    Hacker News user name of the commenter.

    Example dhouston

  • Text

    The comment in plain text, one paragraph per line.

    Example oh, and a mac port is coming :)

  • Replies count

    Number of direct replies to the comment.

    Example 1

Dates

  • Created

    When the comment was posted (UTC).

    Example Apr 4, 2007

Technical detailsField names and types for developers, and the 3 fields hidden above

Hidden by default

These 3 fields come with each record too. They are internal codes, notes about how the record was read or a copy of what was searched for, so the lists above leave them out.

  • Story ID story_idHacker News id of the story the comment belongs to.
  • Comment ID comment_idHacker News id of the comment.
  • Parent ID parent_idId of the comment it replies to, or the story id for a top-level comment.

Field names and types

The names your code reads in each record. "Filled" counts how many of the 3 sample records carry the field.

Field nameTypeShown on this page asFilled
story_idtextStory ID (hidden)3 of 3
story_titletextStory title3 of 3
comment_idtextComment ID (hidden)3 of 3
parent_idtextParent ID (hidden)3 of 3
depthnumberDepth3 of 3
positionnumberPosition3 of 3
authortextAuthor3 of 3
created_atdate and timeCreated3 of 3
texttextText3 of 3
replies_countnumberReplies count3 of 3
urllinkLink3 of 3

How it reads the site

Runs on a reader we built and maintain by hand for this site.

Sample records

Sample records
RecordTextStory titleDepthPositionAuthorReplies countCreatedLink
1oh, and a mac port is coming :)My YC app: Dropbox - Throw away your USB drive11dhouston1Apr 4, 2007news.ycombinator.com/item?id=8865
2Drew, this is awesome! All of the features you mentioned are exactly what people need.My YC app: Dropbox - Throw away your USB drive21vlad0Apr 5, 2007news.ycombinator.com/item?id=9007
3This has great potential! Only suggestion I would have is go slower on the demo. I know you lost me very early into it switching between windows. If you are looking for a wider audience than those who already know the context of dropbox, make a video where you lay out the case…My YC app: Dropbox - Throw away your USB drive12zaidf1Apr 4, 2007news.ycombinator.com/item?id=8869

Sample records from the example output this API publishes. Email addresses and phone numbers in them are masked. Hover over a column name to see the field name your code reads.

Reliability

Counted from real runs. Our own health checks are left out. A run succeeded when it finished and the site neither blocked it nor broke it.

Incidents and repairs

How it is kept working What a repair can't do

A ready-made API, maintained by us. It is not part of the daily check or the automatic rebuild yet.

  • You pay only for records returned. A run that returns none costs nothing.
Known limits
  • Comments come in thread order (a comment, then its replies) with replies oldest first, not in the ranked order the Hacker News page shows; depth and position rebuild the tree.
  • text is cut at 2,000 characters (about 1 comment in 100 is longer), and e-mail addresses and phone numbers in it are replaced; open url for the full comment.
  • The number of comments can be slightly lower than the count Hacker News shows, for example when comments were deleted.
  • Comments in the monthly Who wants to be hired? and Freelancer? Seeking freelancer? threads are left out, because they are people's own profiles.
  • Up to 200 stories per run and 10,000 comments per story. A comment link returns the replies under that comment.
  • Data comes from the public HN Search API by Algolia, which allows 10,000 requests an hour per address; new comments appear there within minutes. Link back to news.ycombinator.com when you publish comments.

Version history

A run uses the live version unless the request names another one with version.