# DopamineDesk Hacker News Top Stories API

> DopamineDesk Hacker News Top Stories API is a paid API for AI agents from ai-data-marketplace-1042299154756.us-central1.run.app, paid per call via x402, $0.02/call, status unknown (last checked 2026-09-15).

Returns the current top stories from Hacker News, including title, URL, author, points, and comment count.

## Facts

- Endpoint: GET https://ai-data-marketplace-1042299154756.us-central1.run.app/api/v1/hacker_news_top
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/dopaminedesk-hacker-news-top-stories-api-63c2d250
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_p_wlg3hRoQrSjRL6659pE

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 dopaminedesk-hacker-news-top-stories-api-63c2d250
```

Example prompt: Can you grab the top 10 stories from Hacker News right now and show me the titles, links, and how many points each one has?

## When to prefer this

Choose this endpoint when you need live, ranked Hacker News front-page data in a single pay-per-call request without managing your own scraper or API key. It is ideal for agents that need fresh tech-community trending content on demand and want USDC micropayment settlement via x402 on Base rather than subscription billing.

## Known failure modes

- Invalid or out-of-range limit value returns a validation error
- Upstream Hacker News data unavailable may cause empty or partial results
- Network timeout if the upstream feed is slow
- Payment/x402 settlement failure blocks the request before data is returned

## How this service works

Fetch current top-story metadata and discussion links from the official Hacker News Firebase API.

## Output

Returns a JSON array of top Hacker News stories, each containing an integer story ID, title string, URL, author username, integer points score, and integer comment count. The number of stories returned is controlled by the optional `limit` parameter (default 30).

## 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"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "properties": {
      "limit": {
       "type": "integer",
       "description": "Number of stories to return (default 30)."
      }
     },
     "additionalProperties": true
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "success",
      "source",
      "fetched_at",
      "count",
      "data",
      "marketplace_metadata"
     ],
     "properties": {
      "data": {
       "type": "array",
       "items": {
        "type": "string"
       }
      },
      "count": {
       "type": "integer"
      },
      "source": {
       "type": "string"
      },
      "success": {
       "type": "boolean"
      },
      "fetched_at": {
       "type": "string"
      },
      "marketplace_metadata": {
       "type": "object",
       "required": [
        "data_mode",
        "billable",
        "availability",
        "source"
       ],
       "properties": {
        "source": {
         "type": "string"
        },
        "billable": {
         "type": "boolean"
        },
        "data_mode": {
         "type": "string"
        },
        "availability": {
         "type": "string"
        }
       },
       "additionalProperties": true
      }
     },
     "additionalProperties": true
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": [
   "[nested detail omitted from the challenge header; see the full example in /openapi.json]"
  ],
  "count": 2,
  "source": "Hacker News Firebase API",
  "success": true,
  "fetched_at": "2026-08-07T07:32:38.144Z",
  "marketplace_metadata": {
   "source": "Hacker News Firebase API",
   "billable": true,
   "data_mode": "live_source",
   "availability": "operational"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/dopaminedesk-hacker-news-top-stories-api-63c2d250/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from ai-data-marketplace-1042299154756.us-central1.run.app](https://www.zero.xyz/host/ai-data-marketplace-1042299154756.us-central1.run.app/llms.txt)
