Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Searching jsdelivr.com for a package #6

Closed
gujiman opened this issue Dec 31, 2017 · 3 comments
Closed

Searching jsdelivr.com for a package #6

gujiman opened this issue Dec 31, 2017 · 3 comments
Labels

Comments

@gujiman
Copy link

gujiman commented Dec 31, 2017

Is it possible to search jsdelivr.com for a package, for example like the search engine on the main https://www.jsdelivr.com page?

An api uasge example would be:

https://data.jsdelivr.com/v1/package/npm?search=jqu

would result in "jquery, ..."

@MartinKolarik
Copy link
Member

Yes, there's a separate API for that, powered by Algolia. You can check the jsdelivr.com code for an usage example, Algolia's repo for full information about the data, and their API docs for all supported methods and options.

@gujiman gujiman closed this as completed Dec 31, 2017
@gujiman
Copy link
Author

gujiman commented Dec 31, 2017

@MartinKolarik Just a quick question, i can get the search working, but i was wondering can anyone use your algolia api key "f54e21fa3a2a0160595bb058179bfb1e" or are they required to get their own key?

https://github.com/jsdelivr/www.jsdelivr.com/blob/master/src/public/js/utils/search.js#L2

@gujiman gujiman reopened this Dec 31, 2017
@MartinKolarik
Copy link
Member

Yep, consider it a public key for anyone to use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants