Hacker News API icon

Hacker News API

Interact with the Hacker News API (Algolia)

Actions3

Search → Search by Date

AI-generated

Summary

Search Hacker News items by date, optionally filtered by query, tags, numeric filters, pagination, and request options.

Inputs

  • query — Full-text search query.
  • tags — Filter by one or more tags (e.g., story, author_pg). Tags are ANDed by default, can be ORed with parentheses.
  • numericFilters — Numeric filters such as "created_at_i>1609459200,points>100".
  • page — 0‑indexed page number when not returning all results.
  • hitsPerPage — Number of results per page (default 20, max 1000).
  • returnAll — If true, returns all matching results up to the optional limit.
  • limit — Maximum number of results to return when returnAll is false.
  • requestOptions — Collection of advanced HTTP options like batching, proxy, timeout, and SSL settings.

Output shape

array of hit objects containing id, title, url, and other typical search fields

Results are paginated via page and hitsPerPage; limit caps the returned count; when returnAll is true the API may return up to limit items; errors are conveyed via HTTP status codes.

Examples

Example 1: Search recent stories about privacy using a query and tags.

query=privacy&tags=story

Example 2: Retrieve all items posted after Jan 1, 2021, using numeric filters and returnAll.

numericFilters=created_at_i>1609459200&returnAll=true

Example 3: Use a custom proxy and batch processing to throttle requests.

proxy=http://myproxy:3128&requestOptions.batch.batchSize=100

Links

Discussion