# 2s.io Hacker News Item Lookup

> 2s.io Hacker News Item Lookup is a paid API for AI agents from 2s.io, paid per call via x402, $0.0012/call, status unknown (last checked 2026-09-15).

Fetches a single Hacker News item (story, comment, job, or poll) by its numeric ID, returning full metadata including author, score, timestamps, and URLs.

## Facts

- Endpoint: GET https://2s.io/api/news/hn-item
- Price: $0.0012/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/2s-io-a492b848
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_5L0msaH2xDa314Mu2hDPw

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability 2s-io-a492b848
```

Example prompt: Can you pull up the Hacker News item with ID 38975234 and tell me the title, score, author, and how many comments it has?

## When to prefer this

Use this endpoint when you have a specific Hacker News item ID and need full structured metadata about that single item — story, comment, job, or poll. Prefer this over scraping news.ycombinator.com directly, as it returns clean parsed JSON with normalized timestamps and canonical URLs. Best for agent workflows that already have an HN item ID from a search or link and need to resolve its full details.

## Known failure modes

- Item ID not found or does not exist — returns 404 or empty result
- Invalid or non-integer ID — returns 400 validation error
- Deleted or dead items may return with dead/deleted flags set and minimal fields
- Payment failure via x402 protocol — item not returned until payment resolves
- HN API upstream outage — service may return 5xx or timeout

## How this service works

Fetch a specific Hacker News item (story, comment, job, poll) by its numeric ID. Returns id, type, author, time (unix + ISO), title, URL, text, score, descendant count, kid count, parent (for comments), dead/deleted flags, canonical news.ycombinator.com URL.

## Output

Returns a JSON object with the HN item's id, type (story/comment/job/poll), author username, unix timestamp, ISO timestamp, title, external URL, text body, score, descendant (total comment) count, number of direct kids, parent item ID (for comments), dead/deleted flags, and the canonical news.ycombinator.com URL for the item.

## Example request

```json
{
 "input": {
  "type": "http",
  "method": "GET",
  "queryParams": {
   "id": 38975234
  }
 }
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "queryParams"
   ],
   "properties": {
    "type": {
     "const": "http"
    },
    "method": {
     "const": "GET"
    },
    "queryParams": {
     "required": [
      "id"
     ],
     "properties": {
      "id": {
       "type": "integer",
       "description": "HN item id."
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/2s-io-a492b848/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from 2s.io](https://www.zero.xyz/host/2s.io/llms.txt)
