{"data":{"billing":{"currency":"USD","mode":"rules","parameters":[{"default":["anonymous-hedgehog"],"id":"selected_source","location":"body","pointer":"/source","required":false,"type":"array"},{"default":false,"id":"allow_fallbacks","location":"body","pointer":"/allowFallbacks","required":false,"type":"boolean"}],"policy_version":2,"sale":{"addons":[],"base_price_micro_usd":"1501","max_cost_micro_usd":"1500","quantities":[],"rounding":"ceil","variants":[{"id":"selected_source_only","label":"指定来源且关闭回退时的原厂基础费","price_micro_usd":"1500","when":[{"op":"eq","parameter":"selected_source","value":["anonymous-hedgehog"]},{"op":"eq","parameter":"allow_fallbacks","value":false}]}]}},"capabilityId":"6272ca67-0020-4a05-87cb-77aea7d38830","catalogType":"api","categories":["social-media","community","news"],"dataPlatform":"hackernews","dataPlatformLogoUrl":"","dataPlatformTranslations":{"ar":"هاكر نيوز","ja":"Hacker News","zh":"Hacker News"},"dataProduct":"general","description":"Get Hacker News Comments data via REST or OpenAny MCP—with pay-per-use pricing and no subscription. Powered by anyapi, pass parameters such as id, and retrieve structured data including comment identifier, comment author's username, comment text, parent item identifier, and associated story identifier to review a launch discussion, build a thread reader, and prepare a topic brief.","descriptionTranslations":{"ar":"اجلب تعليقات قصة في Hacker News عبر OpenAny REST لإدخال نص النقاش في البحث أو القراءة. استخدم معرّفات التعليقات والكتّاب والأوقات ومراجع التعليقات الأصلية لتنظيم الردود وربطها بالنقاش المصدر ومقارنة الموضوعات المتكررة، بينما يتولى تطبيقك عرض النص وإعادة بناء تسلسل الردود عند الحاجة.","ja":"OpenAny REST で Hacker News のストーリーに付いたコメントを取得し、調査や閲覧のワークフローに取り込めます。コメント ID、投稿者、日時、親コメントへの参照を使って返信を整理し、元の議論との対応や共通テーマを確認でき、表示処理と返信階層の再構築はアプリ側で行います。","zh":"通过 OpenAny REST 获取 Hacker News 故事的评论，将讨论正文接入调研或阅读流程。利用评论 ID、作者、时间戳及父级引用整理回复、关联原始讨论并比较反复出现的主题，正文渲染与回复层级重建由应用自行处理。"},"effectContentHtml":"","executionMode":"sync","id":"da1af625-00e5-4b86-9157-c0b656d3434e","includedContentHtml":"","inputs":[{"description":"Optional. Comma-separated keys (dotted paths like `author.name` descend into nested objects) to keep on each result item: each row of the API's result list, or the `data` object itself for an API that returns one record. Keys are matched relative to that item, not against the top-level response envelope, so use `jq` to reshape the whole envelope. Shrinks the response without changing cost.","location":"query","name":"fields","nullable":false,"required":false,"type":"string"},{"description":"Optional. Cap the number of result rows returned; a `_truncated` note reports how many were withheld so you can page via the API's own `limit`. An API that returns one record is not trimmed. Does not change cost.","location":"query","minimum":"0","name":"max_items","nullable":false,"required":false,"type":"integer"},{"description":"Optional. Return only a structural outline (top-level keys, item counts, and per-field byte sizes) instead of the full data. Does not change cost.","location":"query","name":"summary","nullable":false,"required":false,"type":"boolean"},{"description":"Optional. A jq expression applied to the result envelope; its output replaces `output` (multiple outputs collect into an array). Reshape freely, e.g. `jq=.data | {title, description, md: .markdown[:3500]}`. Runs sandboxed with a 250ms / 2MB budget; on failure the full result is returned with a `jqError`. Does not change cost.","location":"query","name":"jq","nullable":false,"required":false,"type":"string"},{"description":"Optional. The most you are willing to pay for this one request, in US dollars (for example 0.05). Any route that would charge more than this is not used, so a request only ever runs on something you can afford. If nothing is available at or below your amount, the request is refused before it runs, nothing is charged, and the message tells you the cheapest price per request so you can raise it. Leave it out to accept the normal price.","location":"query","name":"max_cost_usd","nullable":false,"required":false,"type":"string"},{"description":"Optional wallet idempotency key, scoped to this customer for 24 hours. When the gateway honors the key, this synchronous in-process execution can continue after the caller disconnects, bounded by its execution deadline. A completed replayable result charges normally exactly once and can be replayed without another provider run or charge. A pending duplicate returns 409 idempotency_in_progress; reuse with different request semantics returns 409 idempotency_conflict.","location":"header","max_length":255,"min_length":1,"name":"Idempotency-Key","nullable":false,"required":false,"type":"string"},{"description":"Optional, default true. When false, only the sources listed in `source` may serve; the request is refused with no charge if none of them can. When true, the listed sources are tried first and any other source may serve after them, at the normal price.","location":"body","name":"allowFallbacks","nullable":false,"pointer":"/allowFallbacks","required":false,"type":"boolean"},{"description":"Hacker News story id, e.g. \"47340079\".","location":"body","name":"id","nullable":false,"pointer":"/id","required":true,"type":"string"},{"description":"Optional. Source ids to skip for this request, taken from this endpoint's `lanes[].source.id`. The cheapest remaining source serves and the price is that of the dearest remaining source. An id that does not serve this endpoint, or that is also in `source`, is rejected as invalid input with no charge; skipping every source is rejected the same way.","item_type":"string","location":"body","name":"ignoreSources","nullable":false,"pointer":"/ignoreSources","required":false,"type":"array"},{"description":"Optional; omit it and routing is unchanged, with the cheapest source serving. Prefer sources whose typical response time (median over the trailing 30 days, as published on this endpoint's lane health) is under this many milliseconds; among those, the cheapest serves. This can raise your price: when the cheapest source misses the target, a faster and dearer one serves, and you are quoted and charged its price. If no source is that fast the request is still served, by whichever source offers the best speed for its price - it is never refused for being slow. Sources we have not timed are tried last. This is a preference, not a guarantee: the median describes past requests and is not a ceiling on this one, and it excludes any wait this request itself asks for. On a paginated walk it applies to the first page only: later pages stay with the source that page chose, at the price it was quoted.","location":"body","minimum":"1","name":"preferLatencyUnderMs","nullable":false,"pointer":"/preferLatencyUnderMs","required":false,"type":"integer"},{"description":"Optional. Source ids to prefer, in order, taken from this endpoint's `lanes[].source.id` in /catalog or /apis. Omit it and the cheapest source serves, with automatic failover. Listed sources are tried first in the order given, then the others, unless `allowFallbacks` is false. A single source with `allowFallbacks` false is served only by that source at its price, quoted and charged exactly, with no failover. The price is that of the dearest source that may serve. An id that does not serve this endpoint is rejected as invalid input with no charge; a listed source that is not serving right now is refused with no charge, so omit `source` to be served by another. On a paginated walk, later pages must include the source that served page one, or omit `source`.","item_type":"string","location":"body","name":"source","nullable":false,"pointer":"/source","required":false,"type":"array"}],"logoUrl":"","method":"POST","name":"Hacker News Story Comments","nameTranslations":{"ar":"تعليقات قصص Hacker News","ja":"Hacker Newsのストーリーコメント","zh":"Hacker News故事评论"},"overviewHtml":"\u003ch2\u003eHacker News Comments API\u003c/h2\u003e\n\u003cp\u003eSend the story identifier as id in a JSON body. Comments are represented as records under output.data.comments, with parentId and postId available for linking replies to their context.\u003c/p\u003e\n\u003ch2\u003eQuick Facts\u003c/h2\u003e\n\u003ctable\u003e\n\u003cthead\u003e\n\u003ctr\u003e\n\u003cth\u003eFact\u003c/th\u003e\n\u003cth\u003eValue\u003c/th\u003e\n\u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003ctd\u003eAccess\u003c/td\u003e\n\u003ctd\u003eOpenAny REST\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eAuthentication\u003c/td\u003e\n\u003ctd\u003eOpenAny API key in the Authorization header\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eCore inputs\u003c/td\u003e\n\u003ctd\u003eRequired body: id, the Hacker News story identifier as a string.\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eSelected implementation\u003c/td\u003e\n\u003ctd\u003eanyapi · Hacker News Story Comments\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eBilling\u003c/td\u003e\n\u003ctd\u003eSee the pricing area for the selected implementation and request options\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\u003ch2\u003eWhat You Can Build\u003c/h2\u003e\n\u003cul\u003e\n\u003cli\u003e\u003cstrong\u003eReview a launch discussion\u003c/strong\u003e: Collect comments for a known launch story and retain their permalinks.\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eBuild a thread reader\u003c/strong\u003e: Group records using parentId while preserving original comment identifiers.\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003ePrepare a topic brief\u003c/strong\u003e: Analyze returned discussion text and link observations to the source comments.\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch2\u003eReturned Data\u003c/h2\u003e\n\u003ctable\u003e\n\u003cthead\u003e\n\u003ctr\u003e\n\u003cth\u003eField\u003c/th\u003e\n\u003cth\u003eMeaning\u003c/th\u003e\n\u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003eoutput.data.comments[].id\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eComment identifier\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003eoutput.data.comments[].author\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eComment author\u0026#39;s username\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003eoutput.data.comments[].text\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eComment text\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003eoutput.data.comments[].parentId\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eParent item identifier\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003eoutput.data.comments[].postId\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eAssociated story identifier\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003eoutput.data.comments[].permalink\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eComment permalink\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003eoutput.data.comments[].createdUtc\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eComment creation time\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\u003ch2\u003eQuick Start\u003c/h2\u003e\n\u003col\u003e\n\u003cli\u003eSet OPENANY_API_KEY to your OpenAny API key.\u003c/li\u003e\n\u003cli\u003eReview the selected implementation and pricing, then adapt the request below to your target.\u003c/li\u003e\n\u003cli\u003eCheck the HTTP response and business result before reading optional fields.\u003c/li\u003e\n\u003c/ol\u003e\n\u003cpre\u003e\u003ccode class=\"language-bash\"\u003ecurl --request POST \\\n  https://api.openany.si/v1/agent-apis/anyapi/v1/run/hackernews.story_comments \\\n  -H \u0026#34;Authorization: Bearer ${OPENANY_API_KEY}\u0026#34; \\\n  -H \u0026#34;Content-Type: application/json\u0026#34; \\\n  --data-raw \u0026#39;{\u0026#34;id\u0026#34;:\u0026#34;47340079\u0026#34;}\u0026#39;\n\u003c/code\u003e\u003c/pre\u003e\n\u003ch2\u003eRequest and Response Examples\u003c/h2\u003e\n\u003cp\u003eThe request template and reference output are independent illustrations. Use the reference for field structure and check the returned record against your requested identifier.\u003c/p\u003e\n\u003cp\u003e\u003ca href=\"https://openany.si/api/v1/agent-apis/da1af625-00e5-4b86-9157-c0b656d3434e\"\u003ePublished Hacker News Comments API implementation contract\u003c/a\u003e.\u003c/p\u003e\n\u003ch2\u003ePricing and Billing\u003c/h2\u003e\n\u003cp\u003eThe pricing area reflects the selected API implementation. Review its billing unit and any request-dependent rules before calling; a source service\u0026#39;s public availability does not determine OpenAny billing.\u003c/p\u003e\n\u003ch2\u003eFrequently Asked Questions\u003c/h2\u003e\n\u003ch3\u003eWhere do I get the story ID?\u003c/h3\u003e\n\u003cp\u003eUse the numeric item ID from a Hacker News discussion URL or a story returned by the Hacker News Search API.\u003c/p\u003e\n\u003ch3\u003eAre comments returned as a nested tree?\u003c/h3\u003e\n\u003cp\u003eThe documented response uses a comments array with parentId references. Reconstruct a hierarchy in your application when needed.\u003c/p\u003e\n\u003ch3\u003eDoes the endpoint promise every comment in a thread?\u003c/h3\u003e\n\u003cp\u003eIt returns the comments supplied by the selected implementation. No completeness or full-thread coverage guarantee is declared.\u003c/p\u003e\n\u003ch3\u003eCan I paginate or sort the comments?\u003c/h3\u003e\n\u003cp\u003eThe business request input is id. A comment page, cursor or sort parameter is not declared by this implementation.\u003c/p\u003e\n\u003ch3\u003eCan I render comment text directly as trusted HTML?\u003c/h3\u003e\n\u003cp\u003eTreat external comment content as untrusted input and apply your application\u0026#39;s escaping or sanitization before display.\u003c/p\u003e\n\u003ch3\u003eDoes this request also retrieve the linked article?\u003c/h3\u003e\n\u003cp\u003eIt retrieves Hacker News comments. Fetching an external article\u0026#39;s contents is a separate operation.\u003c/p\u003e\n\u003ch2\u003eRelated APIs\u003c/h2\u003e\n\u003cul\u003e\n\u003cli\u003e\u003ca href=\"https://openany.si/market/apis/hackernews/hackernews-hacker-news-search\"\u003eHacker News Search API\u003c/a\u003e\u003c/li\u003e\n\u003c/ul\u003e\n","pagePath":"/markets/apis/hackernews/hackernews-hacker-news-story-comments?offering=da1af625-00e5-4b86-9157-c0b656d3434e","providerId":"anyapi","publicPath":"/v1/agent-apis/anyapi/v1/run/hackernews.story_comments","requestContentType":"application/json","revision":5,"samples":[{"http_status":200,"name":"Official example (output fragment; HTTP assumed)","request":{"body":{"id":"47340079"},"headers":{},"path":{},"query":{}},"response_body":{"output":{"data":{"comments":[{"author":"gwern_reader","createdUtc":1758981900,"id":"45389802","parentId":"45389217","permalink":"https://news.ycombinator.com/item?id=45389802","postId":"45389217","text":"The interesting bit here is not Rust itself, it is that they went from a 40 minute cold build to under 3 minutes by caching at the crate graph level instead of the file level. That is a build system design decision, not a language one."},{"author":"tuple_of_one","createdUtc":1758983160,"id":"45389944","parentId":"45389802","permalink":"https://news.ycombinator.com/item?id=45389944","postId":"45389217","text":"Bazel does crate level caching too if you use rules_rust, curious why they rolled their own instead."},{"author":"kvasir_dev","createdUtc":1758984720,"id":"45390110","parentId":"45389217","permalink":"https://news.ycombinator.com/item?id=45390110","postId":"45389217","text":"Author here. We looked at Bazel first, the migration cost for our existing Go and TypeScript services was the blocker, not the caching model."}]},"found":true}}}],"seoDescription":"Get Hacker News Comments data via REST or MCP powered by anyapi. Pay per call, no subscription. Get comment identifier and comment text in JSON.","updatedAt":"2026-12-03T02:36:38.440Z","usageInstructionsHtml":""}}