# Hacker News Engagement & Sentiment Lookup

> Hacker News Engagement & Sentiment Lookup is a paid API for AI agents from api.agentstools.dev, paid per call via x402, $0.003/call, status unknown (last checked 2026-10-13).

Returns HN engagement metrics (story count, total/avg points and comments) and top stories for a given search query and optional time window, powered by the HN Algolia search API.

## Facts

- Endpoint: GET https://api.agentstools.dev/dev/hn?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/hacker-news-engagement-sentiment-lookup-aa69363e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_qJBQjM4YXOQV-YM9iHw_6

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 hacker-news-engagement-sentiment-lookup-aa69363e
```

Example prompt: How much traction does 'htmx' have on Hacker News over the past 180 days — story count, average points, and the top posts?

## When to prefer this

Use this endpoint when you need quantified Hacker News engagement data (story counts, points, comments) and a curated list of top stories for a project or technology — especially for developer sentiment research, competitive analysis, or validating community interest. Prefer this over generic web search when you specifically want HN community metrics aggregated and ready to use, without needing to call the Algolia API directly or parse raw results yourself.

## Known failure modes

- Empty results if the query matches no HN stories in the time window
- HN Algolia API upstream timeout or rate limit causing a 5xx response
- Invalid or missing 'query' parameter causing a 400/422 validation error
- Extremely broad queries may return aggregates with low signal value
- 'days' value out of range (must be 1–3650) causing validation failure

## How this service works

Hacker News engagement / dev-sentiment for a project or topic: story count, total & average points and comments, and the top stories (title/url/points/comments/date). From the keyless HN Algolia search API.

## Output

Returns an aggregated summary including total story count, total and average points, total and average comments, and a ranked list of top HN stories (each with title, URL, points, comment count, and publication date) matching the query within the specified time window.

## 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"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "query"
     ],
     "properties": {
      "days": {
       "type": "integer",
       "maximum": 3650,
       "minimum": 1,
       "description": "Look-back window in days (default 365)"
      },
      "query": {
       "type": "string",
       "description": "Free-text search query (project/topic name)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/hacker-news-engagement-sentiment-lookup-aa69363e/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.agentstools.dev](https://www.zero.xyz/host/api.agentstools.dev/llms.txt)
