Use case 1: Faceted search to get number of works per license type

Load library

from habanero import Crossref
cr = Crossref()

First, do a search like

res = = "license:*")

Count number of unique licenses


That’s a lot of licenses!

Get licenses with > 1000 works

gt1000 = {k:v for (k,v) in res['message']['facets']['license']['values'].items() if v > 1000}

Ah, that’s only 63

Find the license with the most works

max(gt1000, key=lambda k: gt1000[k])

That’s a license “” from Elsevier