---
title: "Does Hacker News have an API?"
description: "The official Hacker News API: base URL, endpoints, limits, and how to search stories and comments."
canonical_url: https://groundsocial.dev/answers/does-hacker-news-have-an-api
---
# Does Hacker News have an API?

> The official Hacker News API: base URL, endpoints, limits, and how to search stories and comments.

_Updated 2026-11-27._

> **Short answer** Yes, an official, free one on Firebase at hacker-news.firebaseio.com/v0, with no key and, in its own words, “currently no rate limit”. It serves items, users and the top, new, best, Ask, Show and job lists, but not search.

- `/v0/item/<id>.json` for a story or comment, `/v0/user/<id>.json` for a user.
- `/v0/topstories`, `newstories`, `beststories`, `askstories`, `showstories`, `jobstories`, plus `maxitem` and `updates`.
- A story gives comment ids, not the thread: you fetch each comment yourself.

## How to do it with Groundsocial

If you need search or whole threads in one call, Groundsocial has full-text story search and a story’s complete comment tree at 1 credit each.

cURL:

```bash
curl "https://api.groundsocial.dev/v1/hackernews/search?q=sqlite&sort=date&hitsPerPage=50" \
  -H "Authorization: Bearer $GROUNDSOCIAL_API_KEY"
```

TypeScript:

```ts
const res = await fetch('https://api.groundsocial.dev/v1/hackernews/search?q=sqlite&sort=date&hitsPerPage=50', {
  headers: { Authorization: `Bearer ${process.env.GROUNDSOCIAL_API_KEY}` },
})
if (!res.ok) throw new Error((await res.json()).error.hint)
const data = await res.json()
```

Python:

```python
import os, requests

res = requests.get(
    "https://api.groundsocial.dev/v1/hackernews/search?q=sqlite&sort=date&hitsPerPage=50",
    headers={"Authorization": f"Bearer {os.environ['GROUNDSOCIAL_API_KEY']}"},
)
res.raise_for_status()
data = res.json()
```

| Endpoint | Route | Credits |
| --- | --- | --- |
| [Hacker News search API](https://groundsocial.dev/endpoints/hacker-news-search-api) | `/v1/hackernews/search` | 1 |
| [Hacker News comments API](https://groundsocial.dev/endpoints/hacker-news-comments-api) | `/v1/hackernews/items/{id}/comments` | 1 |
| [Hacker News front page API](https://groundsocial.dev/endpoints/hacker-news-front-page-api) | `/v1/hackernews/stories` | 1 |

## More questions

### Is the HN API free for commercial use?

The API page states no fee and no key. Read Y Combinator’s terms for your use.

## Related

- [Market research API](https://groundsocial.dev/use-cases/market-research-api)

## Sources

- [Hacker News API (GitHub)](https://github.com/HackerNews/API)

Checked 27 Nov 2026. Follow the links for the latest.

Hacker News is a trademark of Y Combinator. We are not affiliated with or endorsed by Y Combinator.

_Canonical HTML: https://groundsocial.dev/answers/does-hacker-news-have-an-api_

## Site Navigation

### Global Hub
- [Home](https://groundsocial.dev/index.md)
- [Pricing](https://groundsocial.dev/pricing.md)
- [Endpoints](https://groundsocial.dev/endpoints.md)
- [For agents](https://groundsocial.dev/agents.md)
- [Docs](https://groundsocial.dev/docs.md)
- [Compare](https://groundsocial.dev/compare.md)
- [Blog](https://groundsocial.dev/blog.md)
- [Tutorials](https://groundsocial.dev/tutorials.md)
- [Changelog](https://groundsocial.dev/changelog.md)
- [llms.txt](https://groundsocial.dev/llms.txt)
- [Agent skill](https://groundsocial.dev/SKILL.md)

### On This Topic
- [Groundsocial: Social data in one API call](https://groundsocial.dev/index.md)
- [Pricing](https://groundsocial.dev/pricing.md)
- [Playground](https://groundsocial.dev/playground.md)
- [Use cases](https://groundsocial.dev/use-cases.md)
- [Brand monitoring API](https://groundsocial.dev/use-cases/brand-monitoring-api.md)
- [Social listening API](https://groundsocial.dev/use-cases/social-listening-api.md)
- [Comment scraping API](https://groundsocial.dev/use-cases/comment-scraping-api.md)
- [Influencer discovery API](https://groundsocial.dev/use-cases/influencer-discovery-api.md)
- [Video transcript API](https://groundsocial.dev/use-cases/video-transcript-api.md)
- [Ad library API](https://groundsocial.dev/use-cases/ad-library-api.md)
- [Review monitoring API](https://groundsocial.dev/use-cases/review-monitoring-api.md)
- [Trend detection API](https://groundsocial.dev/use-cases/trend-detection-api.md)
- [Social lead generation API](https://groundsocial.dev/use-cases/lead-generation-api.md)
- [Market research API](https://groundsocial.dev/use-cases/market-research-api.md)

## Structured data

```json
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://groundsocial.dev/"},{"@type":"ListItem","position":2,"name":"Answers","item":"https://groundsocial.dev/answers"},{"@type":"ListItem","position":3,"name":"Does Hacker News have an API?","item":"https://groundsocial.dev/answers/does-hacker-news-have-an-api"}]}
```
