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.

Gibran Pulga, CEO of Desys FinanceGibran PulgaCEO, Desys Finance

We use ScrapeAtlas to gather social sentiment data for our banking partners at a scale we wouldn't have been able to otherwise.

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.

LIVE RESULTS

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.

  • Matteo L.Small-Business (50 or fewer emp.)

    “Easy, Affordable Scraping for Product Ideas—More Platforms Needed”

    I use ScrapeAtlas to find product ideas—real ideas that people need. I couldn’t get to people’s ideas on social media platforms without it. I like that it’s easy and capable, and it isn’t expensive. I value the scraping and MCP features. …

    Read on G2
  • Ms H.Sales, Mid-Market (51-1000 emp.)

    “ScrapeAtlas Replaces Multiple Scrapers with One Simple Solution”

    ScrapeAtlas saves me from juggling a different scraper for every platform. … ScrapeAtlas solves the problem of getting reliable public data from many social and e-commerce platforms without building and maintaining my own scrapers.

    Read on G2
  • We use ScrapeAtlas to gather social sentiment data for our banking partners at a scale we wouldn't have been able to otherwise.

    Gibran PulgaCEO, Desys Finance
  • Stas D.Founder, Marketing and Advertising

    “Reliable parsers and flexible API for audience search”

    I like the convenient documentation and conditions at ScrapeAtlas. The parsers work great: I use keyword data from fresh threads to find target audiences and clients in Threads. I also appreciate the higher quality API responses and more detailed request customization. The initial setup was very easy for me.

    Read on G2

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 credits

Growth

Popular

For regular workflows and bigger builds.

$89USD / one-time

50,000 credits

$1.78 per 1,000 credits

Save 6.3% compared with Starter

Scale

For high-volume data collection.

$249USD / one-time

200,000 credits

$1.25 per 1,000 credits

Save 34.5% compared with Starter

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?