Hacker News

List Hacker News user favorites

List favorites for a Hacker News user by username.

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

API key (`sfk_...`)

Parameters
2
username*stringpath

Hacker News username (case-sensitive).

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

pageintegeroptionalquery

One-based HTML favorites page number. Default: 1. Each page bills 1 credit.

≥ 1 · ≤ 100

Response fields
31

Endpoint-specific response payload.

datalookupStatus
string

Whether public favorites were found, the user/page was missing, or favorites are private/unavailable.

one of: found, not_found, private_or_unavailable

User summary when favorites are public; null for not_found / private_or_unavailable.

datauserusername
string

Hacker News username.

min 1 chars

datauserprofileUrl
string

Canonical news.ycombinator.com user URL.

Favorited items when available.

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 otherwise.

datapagepage
integer

Requested HTML page number.

≥ 0

datapagereturned
integer

Number of hydrated favorites returned.

≥ 0

datapagehasMore
boolean

True when the HTML page indicates another favorites page.

datapagedroppedCount
integer

Parsed ids that could not be hydrated.

≥ 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/favorites" \
  -H "x-api-key: YOUR_API_KEY"

Responses

Public favorites page.