Skip to content

Funders

client.funders covers /funders and /funders/{doi}. Funder ids are DOIs from the Funder Registry, for example 10.13039/100000001 (National Science Foundation). Later blocks reuse the client from the first block.

import asyncio

from bibliofabric.crossref import CrossrefClient


client = CrossrefClient()


async def main() -> None:
    async with client:
        funder = await client.funders.get("10.13039/100000001")
        print("funder:", funder.name, "works:", funder.work_count)


asyncio.run(main())
funder: National Science Foundation works: 464837

get() accepts a bare funder DOI, a https://doi.org/ URL, or the bare registry number form (100000001). The record carries hierarchy and hierarchy_names on single records only; list items never include them.

Search funders

The route accepts query plus the location filter; sort and select raise ConfigurationError client-side. The location filter takes a case-sensitive country name, but it returns zero results for every value, including Netherlands, while plain queries match. Prefer queries until that changes:

page = await client.funders.search(query="netherlands university", page_size=3)
print("total:", page.total)
for f in page.results:
    print(" ", f.id, f.name)
total: 6
  100031468 Open Universiteit
  501100001834 University of Twente
  501100001828 Erasmus Universiteit Rotterdam

Descendants

Funder registries nest sub-funders. descendants(doi) returns the descendant registry ids from the funder record, in Crossref's bare form ("100000025"); it returns an empty list for funders without a hierarchy:

descendants = await client.funders.descendants("10.13039/100000002")
print(descendants[:5])
['100000025', '100000026', '100000027', '100000049', '100000050']

Works funded by a funder

funders.works(doi) returns a works client bound to /funders/{doi}/works; see Works. The scoped route already includes descendants' works. With include_descendants=True, the funder's id plus its descendant registry ids are ORed into every request's funder filter, which pins the result set to the listed ids:

scope = client.funders.works("10.13039/100000002", include_descendants=True)
page = await scope.search(page_size=2)
print("total:", page.total)
for w in page.results:
    print(" ", w.doi, w.primary_title)
total: 905483
  10.1109/ner49283.2021.9441222 An Efficient Pipeline for Biophysical Modeling of Neurons
  10.1016/j.healthplace.2015.08.003 Comparison of estimation methods for creating small area rates of acute myocardial infarction among Medicare beneficiaries in California

The id set comes from the funder record and is fetched once per scope. Requests that carry their own funder filter raise ConfigurationError, since the two would silently AND together.