get_uri_format(prefix, priority=None)[source]

Get the URI format string for the given prefix, if it’s available.

  • prefix (str) – The name of the prefix (possibly unnormalized)

  • priority (Optional[Sequence[str]]) –

    The priority order of metaresources to use for URI format string lookup. The default is:

    1. Default first party (from the Bioregistry, BioContext, or MIRIAM)

    2. OBO Foundry

    3. BioContext

    4. MIRIAM/

    5. N2T

    6. OLS

    7. Prefix Commons

Return type



The best URI format string, where the $1 should be replaced by the identifier. $1 could potentially appear multiple times.

>>> import bioregistry
>>> bioregistry.get_uri_format('chebi')

If you want to specify a different priority order, you can do so with the priority keyword. This is of particular interest to ontologists and semantic web people who might want to use URI prefixes over the URI prefixes corresponding to the first-party providers for each resource (e.g., the ChEBI example above). Do so like:

>>> import bioregistry
>>> bioregistry.get_uri_format('chebi', priority=['obofoundry', 'bioregistry', 'biocontext', 'miriam', 'ols'])