Discover/Ycombinator API
live

Ycombinator 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.

Endpoint health
verified 4d ago
get_comment_details
get_trending
search_posts
get_user_info
get_post_commenters
9/9 passing latest checkself-healing
Endpoints
9
Updated
14d ago

What is the Ycombinator 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.

Try it
Maximum number of stories to return (max 500)
Story category to fetch
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.
Call it over HTTPgrab a free API key at signup
curl -X GET 'https://api.parse.bot/scraper/1ad7a614-cdcd-4bd0-87e6-2cc68e58d555/get_top_posts?limit=5&story_type=top' \
  -H 'X-API-Key: $PARSE_API_KEY'
Python SDK · recommended

Typed, relational, agent-ready

A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.

  • Fully typed · autocompletes
  • Objects link to objects
  • Typed errors & pagination

Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:

uv add parse-sdk
uv run parse init
uv run parse add --marketplace news-ycombinator-com-api

uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.

"""Walkthrough: Hacker News SDK — bounded, re-runnable; every call capped."""
from parse_apis.Hacker_News_API import HackerNews, StoryType, SearchSort, Timeframe, TrendingTimeframe, CommentSort, ItemNotFound

hn = HackerNews()

# List top stories from the front page
for post in hn.posts.list(story_type=StoryType.TOP, limit=5):
    print(post.title, post.points, post.num_comments)

# Search for posts about "rust" sorted by date in the last week
for post in hn.posts.search(query="rust", sort_by=SearchSort.DATE, timeframe=Timeframe.LAST_7D, limit=5):
    print(post.title, post.author, post.time_iso)

# Trending stories about AI in the last 3 days
for post in hn.posts.trending(domain="AI", timeframe=TrendingTimeframe.LAST_3D, limit=3):
    print(post.title, post.points)

# Look up a user profile with typed error handling
try:
    user = hn.users.get(username="pg")
    print(user.username, user.karma, user.created_iso)
except ItemNotFound as exc:
    print(f"User not found: {exc}")

# Drill into a post's nested comments via sub-resource
post = hn.post(id=48463808)
for comment in post.comments.list(limit=3):
    print(comment.author, comment.text[:80], comment.depth)

# Flat paginated comments filtered by author
for comment in post.flat_comments.list(author="simonw", sort_by=CommentSort.NEWEST, limit=3):
    print(comment.author, comment.time_iso, comment.story_title)

# Compute engagement statistics
engagement = hn.engagements.compute(story_type=StoryType.BEST, timeframe=Timeframe.LAST_30D)
print(engagement.total_posts_analyzed, engagement.stats.points.mean, engagement.stats.comments.median)

print("exercised: posts.list / posts.search / posts.trending / users.get / post.comments.list / post.flat_comments.list / engagements.compute")
All endpoints · 9 totalmissing one? ·

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 to fetch
Response
{
  "type": "object",
  "fields": {
    "posts": "array of Post 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": 48469658,
          "url": "https://github.com/apple/container/blob/main/docs/container-machine.md",
          "text": "",
          "time": 1781051341,
          "type": "story",
          "title": "macOS Container Machines",
          "author": "timsneath",
          "points": 536,
          "time_iso": "2026-06-10T00:29:01+00:00",
          "num_comments": 197
        }
      ],
      "total": 5,
      "story_type": "top"
    },
    "status": "success"
  }
}

About the Ycombinator API

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.

Reliability & maintenanceVerified

The Ycombinator API is a managed, monitored endpoint for news.ycombinator.com — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when news.ycombinator.com changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.

This isn't an official news.ycombinator.com API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.

Last verified
4d ago
Latest check
9/9 endpoints passing
Maintenance
Monitored & self-healing
Will this API break when the source site changes?+
It's built not to. Every endpoint is health-checked on a schedule with automated test probes. When the source site changes and a check fails, the API is automatically queued for repair and re-verified — that's the self-healing layer. Each API page shows when its endpoints were last verified. And because marketplace APIs are shared, any fix reaches everyone using it.
Is this an official API from the source site?+
No — Parse APIs are independent, managed REST wrappers over publicly available data. That is the point: where a site has no official API (or only a limited one), Parse gives you a maintained, monitored endpoint for that data and keeps it working as the site changes — so you get a stable contract over a source that never promised one.
Can I fix or extend this API myself if I need a new endpoint or field?+
Yes — and you don't have to wait on us. This API was generated by the Parse agent, which stays attached. Describe the change in plain English ("add an endpoint that returns reviews", "fix the price field") in the revise box on the API page or via the revise_api MCP tool, and the agent rebuilds it against the live site in minutes. Contributing the change back to the public API is free.
What happens if I call an endpoint that has an issue?+
Errors are machine-readable: a bad call returns a clean status with the list of available endpoints and a repair hint, so an agent (or you) can recover or trigger a fix instead of failing silently. Confirmed failures feed the automatic repair queue.
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,000100 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 →
reddit.com API
Search Reddit posts and comments across any subreddit. Retrieve post discussions with full comment threads, search by keyword, and browse subreddit feeds by category (hot, new, top, rising) with flexible sorting and pagination.
ycombinator.com API
Access comprehensive data from the Y Combinator ecosystem, including company profiles, founder and partner information, job listings, and the YC library. Filter companies by batch, industry, and hiring status, and explore detailed profiles with social links, team information, and funding metadata.
pikabu.ru API
Access trending and fresh content from Pikabu's Russian community platform, including hot posts, best posts, and community-specific stories with their full comment threads. Build applications powered by user profiles and detailed post data from one of Russia's most popular social communities.
toutiao.com API
Browse personalized news feeds, discover trending articles and hot topics, search content across categories, view detailed articles with comments, and explore author profiles on Toutiao. Access video feeds and stay updated with the latest news and trending stories all in one place.
explodingtopics.com API
Discover rapidly growing trends, emerging startups, and top-performing websites by filtering through trending topics by category and volatility. Programmatically access detailed trend analysis, related topics, blog coverage, and curated highlights to stay ahead of market movements.
cbinsights.com API
Access CB Insights data including company and investor profiles, funding history, competitor maps, the unicorn list, and research reports.
sneakernews.com API
Browse the latest sneaker news, search articles by keyword, and look up upcoming release dates — including pricing, images, and retailer links. Also surfaces per-page ad slot inventory and density metrics for programmatic and publisher analysis.
x.com API
Retrieve posts and profile information from X (Twitter) user timelines by specifying a username. Access live post data, engagement metrics, and user profile details for any public account.