> For the complete documentation index, see [llms.txt](https://agpt.co/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://agpt.co/docs/integrations/block-integrations/users-1.md).

# Hacker News Users

Read a Hacker News user's public profile from Hacker News's official API (hacker-news.firebaseio.com), which needs no account or API key.

## Hacker News Get User

### What it is

Get a Hacker News user's profile by username: karma, when the account was created, the about text and how many items they have posted. Uses Hacker News's official API, which needs no account.

### How it works

Calls the official API's `user` endpoint. Usernames are case-sensitive (`pg` exists, `PG` doesn't), and a profile link such as `https://news.ycombinator.com/user?id=pg` works too. The API answers `null` for a user that doesn't exist, and the block turns that into an error.

`about` comes back as plain text, with paragraphs as blank lines and links as full URLs. `submission_count` counts the stories, comments and polls on the user's submission list. The profile holds only what Hacker News shows publicly.

### Inputs

| Input    | Description                                                                                                    | Type | Required |
| -------- | -------------------------------------------------------------------------------------------------------------- | ---- | -------- |
| username | The username, such as pg (case-sensitive), or a profile link such as <https://news.ycombinator.com/user?id=pg> | str  | Yes      |

### Outputs

| Output            | Description                                                   | Type |
| ----------------- | ------------------------------------------------------------- | ---- |
| error             | Error message if the operation failed                         | str  |
| username          | The username, spelled the way Hacker News has it              | str  |
| karma             | The user's karma                                              | int  |
| created\_at       | When the account was created, in ISO 8601 (UTC)               | str  |
| about             | The user's about text as plain text; empty if they wrote none | str  |
| submission\_count | How many stories, comments and polls the user has posted      | int  |
| profile\_url      | Link to the profile on Hacker News                            | str  |

### Possible use case

**Lead Context**: Before replying to someone who mentioned your product, check their karma and what they say about themselves.

**Expert Finder**: Look up the authors of the best comments on a topic to see who they are.

**New Account Check**: Flag mentions that come from accounts created in the last few days.

***


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://agpt.co/docs/integrations/block-integrations/users-1.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
