querystring필수
Search keyword, e.g. "ai".
https://api.sandbase.ai/v1/api/hacker-news/searchSearch Hacker News by keyword - matching stories with title, link, author, points, and comment count as clean JSON.
출력이 여기에 표시됩니다
입력을 완료한 다음 Run을 클릭하세요.
Returns Hacker News items that match a keyword. Each result has the title, link, author, points, comment count, and creation time. The only required input is query.
tags to look only at stories or only at comments.curl -X POST "https://api.sandbase.ai/v1/api/hacker-news/search" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"query": "ai"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
query | string | Yes | Search keyword, e.g. "ai". |
tags | string | No | Optional result filter, e.g. "story" or "comment". |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"data": {
"results": [
{
"author": "usefulposter",
"comments": 1668,
"createdUtc": 1773257369,
"id": "47340079",
"permalink": "https://news.ycombinator.com/item?id=47340079",
"points": 4229,
"title": "Don't post generated/AI-edited comments. HN is for conversation between humans",
"url": "https://news.ycombinator.com/newsguidelines.html#generated"
}
]
},
"found": true
}
| Field | Meaning |
|---|---|
data.results[].title | Title of the Hacker News post. |
data.results[].url | Link the post points to. This is the external page or guideline the author shared. |
data.results[].permalink | Link to the item's discussion page on Hacker News. |
data.results[].id | Hacker News item ID, returned as a string. |
data.results[].author | Hacker News username of the person who posted the item. |
data.results[].points | Score of the post. |
data.results[].comments | Number of comments on the post. |
data.results[].createdUtc | Creation time as a Unix timestamp in seconds. |
found | true when the search returned results. |
tags to a value such as story or comment to filter the result type.id value from a result as the input for Hacker News Story to get one post, or Hacker News Story Comments to read its discussion.author to Hacker News Profile to look up that user.Billed at the actual cost of each call, about $0.0015 for the request above. Failed calls are not charged.
빌드를 시작하세요
통합 인증 및 사용량 추적이 있는 플랫폼 API 엔드포인트입니다.
curl -X POST "https://api.sandbase.ai/v1/api/hacker-news/search" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"query": "ai"
}'서버 환경에 SandBase API 키를 설정하세요. 요청에는 Bearer 인증이 사용됩니다.
export SANDBASE_API_KEY="YOUR_API_KEY"키는 서버에 보관하세요. 브라우저 코드에 노출하지 마세요.
querystring필수Search keyword, e.g. "ai".
tagsstringOptional result filter, e.g. "story" or "comment".
이 API의 저장된 예시 응답입니다. 확인할 때 라이브 요청은 실행되지 않습니다.
저장된 응답이 게시되지 않았습니다. Playground에서 API를 실행해 응답을 확인하세요.
더 살펴보기
| API | 가격 | 응답 |
|---|---|---|
Hacker News Search이 API Hacker News | 호출당 $0.0015부터 | JSON |
Hacker News | 호출당 $0.0015부터 | JSON |
Hacker News | 호출당 $0.0015부터 | JSON |
Hacker News | 호출당 $0.0015부터 | JSON |
질문
Authorization 헤더(Bearer)에 SandBase API 키를 넣고, 매개변수를 JSON 본문으로 담아 https://api.sandbase.ai/v1/api/hacker-news/search에 POST 요청을 보내세요. 이 페이지의 Playground에서도 코드를 작성하지 않고 직접 테스트할 수 있습니다.
호출당 $0.0015부터, SandBase 잔액에서 청구됩니다. 사용한 호출에 대해서만 요금이 부과되며, 구독은 없습니다.
필수: query (string). 선택: tags (string). 이 페이지의 Parameters 표와 Playground에 모든 필드가 나와 있습니다.
같은 HTTP 요청에서 반환되는 JSON 응답입니다(동기식). 이 페이지의 README에 샘플 응답이 포함되어 있습니다.
아니요. Hacker News Search은 SandBase를 통해 실행되므로, SandBase API 키 하나로 이 엔드포인트와 카탈로그의 다른 모든 API 및 모델을 사용할 수 있습니다. Hacker News API 액세스를 별도로 신청할 필요는 없습니다.