Vai al contenuto
GET /v1/range

N-grams for a range of sizes

Provalo dal vivo

10 chiamate gratuite al giorno — senza registrazione, senza chiave API. Passa dal gateway oanor.

Intestazioni personalizzate (facoltative)
api.oanor.com/ngram-api

Funziona. Prendi una chiave API e usala nel tuo progetto.

Ottieni una chiave API

Frammenti di codice

curl "https://api.oanor.com/ngram-api/v1/range" \
  -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/ngram-api/v1/range", {
  headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/ngram-api/v1/range");
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/ngram-api/v1/range",
    headers={"x-oanor-key": "oanor_test_..."}
)

Risposta di esempio

Una risposta reale di questo endpoint, acquisita dall'ultimo health check.

{
    "data": {
        "max": 3,
        "min": 1,
        "mode": "word",
        "sizes": {
            "1": {
                "total": 4,
                "ngrams": [
                    {
                        "gram": "one",
                        "count": 1
                    },
                    {
                        "gram": "two",
                        "count": 1
                    },
                    {
                        "gram": "three",
                        "count": 1
                    },
                    {
                        "gram": "four",
                        "count": 1
                    }
                ],
                "unique": 4
            },
            "2": {
                "total": 3,
                "ngrams": [
                    {
                        "gram": "one two",
                        "count": 1
                    },
                    {
                        "gram": "two three",
                        "count": 1
                    },
                    {
                        "gram": "three four",
                        "count": 1
                    }
                ],
                "unique": 3
            },
            "3": {
                "total": 2,
                "ngrams": [
                    {
                        "gram": "one two three",
                        "count": 1
                    },
                    {
                        "gram": "two three four",
                        "count": 1
                    }
                ],
                "unique": 2
            }
        },
        "token_count": 4
    },
    "meta": {
        "timestamp": "2026-06-03T09:25:03.385Z",
        "request_id": "9d1d4d2d-528a-4f77-9e3b-be539a5658cb"
    },
    "status": "ok",
    "message": "N-grams for a range of sizes",
    "success": true
}