GnistAI GnistAI
Log in

Hacker News

Hacker News stories, comments, and discussions from the tech community.

Overview   |   MCP Docs   |   API Docs   |   OpenAPI   |   Playground   |   Tutorial   |   Toolkits   |   Home
status: healthy status status healthy healthy tools: 5 tools tools 5 5 Software

Data source: Hacker News API

MCP MCP Protocol

Endpoint https://context.gnist.ai/mcp/hn/
claude_desktop_config.json
{
  "mcpServers": {
    "gnist-hn": {
      "url": "https://context.gnist.ai/mcp/hn/",
      "headers": {
        "Gnist-API-Key": "YOUR_API_KEY"
      }
    }
  }
}
Shell
curl -X POST "https://context.gnist.ai/mcp/hn/" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -H "Gnist-API-Key: YOUR_API_KEY" \
  -d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "search_hn_discussions", "arguments": {"query": "example"}}}'

API REST API

API Root https://context.gnist.ai/rest/hn/

5 endpoints available:

Shell
curl "https://context.gnist.ai/rest/hn/search_hn_discussions?query=example" \
  -H "Gnist-API-Key: YOUR_API_KEY"
Python
import httpx

resp = httpx.get(
    "https://context.gnist.ai/rest/hn/search_hn_discussions",
    headers={"Gnist-API-Key": "YOUR_API_KEY"},
    params={
        "query": "example"
},
)
print(resp.json())

OpenAPI Spec  ·  Full API Docs

CLI Command Line

Command gc hn

CLI documentation will be available when the GnistAI SDK is published.

Install
pip install gnistai

Available Tools (5)

search_hn_discussions
Full-text search over Hacker News stories.
ParameterTypeRequiredDescription
querystringrequiredSearch terms.
date_fromanyoptionalFilter results after this date — YYYY-MM-DD or YYYY-MM-DDTHH:MM:SS (UTC).
date_toanyoptionalFilter results before this date — YYYY-MM-DD or YYYY-MM-DDTHH:MM:SS (UTC).
min_pointsintegeroptionalMinimum points (upvotes) a story must have. Default 0 (no filter). (default: 0)
max_resultsintegeroptionalMaximum stories to return (1–100, default 25). (default: 25)
get_hn_trending
Get top Hacker News stories in a rolling time window, sorted by points.
ParameterTypeRequiredDescription
hours_agointegeroptionalHow far back to look (1–168 hours, default 24). (default: 24)
min_pointsintegeroptionalMinimum points threshold (default 10). (default: 10)
max_resultsintegeroptionalMaximum stories to return (1–100, default 25). (default: 25)
get_hn_story_thread
Fetch a Hacker News story with its top comments.
ParameterTypeRequiredDescription
story_idintegerrequiredThe HN story ID (numeric, from the URL: news.ycombinator.com/item?id=<id>).
max_commentsintegeroptionalMaximum top-level comments to include (default 20). (default: 20)
get_hn_author_activity
Get recent submissions and comments by a Hacker News user.
ParameterTypeRequiredDescription
usernamestringrequiredHN username (case-sensitive).
limitintegeroptionalMaximum stories and comments to return each (default 10). (default: 10)
report_feedback
Report a bug, feature request, or general feedback for this data source.
ParameterTypeRequiredDescription
feedbackstringrequired
feedback_typestringoptional (default: "general")

Related