# getHackerNewsUser

**Identifier:** `hackernews_getHackerNewsUser`

**Provider:** [Hacker News](https://kirha.com/providers/hackernews.md)

Get a Hacker News user profile by username: karma, account age, bio, submission count and their highest-scoring stories. Use it to gauge who is behind a post or how active an account is.

## Run it with the CLI

```bash
kirha tools run hackernews_getHackerNewsUser \
  --input '{
    "username": "pg"
  }'
```

`--input` takes a JSON object that matches the input schema. Pass `--input -` to read it from stdin.

## Call it over HTTP

```bash
curl https://api.kirha.com/tools/v1/execute \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: **********' \
  --data '{
  "tool_name": "hackernews_getHackerNewsUser",
  "input": {
    "username": "pg"
  }
}'
```

Replace the stars with an API key from https://app.kirha.com/api-keys.

## Input schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "properties": {
    "username": {
      "description": "Case-sensitive username, e.g., pg",
      "pattern": "^[\\w-]{2,15}$",
      "type": "string"
    }
  },
  "required": [
    "username"
  ],
  "type": "object"
}
```

## Output schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "about": {
      "type": "string"
    },
    "context": {
      "type": "string"
    },
    "createdAt": {
      "type": "string"
    },
    "karma": {
      "type": "number"
    },
    "profileUrl": {
      "type": "string"
    },
    "stories": {
      "type": "number"
    },
    "submissions": {
      "type": "number"
    },
    "topStories": {
      "items": {
        "additionalProperties": false,
        "properties": {
          "author": {
            "type": "string"
          },
          "comments": {
            "type": "number"
          },
          "discussionUrl": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "points": {
            "type": "number"
          },
          "postedAt": {
            "type": "string"
          },
          "text": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "url": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "discussionUrl"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "username": {
      "type": "string"
    }
  },
  "required": [
    "context",
    "username",
    "topStories",
    "profileUrl"
  ],
  "type": "object"
}
```

-----

[All Hacker News tools](https://kirha.com/providers/hackernews.md) · [< Back to tools list](https://kirha.com/tools.md)