jsDelivr API

Beginner's Pick Development / No Auth Required Beginner HTTPS CORS
Free to Use Varies (check documentation)
85 A
Measured Score 0 50 100 Reachability 30/30 Speed 5/20 Security 15/15 Developer XP 20/20 Reliability 15/15 TESTED 2026-07-23

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.

Available Data

jsDelivr data via REST API

Example Response

JSON Response
{
  "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

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.

Common Errors & Troubleshooting

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

Reachability 30/30
Speed 5/20
Security 15/15
Developer XP 20/20
Reliability 15/15
Endpoint Response Time 2472ms

Fully tested on Jul 23, 2026

Technical Specifications

Auth No Auth
HTTPS REQUIRED
CORS YES
Category Development
Difficulty Beginner
Verified: 2026-04-04

Related Tags

Similar APIs

View All →