H

Hacker News Data · Fetch

by Hacker News Data

POSTBaseSolana

$0.01

per call · USD Coin on Base

This tool reads live information from Hacker News, a popular website where people share and discuss technology news. You can either ask for a current list of stories (like the Top, New, Best, Ask, Show, or Job lists) or ask for every story, job posting, and poll that was posted on one specific calendar day in the past. You can also choose to pull in the discussion comments underneath each story, including nested replies several levels deep.

Endpoint

POST https://hackernews-data.underscoredone.com/fetch

5

Calls / 30d

4

Unique payers / 30d

Sep 2

Last called

exact

Payment scheme

Call this service

TypeScript · @x402/fetch
import { wrapFetchWithPayment } from "@x402/fetch";
import { privateKeyToAccount } from "viem/accounts";

const account = privateKeyToAccount(process.env.PRIVATE_KEY);
const fetchWithPay = wrapFetchWithPayment(fetch, account);

const res = await fetchWithPay("https://hackernews-data.underscoredone.com/fetch", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    "category": "top",
    "comment_limit": 3,
    "limit": 5,
    "reply_depth": 1
  }),
});
const data = await res.json();
cURL
curl -X POST \
  "https://hackernews-data.underscoredone.com/fetch" \
  -H "Content-Type: application/json" \
  -d '{"category":"top","comment_limit":3,"limit":5,"reply_depth":1}' \
  -H "X-PAYMENT: <signed x402 payment>"

Example response

{
  "api_version": "1.0.0",
  "category": "top",
  "count": 5,
  "date": "",
  "mode": "get_stories",
  "next_page_token": "",
  "range_complete": "",
  "results": [
    {
      "author": "chvid",
      "category": "top",
      "comment_count": 223,
      "comments": [
        {
          "author": "seizethecheese",
          "body": "I'm somewhat surprised that this is not open source...",
          "id": 48752128,
          "posted_at": 1782935074,
          "replies": [],
          "reply_count": 9
        }
      ],
      "id": 48753715,
      "item_type": "story",
      "points": 234,
      "posted_at": 1782943416,
      "title": "ZCode – Harness for GLM-5.2",
      "url": "https://zcode.z.ai/en"
    }
  ],
  "scanned": ""
}

Payment details

Pay to0xe9740820225b3918b4ddd1292c7ca4ca0e2c2f08
AssetUSD Coin · 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913
NetworksBase, Solana
Schemesexact

Is this your API?

Pin it to the top of News & Content and the homepage with a featured placement.

Get featured →

More from Hacker News Data & similar services