cpitclaudel / biblio.el

Browse and import bibliographic references from CrossRef, DBLP, HAL, arXiv, Dissemin, and doi.org from Emacs
GNU General Public License v3.0
185 stars 15 forks source link

Support crossref API "politely" for better service #27

Closed leezu closed 5 years ago

leezu commented 5 years ago

As of September 18th 2017 any API queries that use HTTPS and have appropriate contact information will be directed to a special pool of API machines that are reserved for polite users.

How does it work? Simple. You can do one of two things to get directed to the "polite pool":

Include a "mailto" parameter in your query. For example:

https://api.crossref.org/works?filter=has-full-text:true&mailto=GroovyBib@example.org

Include a "mailto:" in your User-Agent header. For example:

GroovyBib/1.1 (https://example.org/GroovyBib/; mailto:GroovyBib@example.org) BasedOnFunkyLib/1.4.

Note that this only works if you query the API using HTTPS. You really should be doing that anyway (wags finger).

https://github.com/CrossRef/rest-api-doc#good-manners--more-reliable-service

cpitclaudel commented 5 years ago

Thanks for the note. I will look into this.

cpitclaudel commented 5 years ago

I had a look; thanks again for the pointer. What do you suggest to implement? I could put my email, but that wouldn't help the CrossRef authors limit abuse, would it? If someone used biblio.el to spam the API, I wouldn't be able to help much at all.

leezu commented 5 years ago

How about defaulting to the current, unpolite handling but adding a configuration option for users to specify the mailto parameter and documenting it in the Readme?

cpitclaudel commented 5 years ago

Sounds reasonable. Thanks! I'll do it soon.

m4lvin commented 4 years ago

It seems the queries are still done via HTTP and not HTTPS. Could you also change http://api.crossref.org to https://api.crossref.org?

(And many thanks for this great package!)

cpitclaudel commented 4 years ago

Done, thanks for the suggestion.