jsDelivr API

Beginner's Pick Development / No Auth Required Beginner HTTPS CORS
Free to Use
88 A
Measured Score 0 50 100 Speed 28/30 Consistency 17/20 Security 20/20 Browser access 15/15 Transparency 8/15 TESTED 2026-08-10

Overview

jsDelivr's Data API provides programmatic access to package metadata and download statistics for npm, GitHub, and WordPress packages hosted on the jsDelivr CDN. It requires no authentication and is useful for building dashboards, tracking package popularity, or researching CDN usage trends. All responses are returned as JSON with no rate limits for reasonable usage.

Beginner Tip

No API key is needed. Just construct the URL with the package name and optional version to get stats or file listings. Use the /stats/packages endpoint to compare download volumes across different packages.

Measurement Record

What actually happened when we called this API from our own infrastructure. Every value below was recorded by the request, not copied from the provider's documentation.

Request
GET https://data.jsdelivr.com/v1/packages/npm/react
Result
HTTP 200 · application/json · 1,116,839 bytes · compressed
Response time
37 ms (median of 3) · fastest 34 ms
Transport
TLSv1.3 · TLS_AES_128_GCM_SHA256 · certificate issued by Let's Encrypt
Browser CORS
Allowed — Access-Control-Allow-Origin: *
Recorded
2026-08-10

Available Data

The kind of data this API exposes, based on its documentation. We could not call the endpoint to confirm the exact field names.

jsDelivr data via REST API

Example Response

Illustrative shape only — we were not able to call this endpoint (it requires credentials or exposes no public sample URL), so the fields below show the kind of data this API returns rather than a recorded response.

JSON Response · Illustrative
{
  "status": "success",
  "data": {
    "result": "Data from jsDelivr",
    "description": "Package info and download stats on jsDelivr CDN",
    "timestamp": "2025-01-15T10:00:00Z"
  }
}

Field Reference

type Package source type (npm, gh, or wp)
name Name of the package
versions List of available versions for the package on jsDelivr
tags Named tags mapping to specific versions (e.g., latest)
links URLs to related resources like the package homepage and repository

Implementation Example

Calls a real endpoint of this API. Replace any placeholder credentials with your own key.

Request
const url = "https://github.com/jsdelivr/";
const response = await fetch(url);
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data);

What Can You Build?

Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.

How This API Fails

We deliberately sent this API a broken request and recorded exactly what came back on 2026-08-10. Knowing the shape of an error before you hit it makes error handling much easier to write.

HTTP 400 Requesting a path that does not exist application/json
{
  "status": 400,
  "message": "Bad Request.",
  "links": {
    "documentation": "https://www.jsdelivr.com/docs/data.jsdelivr.com"
  }
}

Common Errors & Troubleshooting

Generated guidance based on this API's documentation, not observed by us. Treat it as a starting point and check against the provider's own error reference.

404 Not Found The package name or version does not exist on jsDelivr
Double-check the package name spelling and ensure it is available on jsDelivr; check https://www.jsdelivr.com/package/npm/PACKAGE_NAME in a browser first
Empty hits array in stats response No data available for the requested date range
jsDelivr stats have a delay; try a date range from a few days ago or use the /stats/packages endpoint for aggregated data
Incorrect package type used Using /npm/ path for a GitHub-hosted package or vice versa
Use /npm/ for npm packages, /gh/ for GitHub repos (format: /gh/user/repo), and /wp/ for WordPress plugins

Measured Score Breakdown

Live HTTP request to the API endpoint

Speed 28/30
Consistency 17/20
Security 20/20
Browser access 15/15
Transparency 8/15
Endpoint Response Time 37ms

Fully tested on Aug 10, 2026

Technical Specifications

Auth No Auth
HTTPS REQUIRED
CORS YES
Category Development
Difficulty Beginner
Endpoint last called: 2026-08-10

Related Tags

Similar APIs

View All →