Skip to content

Prefixes

A prefix is the 10.x part of a DOI and belongs to one member. Crossref serves no /prefixes list route, so prefixes are addressable only one at a time; prefixes.search(), prefixes.count(), and prefixes.iterate() raise ConfigurationError.

import asyncio

from bibliofabric.crossref import CrossrefClient


client = CrossrefClient()


async def main() -> None:
    async with client:
        prefix = await client.prefixes.get("10.1038")
        print(prefix.prefix, "-", prefix.name, "- member", prefix.member)


asyncio.run(main())
10.1038 - Springer Science and Business Media LLC - member 297

The API returns member and prefix as full https://id.crossref.org/member/297-style URIs; the Prefix model keeps the bare values.

All works under a prefix

prefixes.works(prefix) returns a works client bound to /prefixes/{prefix}/works; see Works:

scoped = await client.prefixes.works("10.1038").search(page_size=1)
print("total:", scoped.total)
total: 1816331