morigraph Start free

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

APIIdPrice
Hacker News Profilehackernews.profile0.03 credits a call
Hacker News Searchhackernews.search0.03 credits a call
Hacker News Storyhackernews.story0.03 credits a call
Hacker News Story Commentshackernews.story_comments0.03 credits a call

Hacker News Profile

hackernews.profile0.03 credits a call (about $3.00 for 1,000)

Get a Hacker News user's public profile by username - karma, bio, and account details as clean JSON.

ArgumentTypeRequiredWhat it is
handlestringyesHacker News username, e.g. "pg".

Returns bio karma username

The call

data_api({"api":"hackernews.profile","input":{"handle":"pg"}})

Hacker News Story

hackernews.story0.03 credits a call (about $3.00 for 1,000)

Get a Hacker News story by id - title, link, author, points, and comment count as clean JSON.

ArgumentTypeRequiredWhat it is
idstringyesHacker 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

hackernews.story_comments0.03 credits a call (about $3.00 for 1,000), at most 0.064

List the comments on a Hacker News story by id - text, author, and timestamp as clean JSON.

ArgumentTypeRequiredWhat it is
idstringyesHacker 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

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.