Sand AISand AI MAGI-2MAGI-2 が SandBase に登場しました: ネイティブ音声付き 1080p 動画今すぐ試す

Hacker News Search

APIドキュメント
https://api.sandbase.ai/v1/api/hacker-news/search

Search Hacker News by keyword - matching stories with title, link, author, points, and comment count as clean JSON.

料金
$0.0015 からUSD / 回
メソッド
POST
レスポンス
JSON
パラメータ
必須 1 件 · 任意 1 件

プレイグラウンド

入力
Search keyword, e.g. "ai".
Optional result filter, e.g. "story" or "comment".
出力準備完了

出力はここに表示されます

入力を完了してから[実行]をクリックしてください。

API README

Hacker News Search API

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.

Use cases

  • Track how often a topic such as AI reaches Hacker News and how many points those posts earn.
  • Find the most discussed Hacker News posts about a product or company name.
  • Collect source URLs shared on Hacker News for a keyword to build a reading list.
  • Filter results with tags to look only at stories or only at comments.

Request

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.

Parameters

NameTypeRequiredDescription
querystringYesSearch keyword, e.g. "ai".
tagsstringNoOptional result filter, e.g. "story" or "comment".

Example response

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
}

Response fields

FieldMeaning
data.results[].titleTitle of the Hacker News post.
data.results[].urlLink the post points to. This is the external page or guideline the author shared.
data.results[].permalinkLink to the item's discussion page on Hacker News.
data.results[].idHacker News item ID, returned as a string.
data.results[].authorHacker News username of the person who posted the item.
data.results[].pointsScore of the post.
data.results[].commentsNumber of comments on the post.
data.results[].createdUtcCreation time as a Unix timestamp in seconds.
foundtrue when the search returned results.

Notes

Pricing

Billed at the actual cost of each call, about $0.0015 for the request above. Failed calls are not charged.

さらに探索

関連 APIs

すべての APIs
API価格レスポンス
Hacker News1回あたり $0.0015 からJSON
Hacker News1回あたり $0.0015 からJSON
Hacker News1回あたり $0.0015 からJSON
Hacker News1回あたり $0.0015 からJSON

質問

FAQ

Hacker News Search API はどのように使いますか?

Authorization ヘッダー(Bearer)に SandBase API key を指定し、パラメータを JSON ボディで送信して https://api.sandbase.ai/v1/api/hacker-news/search に POST リクエストを送ります。このページの Playground で、コードを書かずに試すこともできます。

Hacker News Search API の料金はいくらですか?

1回あたり $0.0015 から、SandBase 残高から課金されます。課金対象はご利用分のみで、サブスクリプションはありません。

Hacker News Search API はどのパラメータを受け付けますか?

必須: query (string)。 任意: tags (string)。 このページの Parameters テーブルと Playground に、すべてのフィールドが一覧表示されています。

Hacker News Search API は何を返しますか?

同じ HTTP リクエスト内で返される JSON レスポンスです(同期)。 このページの README にサンプルレスポンスがあります。

Hacker News の開発者アカウントまたは API key は必要ですか?

いいえ。Hacker News Search は SandBase 経由で動作するため、SandBase の API key 1つでこのエンドポイントと、カタログ内の他のすべての API とモデルを利用できます。Hacker News の API アクセスを別途申請する必要はありません。