Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
API for public CDNs
JavaScript
branch: master
Failed to load latest commit information.
config Add reference to db name in config
lib Merge branch 'master' into sync
schemas Set up sync process
tasks Stabilize API
tests Remove useless test.
.gitignore fix error handling when sync request fails
.travis.yml Update .travis.yml
CONTRIBUTING.md Add contributing readme
LICENSE Initial commit
Procfile Initial commit
README.md Add support for jQuery CDN
api.js
package.json Stabilize API
serve.js Add callback for test_run_server test.
wercker.yml wercker - Remember to update the right app

README.md

Public CDNs API

Root: /v1/<cdn>/libraries

Supports jsdelivr, google, cdnjs, bootstrap and jquery.

Only GET requests are allowed. No limits are set.

Get all hosted libraries in JSON format

http://api.jsdelivr.com/v1/jsdelivr/libraries
http://api.jsdelivr.com/v1/google/libraries
http://api.jsdelivr.com/v1/cdnjs/libraries
http://api.jsdelivr.com/v1/bootstrap/libraries
http://api.jsdelivr.com/v1/jquery/libraries

Get full information for a single library based on name parameter.

http://api.jsdelivr.com/v1/jsdelivr/libraries?name=jquery
http://api.jsdelivr.com/v1/jsdelivr/libraries/jquery - alias

Get full information for any library starting with jq that has lastversion ending with 0.1. minimatch syntax is supported.

http://api.jsdelivr.com/v1/jsdelivr/libraries?name=jq*&lastversion=*.0.1

You can use any of the following parameters to search for libraries. A search will be performed for projects matching your input. You can use multiple parameters at the same time. If multiple projects match they all will be outputed.

  • name - name of library. Example: jquery
  • zip - zip name of project. Example: jquery.zip
  • mainfile - mainfile parameter in info.ini. Example: jquery.min.js
  • lastversion- lastversion of the project. Example: 2.0.3 (will match multiple projects)
  • versions - all hosted versions for selected project. (read only)
  • description - description of the project
  • homepage- webpage of project. Example: http://jquery.com/
  • github- github page of project. Example: https://github.com/jquery/jquery
  • author - the author of project. Example: jQuery Foundation
  • assets - files hosted per versions. (read only)

You can combine the above parameters with the parameter fields. This way you can control the output. For example to get the mainfile for jQuery you would run the following request.

http://api.jsdelivr.com/v1/jsdelivr/libraries?name=jquery&fields=mainfile

It's possible to set multiple fields using a comma for separation.

http://api.jsdelivr.com/v1/jsdelivr/libraries?name=jquery&fields=mainfile,name

Get hosted files per version for jQuery

http://api.jsdelivr.com/v1/jsdelivr/libraries?name=jquery&fields=assets

Get hosted files for a selected version

http://api.jsdelivr.com/v1/jsdelivr/libraries/jquery/2.0.3

Get libraries matching to any part of query (defaults to and)

http://api.jsdelivr.com/v1/jsdelivr/libraries?name=jquery&zip=anything*&op=or

Built with rest-sugar

Something went wrong with that request. Please try again.