跳转到主要内容
GET
Search Hacker News
请求示例待验证。 此接口的请求示例尚未在生产环境验证。静态示例用于说明请求格式,请替换为自己的参数。正式调用前,可用免费的报价模式(X-AISA-Cost-Mode: quote)查看预估费用。

请求规范

  • 方法与路径: GET /apis/v1/hackernews/search
  • 可用状态: enabled
  • 请求 URL 模板: https://api.aisa.one/apis/v1/hackernews/search
  • author: query; 可选
  • dateRange: query; 可选
  • domain: query; 可选
  • frontPageOnly: query; 可选
  • limit: query; 可选
  • minPoints: query; 可选
  • page: query; 可选
  • prefix: query; 可选
  • query: query; 可选
  • searchAuthor: query; 可选
  • searchStoryText: query; 可选
  • sort: query; 可选
  • type: query; 可选
  • typoTolerance: query; 可选
  • url: query; 可选
完整 OpenAPI 定义 有效请求声明(包括认证和引用的 schema):

已观察到的响应结构

以下结构来自探针或抽样请求的成功结果,只反映已观察到的部分:字段和类型可能变化,不保证每次都有。已有正式响应定义优先;这里不发布真实响应值。
  • HTTP 状态 / 最近观察日期: 200 / 2026-11-28

费用与请求规则

按实际用量收费。 默认请求预估费用:$0.014 USD。 最终费用以实际用量为准。 账户适用价格可能不同;支持报价的接口可按实际请求获取报价。

翻页

  • 把 aisa_pagination.next_cursor 作为 page(查询参数)传入即可获取下一页;aisa_pagination.has_more 为 false 时停止。
  • 响应头 X-AISA-Has-More 与 X-AISA-Next-Cursor 返回相同的值。
  • 页大小参数:limit

响应时间

  • 通常 10 秒内返回。

授权

Authorization
string
header
必填

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

查询参数

author
string

Restrict results to items by this Hacker News username.

Required string length: 1 - 4096
dateRange
enum<string>

Creation-time window. Default: all.

可用选项:
24h,
all,
month,
week,
year
Required string length: 1 - 4096
domain
string

Restrict search to story URLs matching this domain (e.g. example.com). Can omit query.

Required string length: 1 - 4096
frontPageOnly
boolean

When true, restrict results to current front-page items. Allows omitting query.

limit
enum<string>

Hits per page. Must be one of 10, 20, 30, 50. Default: 20. Prefer this over pageSize.

可用选项:
10,
20,
30,
50
Required string length: 1 - 4096
minPoints
integer

Minimum points/score filter.

必填范围: 0 <= x <= 9223372036854776000
page
integer

Zero-based page index (maximum 50 pages, up to 1,000 hits).

必填范围: 0 <= x <= 49
prefix
boolean

When true, enable prefix matching for query tokens.

query
string

Full-text search query. Required unless frontPageOnly, author, domain, or url is set.

Required string length: 1 - 4096
searchAuthor
boolean

When true, include author username in the searchable fields.

searchStoryText
boolean

Include story/comment text in searchable fields. Default: true. Set false to search title/URL only.

sort
enum<string>

Ranking mode. Default: popularity.

可用选项:
date,
popularity
Required string length: 1 - 4096
type
enum<string>

Restrict search results to a Hacker News content type. ask_hn: Ask HN posts (questions to the community). show_hn: Show HN posts (projects/work being shared). launch_hn: Launch HN posts (YC-affiliated company launches). Default: all.

可用选项:
all,
ask_hn,
comment,
job,
launch_hn,
poll,
show_hn,
story
Required string length: 1 - 4096
typoTolerance
boolean

Enable typo tolerance. Default: true.

url
string

Restrict search to story URLs matching this URL substring. Can omit query.

Required string length: 1 - 4096

响应

Observed successful JSON response. This partial structure comes from successful probe or sampled requests; fields and types may vary. No field is guaranteed to be present. Last observed: 2026-11-28.

aisa_pagination
object

AIsa pagination. Pass next_cursor as page to fetch the next page; has_more is false on the last page.

data
object
meta
object