Get Hacker News user by ID · Hacker News API
Return a public Hacker News user profile by case-sensitive username, including karma, account creation date, and the about text. Useful for attributing stories and comments and profiling contributors.
Using ChatGPT, Claude Code or another client? See the setup steps
curl https://api.unifapi.com/hacker-news/users/{id} \
-H "Authorization: Bearer $UNIFAPI_KEY"Parameters
- idpathrequired
- Case-sensitive Hacker News username.
This operation is part of the Hacker News API in the news category. It uses the same Bearer token, request tracing, error model, and billing envelope as every UnifAPI endpoint, so agents can switch between platforms without custom per-vendor glue code.
Use it when a workflow needs Hacker News public data alongside other news and community sources, but should still keep one API key, one account balance, and one predictable JSON contract.
Common agent workflows
- Resolve a public Hacker News identity into structured profile metadata for enrichment agents.
- Refresh creator, company, or account snapshots without managing source-specific response shapes.
- Give an AI agent a stable Hacker News data source without building a per-platform integration.
- Normalize Hacker News responses into the same UnifAPI envelope used across the catalog.
Unified envelope, platform-native fields
- Lookup responses return one canonical object in `data` with stable identifiers, source URLs where available, and platform-specific metadata normalized into predictable JSON.
- This operation has a zero-credit multiplier, so successful responses include zero-charge billing metadata.
- A not-found or invalid-input condition uses the unified UnifAPI error shape, so callers do not need special handling for each source platform.
Response status codes
Billing
This operation is free: it has a zero-credit multiplier and still returns billing metadata with zero credits charged.
Errors and retries
Authentication, validation, rate-limit, not-found, and provider errors use the unified UnifAPI error format. Agents should log `request_id`, retry only retryable failures, and treat invalid API keys, disabled keys, and expired keys as the same public `unauthorized` error type.
Fields in the data object
A successful Get Hacker News user by ID call returns one data object with these fields.
- idstring
- createdinteger
- Unix epoch seconds
- karmainteger
- aboutstring
- HTML profile text.
- submittedinteger[]
Agents & Skills built on Hacker News
You rarely call Get Hacker News user by ID by hand. These prebuilt agents and skills already read Hacker News data inside Claude or Codex — start from one of them, or call this endpoint yourself.
More Hacker News operations
Combine endpoints from the same platform, then join the results with other UnifAPI categories without changing authentication or response parsing.
Get changed Hacker News items and profiles
Return the IDs of recently changed Hacker News items and user profiles. Useful for incrementally syncing only what changed since the last poll instead of re-fetching everything.
List a Hacker News user's comments
Returns a Hacker News user's comments, newest first. Paginate with `cursor`. Returns `not_found` when the user does not exist.
List a Hacker News user's favorites
Returns the stories and comments a Hacker News user has marked as public favorites. Paginate with `cursor`. Returns `not_found` when the user does not exist.
List a Hacker News user's submissions
Returns a Hacker News user's stories, polls and jobs, newest first. Paginate with `cursor`. Returns `not_found` when the user does not exist.
Get Hacker News item by ID
Fetch a single Hacker News item. Stories, comments, jobs, polls, and poll options share the same item shape.
List the comment tree of a Hacker News story
Returns the comments on a Hacker News story, depth-first with parent ids and depth, so a thread can be rebuilt. Paginate with `cursor`. Returns `not_found` when the story does not exist.