Hacker News API

Hacker News Scraper API for Stories, Comments and Search

Read the ranked front page, search stories and comments by relevance or date, walk comment threads and retrieve author profiles. Keep the discussion close to the link that started it.

WHAT YOU CAN BUILD / 05 ENDPOINTS

Put Hacker News data to work.

Find your use case, then explore the request and response.

Search Hacker News

GET/v1/hackernews/search

Build a technology research finder using Hacker News search results for a keyword or topic.

List ranked Hacker News stories

GET/v1/hackernews/stories

Build a ranked reading queue from top, new, best, Ask HN, Show HN or jobs story IDs, then look up selected items with the story endpoint.

Get a Hacker News story

GET/v1/hackernews/story

Build a story preview with its title, destination, author, score and discussion information.

Get a Hacker News story’s comments

GET/v1/hackernews/story/comments

Build a discussion research tool from the comments beneath a Hacker News story.

Get a Hacker News profile

GET/v1/hackernews/profile

Build contributor profile cards using a Hacker News account’s biography and public account information.

HOW IT WORKS

From API key to Hacker News data in four steps.

Run a sample below without a key.

  1. 01

    Get your API key

    Create a free account and copy your key. You start with 100 free credits; no card needed.

  2. 02

    Choose an endpoint

    Pick one of the 5 Hacker News endpoints and add its input, such as a search query.

  3. 03

    Send one request

    Call it with your key in the x-api-key header. ScrapeAtlas reads the public Hacker News data and retries when a read fails.

  4. 04

    Use the JSON

    Get structured JSON with a coverage status. Only successful requests use a credit.

TRY IT HERE / LIVE SAMPLE

Try a sample request.

Try the Hacker News API right here. This sample uses the Search Hacker News endpoint and returns live JSON. No API key needed.

  1. 01
    Choose a sample value

    Start with rust, or change the query field to your own value.

  2. 02
    Select Run sample

    Execute the sample code and see the response in the JSON response tab.

  3. 03
    Build on the result

    Open the full playground to try more parameters and copy code for your app.

Open this endpoint in the playground Request and response fields
LIVE SAMPLE / Search Hacker NewsNo API key needed

Preparing the sample…

// Run this sample here — no API key needed.
const value = "rust";
const url = new URL("/website/demo/hackernews",
  "https://api.scrapeatlas.com");
url.searchParams.set("value", value);

const response = await fetch(url);
const data = await response.json();
console.log(data);
GET/v1/hackernews/search

A live example from our playground. Change the value above, then select Run sample.

CUSTOMER STORIES

What they are saying
about us.

Nigel Yong — Founder, PostOnce

Pay as you go

Start free.
Build at your pace.

One-time credit packs, priced in US dollars. Credits never expire, and there is no monthly commitment.

Free

Try the API with your next idea.

$0No credit card needed

100 free credits

One starter grant per account

Starter

For a new idea or a one-off project.

$19USD / one-time

10,000 credits

$1.90 per 1,000 successful requests

Growth

Save 6.3%

For regular workflows and bigger builds.

$89USD / one-time

50,000 credits

$1.78 per 1,000 successful requests

Enterprise Plan

Want to scrape larger volumes?

Let’s talk about a plan that fits your scale.

Hacker News API

Frequently Asked Questions

Explore the API reference

Hacker News API and scraping

What public data does the Hacker News API return?

Retrieve ranked story IDs, individual items, nested comment discussions, user profiles and search results. Use the endpoints together to build a reading queue, technology research tool or discussion browser.

How do I scrape Hacker News stories and comments?

Read a story by numeric ID to retrieve its title, destination, author and text. Use Story Comments for a nested discussion tree, selecting the depth and number of comments your application wants to retrieve.

Can I retrieve a Hacker News user’s karma and profile?

Use User Profile with the case-sensitive username to retrieve karma, account creation time, about text and submitted-item count. Pair that profile with an author-filtered search to explore the user’s contributions.

Hacker News: ranked stories and topic search

How do I find Show HN and Ask HN stories on Hacker News?

Choose Ask HN or Show HN in Ranked Stories to retrieve the list’s item IDs in order. Use Story Details for the entries you want to read, or Search with content-type tags to research a topic within those submissions.

How do I retrieve top Hacker News stories in ranked order?

Use Ranked Stories and choose top, new, best, Ask HN, Show HN or jobs. The response returns item IDs in source order. Pass the IDs you want to Story Details to retrieve the corresponding content.

Can the Hacker News search API filter by author, date and score?

Yes. Search supports tags for authors and content types, numeric filters for timestamps and counts, relevance or date ordering, and result pages. You can also choose matching attributes and exact-match behavior.

API access and integration

How do I get a ScrapeAtlas API key and authenticate requests?

Create a ScrapeAtlas account and generate an API key in the dashboard. Send the key in the x-api-key request header when calling https://api.scrapeatlas.com. The API playground lets you enter an endpoint’s parameters and inspect its JSON response.

Can I call the scraping API from Python, JavaScript or the CLI?

Yes. Send authenticated HTTP requests from Python, JavaScript or another language that supports HTTP. The endpoint reference includes request examples and response fields. Use the ScrapeAtlas CLI for terminal workflows and pass the returned pagination values when requesting additional result pages.

Can I connect an AI assistant to the ScrapeAtlas MCP server?

Yes. Connect an MCP-compatible assistant to the ScrapeAtlas MCP server to discover and call the public platform tools with your ScrapeAtlas account. The agent reference also gives coding assistants a readable guide to the endpoints and their request schemas.

Make something with it

Ready to build?

Bring social data into your next project.
Start with 100 free credits and see what you can build.

No credit card needed.Building with an AI agent?