{"uid":"cap_zUUU5eMJGpqRH0hF5APju","slug":"hacker-news-story-comment-search-cdf7f046","name":"Hacker News Story & Comment Search","description":"Search Hacker News stories or comments by query with optional date range, sorted by relevance or date.","url":"https://hacker-news.x402tookit.com/hn-search?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":["query"],"properties":{"to":{"type":"string","description":"Last UTC day YYYY-MM-DD (inclusive)"},"from":{"type":"string","description":"First UTC day YYYY-MM-DD"},"sort":{"type":"string","description":"relevance (default) or date (newest first)"},"tags":{"type":"string","description":"story (default) or comment"},"limit":{"type":"integer","description":"Results 1 to 20 (default 10)"},"query":{"type":"string","description":"Search text, e.g. rust async"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"to":{"type":["null","string"]},"asOf":{"type":["null","string"]},"from":{"type":["null","string"]},"kind":{"type":["null","string"]},"sort":{"type":["null","string"]},"query":{"type":["null","string"]},"source":{"type":["null","string"]},"reasons":{"type":["array","null"],"items":{"type":"string"}},"results":{"type":["array","null"],"items":{"type":"object","properties":{"by":{"type":["null","string"]},"id":{"type":["null","number"]},"url":{"type":["null","string"]},"title":{"type":["null","string"]},"domain":{"type":["null","string"]},"points":{"type":["null","number"]},"comments":{"type":["null","number"]},"postedAt":{"type":["null","string"]},"discussion":{"type":["null","string"]}}}},"summary":{"type":["null","string"]},"verdict":{"type":["null","string"]},"degraded":{"type":["boolean","null"]},"returned":{"type":["null","number"]},"sourceUrl":{"type":["null","string"]},"disclaimer":{"type":["null","string"]},"notChecked":{"type":["array","null"],"items":{"type":"string"}},"totalMatches":{"type":["null","number"]}}}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.02","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.02/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_g0kIg60wH0QTYcADJ-aaB","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.02","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Search Hacker News stories or comments by keyword query with optional date range filtering, sorted by relevance or date.","exampleAgentPrompt":"Search Hacker News for stories about 'WebAssembly' from January 2024 to March 2024, sorted by relevance, and show me the top 10 results.","exampleUseCases":[{"title":"Track tech topic sentiment over time","prompt":"Search Hacker News for stories mentioning 'OpenAI' between 2024-01-01 and 2024-06-30, sorted by date, and show me the 15 most recent ones."},{"title":"Find community reactions to a product launch","prompt":"Can you search Hacker News comments for 'Arc browser' from the last two months, sorted by relevance, and give me the top 10 results so I can see what developers think?"},{"title":"Research competitor coverage on HN","prompt":"Search Hacker News stories about 'Vercel' posted between 2023-10-01 and 2024-01-01, sorted by relevance, and return up to 20 results."}],"resultDescription":"Returns a list of up to 20 matching Hacker News stories or comments, each with title, URL, author, point score, comment count, post date, and a link to the HN discussion thread. Also includes metadata such as total match count, the applied query/date filters, sort order, and an optional summary or verdict about the results.","failureModes":["Missing required 'query' parameter returns an error","Date range with 'from' after 'to' may return empty results or an error","Limit outside 1–20 range may be rejected or clamped","Very broad queries may return degraded/partial results (degraded flag set to true)","No results found returns empty results array with totalMatches: 0","Network or upstream Algolia API failure returns a non-200 response"],"whenToPreferThis":"Choose this endpoint when you need full-text search across Hacker News content with keyword queries, especially when you need date-range filtering or the ability to search comments as well as stories. Prefer this over the 'top/new/best stories' endpoint when you want relevance-ranked results for a specific topic rather than time-based front-page rankings, and over the 'domain links' endpoint when you're searching by topic rather than by source domain.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-02T12:30:50.266Z","isFirstParty":false,"canonicalSlug":"hacker-news-story-comment-search-cdf7f046"}