{"openapi":"3.0.3","info":{"title":"Gnist Context — Hacker News","description":"Hacker News stories, comments, and discussions from the tech community.\n\n- **MCP endpoint:** `https://context.gnist.ai/mcp/hn/`\n- **Toolkit page:** `/toolkits/hn`\n- **Full API spec:** `/api/openapi.json`\n- **Get an API key:** `/signup`","version":"1.0.0","contact":{"name":"GnistAI","url":"https://gnist.ai"}},"servers":[{"url":"https://context.gnist.ai","description":"Production"}],"paths":{"/rest/hn/search_hn_discussions":{"post":{"tags":["Software"],"summary":"search_hn_discussions","description":"Full-text search over Hacker News stories.\n\nSearches the complete HN archive via the Algolia search index. Results are sorted by relevance.\n\nArgs:\n    query: Search terms.\n    date_from: Filter results after this date — YYYY-MM-DD or YYYY-MM-DDTHH:MM:SS (UTC).\n    date_to: Filter results before this date — YYYY-MM-DD or YYYY-MM-DDTHH:MM:SS (UTC).\n    min_points: Minimum points (upvotes) a story must have. Default 0 (no filter).\n    max_results: Maximum stories to return (1–100, default 25).\n\nReturns:\n    Dictionary with 'count' and 'stories' list. Each story has title, url, author,\n    points, num_comments, created_at, and hn_url.","operationId":"hn_search_hn_discussions","responses":{"200":{"description":"Successful tool call","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"Server or tool not found"},"500":{"description":"Tool execution error"}},"security":[{"ApiKeyHeader":[]},{"ApiKeyQuery":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"query":{"description":"Search terms.","type":"string"},"date_from":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Filter results after this date — YYYY-MM-DD or YYYY-MM-DDTHH:MM:SS (UTC)."},"date_to":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Filter results before this date — YYYY-MM-DD or YYYY-MM-DDTHH:MM:SS (UTC)."},"min_points":{"default":0,"description":"Minimum points (upvotes) a story must have. Default 0 (no filter).","type":"integer"},"max_results":{"default":25,"description":"Maximum stories to return (1–100, default 25).","type":"integer"}},"required":["query"],"type":"object"}}}}}},"/rest/hn/get_hn_trending":{"post":{"tags":["Software"],"summary":"get_hn_trending","description":"Get top Hacker News stories in a rolling time window, sorted by points.\n\nArgs:\n    hours_ago: How far back to look (1–168 hours, default 24).\n    min_points: Minimum points threshold (default 10).\n    max_results: Maximum stories to return (1–100, default 25).\n\nReturns:\n    Dictionary with 'count' and 'stories' list sorted by points descending.","operationId":"hn_get_hn_trending","responses":{"200":{"description":"Successful tool call","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"Server or tool not found"},"500":{"description":"Tool execution error"}},"security":[{"ApiKeyHeader":[]},{"ApiKeyQuery":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"hours_ago":{"default":24,"description":"How far back to look (1–168 hours, default 24).","type":"integer"},"min_points":{"default":10,"description":"Minimum points threshold (default 10).","type":"integer"},"max_results":{"default":25,"description":"Maximum stories to return (1–100, default 25).","type":"integer"}},"type":"object"}}}}}},"/rest/hn/get_hn_story_thread":{"post":{"tags":["Software"],"summary":"get_hn_story_thread","description":"Fetch a Hacker News story with its top comments.\n\nArgs:\n    story_id: The HN story ID (numeric, from the URL: news.ycombinator.com/item?id=<id>).\n    max_comments: Maximum top-level comments to include (default 20).\n\nReturns:\n    Story metadata plus a list of top comments sorted by score, each\n    with text, author, points, and nested replies.","operationId":"hn_get_hn_story_thread","responses":{"200":{"description":"Successful tool call","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"Server or tool not found"},"500":{"description":"Tool execution error"}},"security":[{"ApiKeyHeader":[]},{"ApiKeyQuery":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"story_id":{"description":"The HN story ID (numeric, from the URL: news.ycombinator.com/item?id=<id>).","type":"integer"},"max_comments":{"default":20,"description":"Maximum top-level comments to include (default 20).","type":"integer"}},"required":["story_id"],"type":"object"}}}}}},"/rest/hn/get_hn_author_activity":{"post":{"tags":["Software"],"summary":"get_hn_author_activity","description":"Get recent submissions and comments by a Hacker News user.\n\nArgs:\n    username: HN username (case-sensitive).\n    limit: Maximum stories and comments to return each (default 10).\n\nReturns:\n    User profile (username, karma, created_at) with lists of recent\n    stories and comments.","operationId":"hn_get_hn_author_activity","responses":{"200":{"description":"Successful tool call","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"Server or tool not found"},"500":{"description":"Tool execution error"}},"security":[{"ApiKeyHeader":[]},{"ApiKeyQuery":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"username":{"description":"HN username (case-sensitive).","type":"string"},"limit":{"default":10,"description":"Maximum stories and comments to return each (default 10).","type":"integer"}},"required":["username"],"type":"object"}}}}}},"/rest/hn/report_feedback":{"post":{"tags":["Software"],"summary":"report_feedback","description":"Report a bug, feature request, or general feedback for this data source.\n\nUse this when something doesn't work as expected, when you'd like\na new feature, or when you have suggestions for improvement.\n\nArgs:\n    feedback: Describe the issue or suggestion.\n    feedback_type: One of 'bug', 'feature_request', or 'general'.","operationId":"hn_report_feedback","responses":{"200":{"description":"Successful tool call","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"Server or tool not found"},"500":{"description":"Tool execution error"}},"security":[{"ApiKeyHeader":[]},{"ApiKeyQuery":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"feedback":{"type":"string"},"feedback_type":{"default":"general","type":"string"}},"required":["feedback"],"type":"object"}}}}}}},"tags":[{"name":"Software","description":"Data sources: Software"}],"components":{"securitySchemes":{"ApiKeyHeader":{"type":"apiKey","in":"header","name":"gnist-api-key","description":"API key passed via request header."},"ApiKeyQuery":{"type":"apiKey","in":"query","name":"gnist_api_key","description":"API key passed via query parameter."}}}}