Data APIs ยท Hacker News
Hacker News data APIs for AI agents
morigraph has 4 Hacker News data APIs that Claude, ChatGPT, Cursor, Codex or your own code can call, including profile, search, story and story comments. You need no Hacker News developer account or API key, only one morigraph connection. A call costs 0.03 credits, about $3.00 for 1,000 calls, paid from one balance.
- APIs
- 4
- Price
- 0.03 credits a call
- Call it from
- MCP, command line and HTTP API
- Needs
- One morigraph connection. No Hacker News account or API key
Three ways to call it
Every data API is run by one tool, data_api, with the API's id and its arguments. The example is Hacker News Profile.
In your assistant (MCP). Connect once, then ask in plain words
claude mcp add --transport http --scope user morigraph https://morigraph.com/mcp
Use morigraph's Hacker News Profile data API with {"handle":"pg"} and summarise what comes back.From a terminal or script (CLI)
npx @morigraph/cli@latest login
morigraph call data_api --json-args '{"api":"hackernews.profile","input":{"handle":"pg"}}'From your own code (HTTP API)
curl https://api.morigraph.com/v1/tools/data_api \
-H "Authorization: Bearer $MORIGRAPH_API_KEY" \
-H "Content-Type: application/json" \
-d '{"api":"hackernews.profile","input":{"handle":"pg"}}'4 Hacker News data APIs
| API | Id | Price |
|---|---|---|
| Hacker News Profile | hackernews.profile | 0.03 credits a call |
| Hacker News Search | hackernews.search | 0.03 credits a call |
| Hacker News Story | hackernews.story | 0.03 credits a call |
| Hacker News Story Comments | hackernews.story_comments | 0.03 credits a call |
Hacker News Profile
Get a Hacker News user's public profile by username - karma, bio, and account details as clean JSON.
| Argument | Type | Required | What it is |
|---|---|---|---|
handle | string | yes | Hacker News username, e.g. "pg". |
Returns bio karma username
The call
data_api({"api":"hackernews.profile","input":{"handle":"pg"}})Hacker News Search
Search Hacker News by keyword - matching stories with title, link, author, points, and comment count as clean JSON.
| Argument | Type | Required | What it is |
|---|---|---|---|
query | string | yes | Search keyword, e.g. "ai". |
tags | string | no | Optional result filter, e.g. "story" or "comment". |
Returns author comments createdUtc id permalink points results title url
The call
data_api({"api":"hackernews.search","input":{"query":"ai"}})Hacker News Story
Get a Hacker News story by id - title, link, author, points, and comment count as clean JSON.
| Argument | Type | Required | What it is |
|---|---|---|---|
id | string | yes | Hacker News story id, e.g. "47340079". |
Returns author comments createdUtc id permalink points title url
The call
data_api({"api":"hackernews.story","input":{"id":"47340079"}})Hacker News Story Comments
List the comments on a Hacker News story by id - text, author, and timestamp as clean JSON.
| Argument | Type | Required | What it is |
|---|---|---|---|
id | string | yes | Hacker News story id, e.g. "47340079". |
Returns author comments createdUtc id parentId permalink postId text
The call
data_api({"api":"hackernews.story_comments","input":{"id":"47340079"}})Good to know
- The price shown is the usual one. A call can cost more when the first source fails and another serves it; the most it can cost is shown beside each API, and
max_creditssets your own limit. - These APIs return public data. What you may do with it depends on the platform's terms and the privacy law where you operate, and that responsibility is yours.
- A failed call is not charged.
When to choose something else
Choose a provider that specialises in Hacker News data when you need it at high volume, on a schedule, or as bulk exports: you will get volume pricing and more control. Choose the platform's official API when you need data from your own account. These APIs are for an agent that needs an answer now, alongside other tools on the same balance.
Questions
Do I need a Hacker News API key or developer account?
No. morigraph supplies the access. You connect morigraph once to your assistant, or use one morigraph API key from your own code, and call any of the 4 APIs on this page.
What does Hacker News data cost through morigraph?
0.03 credits a call, where a credit is about 10 cents. That is from about $3.00 for 1,000 calls. You pay per call from one balance, with no separate subscription.
Can Claude, ChatGPT or Cursor get Hacker News data?
Yes. Add morigraph as an MCP server, sign in once, then ask in plain words. Your assistant finds the right API with one search and runs it with one call.
Which Hacker News data APIs are available?
Hacker News Profile, Hacker News Search, Hacker News Story and Hacker News Story Comments.
Prices and availability read from the production service on . A credit is about 10 cents of tool use; see pricing. Your assistant can quote the exact cost before a paid call.