Discover/news.ycombinator.com API
live

news.ycombinator.com APInews.ycombinator.com

Access Hacker News stories, comments, user profiles, job posts, and engagement stats via 9 structured endpoints. Search by keyword, filter by timeframe, and paginate results.

Endpoints
9
Updated
10d ago
Try it
Maximum number of stories to return (max 500)
Story category: top, new, best, ask, show
api.parse.bot/scraper/1ad7a614-cdcd-4bd0-87e6-2cc68e58d555/<endpoint>
Ready to send
Fill in the parameters and hit sign in to send to see live response data here.
Use it in your codegrab a free API key at signup
curl -X GET 'https://api.parse.bot/scraper/1ad7a614-cdcd-4bd0-87e6-2cc68e58d555/get_top_posts?limit=3&story_type=top' \
  -H 'X-API-Key: $PARSE_API_KEY'
All endpoints · 9 totalclick to expand

Get stories from Hacker News by category. Returns formatted story data including title, URL, author, points, and comment count. Stories are returned in the same order as the HN front page for the given category.

Input
ParamTypeDescription
limitintegerMaximum number of stories to return (max 500)
story_typestringStory category: top, new, best, ask, show
Response
{
  "type": "object",
  "fields": {
    "posts": "array of story objects with id, title, url, author, points, num_comments, time, time_iso, type, text",
    "total": "integer count of stories returned",
    "story_type": "string category that was queried"
  },
  "sample": {
    "data": {
      "posts": [
        {
          "id": 47965060,
          "url": "https://thereader.mitpress.mit.edu/the-whistleblower-who-uncovered-the-nsas-big-brother-machine/",
          "text": "",
          "time": 1777567260,
          "type": "story",
          "title": "How Mark Klein told the EFF about Room 641A [book excerpt]",
          "author": "the-mitr",
          "points": 495,
          "time_iso": "2026-04-30T16:41:00+00:00",
          "num_comments": 161
        }
      ],
      "total": 1,
      "story_type": "top"
    },
    "status": "success"
  }
}

About the news.ycombinator.com API

This API exposes 9 endpoints covering Hacker News stories, comments, user profiles, and job listings. The get_top_posts endpoint returns front-page stories across five categories (top, new, best, ask, show) with fields like points, num_comments, author, and time_iso. Other endpoints cover full comment threads, keyword search with timeframe filtering, per-post engagement statistics, and a breakdown of every commenter on a given thread.

Stories and Search

get_top_posts accepts a story_type parameter (top, new, best, ask, show) and returns up to 500 stories in front-page order. Each story object includes id, title, url, author, points, num_comments, time, time_iso, type, and text. search_posts adds keyword search via a query parameter, with optional sort_by (relevance or date), a timeframe filter (e.g. last_7d, last_30d), and 0-indexed pagination returning total_hits and total_pages.

Comments and Commenters

get_post_comments retrieves nested comment threads for a given post_id, returning each comment with id, author, text, time_iso, depth, and recursive children. The response includes total_comments and comments_returned to distinguish thread size from the returned slice. get_comment_details offers a flat, paginated view of the same thread with per-comment parent_id and story_id fields, filterable by author and sortable by newest, oldest, or relevance. get_post_commenters aggregates comment activity per user, returning comment_count, total_replies_received, and the full text of each comment for up to 100 distinct commenters.

Users and Jobs

get_user_info returns a user's karma, about text (may contain HTML), created Unix timestamp, created_iso, and total_submissions. get_job_posts returns up to 200 job listings in reverse chronological order, each with id, title, url, author, time, time_iso, text, and type.

Trending and Stats

get_trending returns stories sorted by points within a chosen timeframe, with optional filtering by domain or topic keyword. The response includes a domain_distribution map showing how many stories came from each domain. get_post_stats computes max, min, median, mean, stdev, and total for both points and comments across up to 500 posts, and surfaces top_by_points and top_by_comments arrays of 10 stories each.

