Marketplace/News & Media/news.ycombinator.com
ready-made APIby Olivia Suzuki

Hacker News Stories & Search

news.ycombinator.com

Read Hacker News top stories by category, search stories by keyword and timeframe, and browse job posts, user profiles, nested comment threads and commenter breakdowns, plus engagement stats and trending stories.

Writ CloudRESTMCPwebhookschedule2 credits / call

No website sign-in or persona needed. Free to install. Try any function below with your own values, no account: 10 free credits a day per device. Cloud calls after that use your own credits. Pricing →

The name news.ycombinator.com belongs to its owner. This API is not affiliated with, endorsed by or sponsored by news.ycombinator.com. You are responsible for how you use it.

A recorded call and its answer

get_top_posts(story_type: "top", limit: 3)
StoryPoints
Three new discoveries in mathematics, computer science, and physics557
The Exponential Time Hypothesis Is False [pdf]357
Sebastian Raschka's from-scratch video course on building reasoning models585
Recorded run #24398 · Oct 27, 2026 · fixed example
01 · Functions9 functions

The form is the docs.

Choose a function, fill in its inputs, and run it: the answer comes back from the live site, with your values. Without an account you get 10 free credits a day per device for this; install the listing in Writ to keep calling it.

9 functionschoose one to explore
01get_top_postsGet stories from Hacker News by category. Returns formatted story data including title, URL, domain, author, points, and comment count. Each post's domain is the hostname of its URL with a leading 'www.' removed, and is null for text-only posts (e.g. Ask HN) that have no URL. Stories are returned in the same order as the HN front page for the given category. One request per story is made, so cost grows with limit.02search_postsSearch Hacker News stories by keyword with optional timeframe filtering. Supports relevance and date sorting, with pagination. Uses Algolia search API.03get_job_postsGet current job postings from Hacker News. Returns jobs in reverse chronological order.04get_user_infoGet a Hacker News user's profile including karma, about text, account creation date, and total submissions count.05get_post_commentsGet nested comment threads for a specific Hacker News post. Returns recursively nested comments with author, text, and depth. Uses Algolia items API.06get_post_statsCompute engagement statistics (points and comments) for a set of stories. Returns max, min, median, mean, stdev, and top stories by points and comments. Uses Algolia search sorted by relevance.07get_trendingGet trending/popular stories within a timeframe, optionally filtered by domain or topic keyword. Returns stories sorted by points with domain distribution. Narrow timeframes with specific domains may return empty results when no matching stories exist in that window.08get_comment_detailsGet comments for a post as a flat, paginated list with filtering and sorting. Filter by specific author to see all their comments on a post. Supports sorting by newest, oldest, or relevance. Uses Algolia search API for paginated flat comment listing.09get_post_commentersGet a breakdown of all commenters on a post: who commented, how many times each person commented, total replies they received, and the full text of each of their comments. Commenters are sorted by comment count (most active first). Uses Algolia items API for full nested comment tree.
When a call does not work
No key · GET

AI assistants and tools that can only open a URL can call it with no key: one URL per function, its inputs in the query string. Each call spends the free keyless allowance, 10 credits a day per IP address.

GET https://api.usewrit.app/api/marketplace/listings/hacker-news-stories-search/run?function_name=get_top_posts&limit=30&story_type=topGET https://api.usewrit.app/api/marketplace/listings/hacker-news-stories-search/run?function_name=search_posts&page=0&limit=20&query=<query>&sort_by=relevanceGET https://api.usewrit.app/api/marketplace/listings/hacker-news-stories-search/run?function_name=get_job_posts&limit=30GET https://api.usewrit.app/api/marketplace/listings/hacker-news-stories-search/run?function_name=get_user_info&username=<username>GET https://api.usewrit.app/api/marketplace/listings/hacker-news-stories-search/run?function_name=get_post_comments&limit=10&post_id=<post_id>GET https://api.usewrit.app/api/marketplace/listings/hacker-news-stories-search/run?function_name=get_post_stats&limit=100&story_type=topGET https://api.usewrit.app/api/marketplace/listings/hacker-news-stories-search/run?function_name=get_trending&limit=20&timeframe=last_7dGET https://api.usewrit.app/api/marketplace/listings/hacker-news-stories-search/run?function_name=get_comment_details&page=0&limit=30&post_id=<post_id>&sort_by=newestGET https://api.usewrit.app/api/marketplace/listings/hacker-news-stories-search/run?function_name=get_post_commenters&limit=20&post_id=<post_id>
02 · Checks and timingsmeasured per function

Built to be called again.

Every function was called on the live site before this API was published, and keeps being measured. The numbers are the listing’s own.

0.30 stypical callmedian of 1 function
1measured runsacross 9 functions
—daily checks passedchecks start with the first install
—buyer runs succeededno counted buyer runs yet
functionmedian · 95th percentilemedianruns
get_top_posts 0.30 s 1
search_posts Not measured —
get_job_posts Not measured —
get_user_info Not measured —
get_post_comments Not measured —
get_post_stats Not measured —
get_trending Not measured —
get_comment_details Not measured —
get_post_commenters Not measured —
Checked daily No daily check results published yet. Checks begin with the first install; no pass rate is claimed.
Repaired when it breaks A function that fails its check is re-tested and rebuilt. Installed copies receive the update; you redeploy nothing.
Buyer runs counted No counted buyer runs published yet; uptime counts real buyers’ runs only. Writ service status →

Historical measurements from the public listing, refreshed Dec 4, 2026. Timing samples are not an uptime claim or a guarantee for your next call.

03 · Your copyyour account

Install your copy. Call it your way.

2 credits
Priced per cloud call.

The listing’s base price is 2 credits per call. Longer runs, residential traffic and CAPTCHA solving can add usage. A site or Writ failure is free; your own input or login failures can be billable. Full usage rates →

cloud
No computer to keep running.

Marketplace copies execute in Writ Cloud, in your own account. Requirements and prices are checked before you use the listing.

REST · MCP
Every way to call it, at once.

Use your API key, connect an assistant, set a schedule with email or webhook delivery, or export answers as a dataset.

read-only
It only reads.

The published functions read data from the source website. No website sign-in or persona is needed for this listing.

private copy
Your account, your usage.

Your installed copy belongs to your account. Its underlying recipe stays sealed with its creator; no creator credentials are included.

04 · Or build your ownwebsite → API

Missing a function? Describe it.

Give Writ a website and say what you want. It builds and tests the API for your task.

On your computeryour machine

Build it in Writ Desktop and run it from your own IP. Execution on your machine costs 0 credits.

Get Writ Desktop →
In Writ Cloudcloud

Keep your API online without leaving your computer running. Cloud calls start at 2 credits, or 20 with a browser.

Build an API →
05 · More ready-madeAll APIs →
06 · Questions
Does news.ycombinator.com have an API?
This page is an independent API and MCP server for news.ycombinator.com: Writ built it on the site’s public pages and tests it, and it has 9 functions you can call today. It is not an official news.ycombinator.com product. For an official API, check news.ycombinator.com’s own developer pages.
How do I use the news.ycombinator.com API from Claude, ChatGPT or Cursor?
Install it in Writ, then add Writ’s MCP server (https://api.usewrit.app/mcp) to Claude, ChatGPT, Cursor or any MCP client: your assistant can run this API’s functions and read the results. From your own code, call the same functions over REST with a Writ API key.
How much does a call to the news.ycombinator.com API cost?
2 credits per call, charged only when the call succeeds. New accounts start with 1,000 free credits, then 500 a month on the Free plan, no card.