Aller au contenu
GET /v1/search

Search stories and comments

Essayez-le en direct

10 appels gratuits par jour — sans inscription, sans clé API. Passe par la passerelle oanor.

En-têtes personnalisés (facultatif)
api.oanor.com/hackernews-api

Ça marche. Récupérez une clé API et utilisez-la dans votre projet.

Obtenez une clé API

Extraits de code

curl "https://api.oanor.com/hackernews-api/v1/search" \
  -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/hackernews-api/v1/search", {
  headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/hackernews-api/v1/search");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["x-oanor-key: oanor_test_..."]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$out = curl_exec($ch);
import requests
requests.get(
    "https://api.oanor.com/hackernews-api/v1/search",
    headers={"x-oanor-key": "oanor_test_..."}
)

Exemple de réponse

Une réponse réelle de ce endpoint, capturée lors du dernier contrôle de santé.

{
    "data": {
        "sort": "relevance",
        "type": "story",
        "count": 10,
        "query": "openai",
        "total": 25362,
        "results": [
            {
                "id": "38309611",
                "url": "https://openai.com/blog/openai-announces-leadership-transition",
                "tags": [
                    "story",
                    "author_davidbarker",
                    "story_38309611"
                ],
                "text": null,
                "title": "OpenAI's board has fired Sam Altman",
                "author": "davidbarker",
                "hn_url": "https://news.ycombinator.com/item?id=38309611",
                "points": 5710,
                "created_at": "2023-11-17T20:28:50Z",
                "num_comments": 2530
            },
            {
                "id": "35813322",
                "url": "https://www.semianalysis.com/p/google-we-have-no-moat-and-neither",
                "tags": [
                    "story",
                    "author_klelatti",
                    "story_35813322"
                ],
                "text": null,
                "title": "Google “We have no moat, and neither does OpenAI”",
                "author": "klelatti",
                "hn_url": "https://news.ycombinator.com/item?id=35813322",
                "points": 2455,
                "created_at": "2023-05-04T10:19:13Z",
                "num_comments": 1039
            },
            {
                "id": "44800746",
                "url": "https://openai.com/open-models/",
                "tags": [
                    "story",
                    "author_lackoftactics",
                    "story_44800746"
                ],
                "text": "<a href=\"https:&#x2F;&#x2F;openai.com&#x2F;index&#x2F;introducing-gpt-oss&#x2F;\" rel=\"nofollow\">https:&#x2F;&#x2F;openai.com&#x2F;index&#x2F;introducing-gpt-oss&#x2F;</a>",
                "title": "Open models by OpenAI",
                "author": "lackoftactics",
                "hn_url": "https://news.ycombinator.com/item?id=44800746",
                "points": 2124,
                "created_at": "2025-08-05T17:02:02Z",
                "num_comments": 876
            },
            {
                "id": "38375239",
                "url": "https://twitter.com/openai/status/1727206187077370115",
                "tags": [
                    "story",
                    "author_staranjeet",
                    "story_38375239"
                ],
                "text": null,
                "title": "We have reached an agreement in principle for Sam to return to OpenAI as CEO",
                "author": "staranjeet",
                "hn_url": "https://news.ycombinator.com/item?id=38375239",
                "points": 1980,
                "created_at": "2023-11-22T06:01:45Z",
                "num_comments": 1950
            },
            {
                "id": "47193478",
                "url": "https://help.openai.com/en/articles/637840
…