Hacker News API NODE Client Example

Run your first Hacker News API call in node — copy, paste, done.

Free live snapshot — no key, no signup: GET /v1/snapshot?query=openai

node example

const res = await fetch("https://s-hn.pixharvest.com/v1/snapshot", { headers: { Authorization: "Bearer YOUR_KEY" } });
const data = await res.json();
console.log(data);

Next steps

  1. Try the free snapshot above — no key needed.
  2. Add a key for paid endpoints: get one here.
  3. Agents: settle paid calls via x402 USDC on Base — see auth & payment.

← All docs · Live demo · Pricing · Auth & payment