Hacker News

List Hacker News user comments

List a Hacker News user's comments (newest first).

GET/v1/hackernews/users/{username}/comments
1credit
x-api-key*stringheader

API key (`sfk_...`)

Parameters
3
username*stringpath

Hacker News username (case-sensitive).

min 1 chars · max 255 chars · pattern: ^[A-Za-z0-9_-]+$

pageintegeroptionalquery

Zero-based page index (maximum 50 pages, up to 1,000 hits).

≥ 0 · ≤ 49

pageSizeintegeroptionalquery

Hits per page (1–50). Default: 20.

≥ 1 · ≤ 50

Response fields
32

Endpoint-specific response payload.

datalookupStatus
string

Whether the user was found or not found.

one of: found, not_found

User summary when found; null when not_found.

datauserusername
string

Hacker News username.

min 1 chars

datauserprofileUrl
string

Canonical news.ycombinator.com user URL.

Comment items newest-first.

dataitems[]id
integer

Unique Hacker News item id.

≥ 0

dataitems[]type
string

Item type.

one of: story, comment, job, poll, pollopt, unknown

dataitems[]author
stringnullable

Author username when present.

dataitems[]createdAt
stringnullable

Creation time as an ISO-8601 timestamp.

dataitems[]title
stringnullable

Plain-text title when present.

dataitems[]text
stringnullable

Plain-text body when present (HTML stripped).

dataitems[]url
stringnullable

External URL when present and publicly safe.

dataitems[]score
integernullable

Score / votes when present.

dataitems[]commentCount
integernullable

Total comment count when present (stories/polls).

dataitems[]parentId
integernullable

Parent item id for comments/pollopts.

≥ 0

Child item ids in ranked display order when present. Some list endpoints omit children and return an empty array.

dataitems[]childIds[]
integeroptional

≥ 0

dataitems[]dead
boolean

Whether the item is marked dead. Some list endpoints omit this signal and return false.

dataitems[]deleted
boolean

Whether the item is marked deleted. Some list endpoints omit this signal and return false.

dataitems[]itemUrl
string

Canonical news.ycombinator.com item URL.

Pagination metadata when found; null when not_found.

datapagepage
integer

Zero-based page index.

≥ 0

datapagepageSize
integer

Requested hits per page.

≥ 0

datapagereturned
integer

Number of comments returned in this page.

≥ 0

datapagehasMore
boolean

True when another page is available within the accessible window.

datapagenextPage
integernullable

Next page index when hasMore is true; otherwise null.

≥ 0

Metadata describing the request and billing outcome.

metarequestId
string

Unique request identifier for tracing this API call.

min 1 chars

metacreditsCharged
integer

Credits charged for this request.

≥ 0

metaversion
string

Public API version that served the response.

one of: v1

metacached
booleanoptional

True when served from shared response cache. Credits still apply (full endpoint price); Age header may be present.

Code example

curl "https://api.socialfetch.dev/v1/hackernews/users/tptacek/comments" \
  -H "x-api-key: YOUR_API_KEY"

Responses

User comments page.