Skip to content
GET /v1/trends

Monthly totals over last year

Try it live

10 free calls per day — no sign-up, no API key. Goes through the oanor gateway.

Custom headers (optional)
api.oanor.com/npmstats-api

It works. Grab an API key and use it in your project.

Get an API key

Code snippets

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

Example response

A real response from this endpoint, captured by the latest health check.

{
    "data": {
        "end": "2026-05-31",
        "start": "2025-06-01",
        "trend": [
            {
                "month": "2025-06",
                "downloads": 356457248
            },
            {
                "month": "2025-07",
                "downloads": 364610072
            },
            {
                "month": "2025-08",
                "downloads": 309842258
            },
            {
                "month": "2025-09",
                "downloads": 320201476
            },
            {
                "month": "2025-10",
                "downloads": 331719356
            },
            {
                "month": "2025-11",
                "downloads": 327817574
            },
            {
                "month": "2025-12",
                "downloads": 314407327
            },
            {
                "month": "2026-01",
                "downloads": 353210463
            },
            {
                "month": "2026-02",
                "downloads": 429693946
            },
            {
                "month": "2026-03",
                "downloads": 564629262
            },
            {
                "month": "2026-04",
                "downloads": 612434806
            },
            {
                "month": "2026-05",
                "downloads": 650155115
            }
        ],
        "months": 12,
        "package": "lodash"
    },
    "meta": {
        "timestamp": "2026-06-02T16:52:07.996Z",
        "request_id": "6f37d080-9344-4d64-8ace-9511ff27f552"
    },
    "status": "ok",
    "message": "Monthly trend over last year",
    "success": true
}