Sand AISand AI MAGI-2MAGI-2 è ora su SandBase: video in 1080p con audio nativoProvalo ora

Hacker News Search

Documentazione 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.

Prezzo
Da $0.0015USD / chiamata
Metodo
POST
Risposta
JSON
Parametri
1 obbligatori · 1 opzionali

Playground

Input
Search keyword, e.g. "ai".
Optional result filter, e.g. "story" or "comment".
OutputPronto

Il tuo output apparirà qui

Completa gli input, poi fai clic su Esegui.

README API

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.

Esplora altro

API correlate

Tutte le API
APIPrezzoRisposta
Hacker NewsDa $0.0015 per chiamataJSON
Hacker NewsDa $0.0015 per chiamataJSON
Hacker NewsDa $0.0015 per chiamataJSON
Hacker NewsDa $0.0015 per chiamataJSON

Domande

FAQ

Come uso l'API Hacker News Search?

Invia una richiesta POST a https://api.sandbase.ai/v1/api/hacker-news/search con la tua chiave API di SandBase nell'header Authorization (Bearer) e i parametri nel body JSON. Puoi anche provarla nel Playground di questa pagina senza scrivere codice.

Quanto costa l'API Hacker News Search?

A partire da $0.0015 per chiamata, addebitato dal tuo saldo SandBase. Paghi solo le chiamate che effettui; non c'è alcun abbonamento.

Quali parametri accetta l'API Hacker News Search?

Richiesti: query (string). Facoltativi: tags (string). La tabella dei parametri e il Playground di questa pagina elencano tutti i campi.

Cosa restituisce l'API Hacker News Search?

Una risposta JSON restituita nella stessa richiesta HTTP (sincrona). Il README di questa pagina include una risposta di esempio.

Mi serve un account sviluppatore o una chiave API Hacker News?

No. Hacker News Search funziona tramite SandBase, quindi una sola chiave API SandBase copre questo endpoint e tutte le altre API e modelli del catalogo. Non è necessario richiedere separatamente l'accesso alle API Hacker News.