Hacker News user

GET https://api.api.sh/hackernews/v1/user
1 credit / call reference try it in the playground →

A Hacker News user's profile: username, karma, about (plain and HTML), account creation time, the total number of submissions, and their submitted item ids (stories, comments, polls, jobs), newest first. Page through them with page and limit; pass expand=true to get each item's title, URL, text, points, comment count and time instead of only ids (up to 30 per page). next_page is null on the last page.

Every response includes credits_used: the credits this call cost.

Parameters

nametypedescription
idrequired string Hacker News username (case-sensitive). Example: pg
page integer Page number (default 1).
limit integer Submitted ids per page (default 50, max 500; with expand, default and max 30).
expand boolean true to include each submitted item's details.

Every endpoint also takes fresh, raw, fields (see lean responses and caching).

Example

curl "https://api.api.sh/hackernews/v1/user?id=pg" \
  -H "x-api-key: $APISH_KEY"

Response

A JSON object with the fields described above, plus raw (the source's own data), cached, fetched_at and credits_used. Errors return {"success": false, "error": "…"} with the HTTP status (see errors). A lookup that ran but found nothing (404) costs the price above; refused calls and errors on our side are free (what's charged).

The fastest way to see the full response is the playground: it runs this endpoint with your account and shows the exact JSON.