Common use cases
  • Track which domains appear most frequently on HN's front page using domain_distribution from get_trending.
  • Build a keyword alert system by polling search_posts with a fixed query and timeframe of last_24h.
  • Identify the most active commenters in a thread using get_post_commenters for community analysis.
  • Pull current tech job listings from get_job_posts to aggregate with other hiring sources.
  • Benchmark a story's performance against front-page norms using get_post_stats for points and comment distributions.
  • Retrieve a user's karma, account age, and total_submissions to qualify HN accounts by seniority.
  • Extract nested comment trees from get_post_comments for NLP or sentiment analysis pipelines.
Pricing & limitsSee full pricing →
TierPriceCredits/monthRate limit
Free$0/mo1005 req/min
Hobby$30/mo1,00020 req/min
Developer$100/mo5,000250 req/min

One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.

Frequently asked questions
Does Hacker News have an official developer API?+
Yes. Hacker News maintains an official public API documented at https://github.com/HackerNews/API, built on Firebase. It provides item, user, and live-update endpoints but has no search, filtering, or aggregation capabilities. This Parse API adds search, pagination, timeframe filtering, and computed stats on top of that foundation.
What does `get_post_stats` actually compute, and when does it use a timeframe vs. a story category?+
get_post_stats calculates max, min, median, mean, stdev, and total for both points and comments across the posts analyzed. When a timeframe parameter is supplied (e.g. last_7d), the story_type field in the response is set to 'search' and stories are pulled from that time window rather than a live category feed. Without a timeframe, it pulls from the specified story_type category.
Does `search_posts` return full story text for Ask HN or Show HN posts?+
Yes. Each result object includes a text field that carries the body text for Ask HN, Show HN, and other self-post types. Link submissions typically return an empty or null text with a populated url instead.
Can the API return a user's comment history or submission list?+
get_user_info returns aggregate profile data — karma, about, account creation date, and total_submissions count — but does not return a list of individual submissions or comments. You can fork this API on Parse and revise it to add an endpoint that queries submission or comment history by username.
Are there any known limitations with narrow timeframe and domain filters in `get_trending`?+
Yes. The endpoint documentation explicitly notes that narrow timeframes combined with specific domain filters may return empty results when no matching stories exist in that window. For reliable results, use broader timeframes like last_7d or last_30d when filtering by domain.
Page content last updated . Spec covers 9 endpoints from news.ycombinator.com.
Related APIs in News MediaSee all →
arxiv.org API
Search and discover academic research papers on arXiv using keywords, authors, titles, categories, and dates, then access detailed metadata for any paper. Browse the complete arXiv category taxonomy to explore research across different scientific disciplines.
ieeexplore.ieee.org API
Search for scientific papers and retrieve their metadata, abstracts, references, and citations from IEEE Xplore's collection of journals and conferences. Look up author profiles, browse journals, and access paper details and full text sections all programmatically.
bwfbadminton.com API
Track badminton tournaments worldwide by browsing the BWF calendar, viewing tournament draw brackets, and retrieving detailed match results with player stats and scores. Stay updated on competitions and analyze matchups with comprehensive tournament data from the Badminton World Federation.
formula1.com API
Get comprehensive Formula 1 data including race results, qualifying sessions, practice sessions, pit stops, and driver/team standings from 1950 to present. Track live race schedules, fastest laps, starting grids, and historical world champions to stay updated on all F1 season information.
nfl.com API
Access real-time NFL data including game schedules, scores, player statistics, team rosters, standings, injury reports, fantasy rankings, and the latest news — all from nfl.com.
mwcbarcelona.com API
Discover and explore MWC Barcelona 2026 exhibitors, speakers, and sessions by searching, filtering, and browsing by category, location, or type. Access detailed information about pavilions, agenda schedules, news updates, and pass options to plan your conference experience.
morningstar.com.au API
Access comprehensive financial data for Australian stocks, ETFs, and managed funds including key metrics, valuations, dividends, and historical prices. Search securities, review company profiles and ownership details, and stay informed with market news and upcoming dividend information.
guba.eastmoney.com API
Access Chinese stock discussion posts and comments from Eastmoney's community platform to monitor investor sentiment, search board discussions, and retrieve detailed post information and stock board metadata. Get real-time insights into what traders are discussing about specific stocks through posts, replies, and board analytics.