Vai al contenuto
GET /v1/compare

Rank several articles by total views

Provalo dal vivo

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

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

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

Ottieni una chiave API

Frammenti di codice

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

Risposta di esempio

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

{
    "data": {
        "to": "2026-06-08",
        "from": "2026-06-01",
        "count": 2,
        "source": "Wikimedia Pageviews",
        "project": "en.wikipedia",
        "ranking": [
            {
                "days": 8,
                "rank": 1,
                "found": true,
                "title": "Python (programming language)",
                "article": "Python_(programming_language)",
                "total_views": 53020
            },
            {
                "days": 8,
                "rank": 2,
                "found": true,
                "title": "Java (programming language)",
                "article": "Java_(programming_language)",
                "total_views": 29365
            }
        ]
    },
    "meta": {
        "timestamp": "2026-06-10T13:59:42.291Z",
        "request_id": "ffe99c16-9a71-4e2b-b98d-afa18f5fb310"
    },
    "status": "ok",
    "message": "Comparison completed successfully",
    "success": true
}