Development — entry 015 of 100
CDNJS
cdnjs mirrors thousands of open-source JavaScript, CSS, and font libraries on Cloudflare's edge network, and its free `/libraries` and `/libraries/:library` endpoints expose the same catalogue as JSON — name, latest version, file list, SRI hashes, and linked GitHub metadata — backed by Algolia search. No key or signup is required for either the asset CDN or the metadata API, and responses cache for six hours server-side.
cdnjs exposes its entire library catalog as a free, keyless API for searching packages and reading version, file, SRI hash, and GitHub metadata for any hosted library.
GreatAPIs Score
Auth quickstart
- No API key required — requests are public and keyless.
Your key is stored only in this browser (localStorage) and sent directly to the API — never to greatapis.
Look up a specific library
GEThttps://api.cdnjs.com/libraries/jquery?fields=github,sri
{
"name": "jquery",
"latest": "https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.1/jquery.min.js",
"version": "3.7.1",
"sri": "sha512-v2CJ7UaYy4JwqLDIrZUI/4hqeoQieOmAZNXBeQyjo21dadnwR+8ZaIJVT8EE2iyI61OV8e6M8PP2/4hpQINQ/g==",
"github": {
"user": "jquery",
"repo": "jquery",
"stargazers_count": 59543
}
}Developer reference
Gotchas & limits
- The `fields` query param whitelists which fields are returned — omit it and you get the full default object, but request specific fields (e.g. `github`, `sri`) to keep responses small
- `/libraries` search results and `/libraries/:library` are cached for 6 hours, while versioned file responses like `/libraries/:library/:version` are cached for 355 days since released versions are immutable
- Unknown library or version names return a JSON error body (`{ "error": true, "status": 404, ... }`) alongside a 404 status