Skip to content

API reference

Generated from the source with mkdocstrings.

Client

bibliofabric.doaj.DoajClient

Bases: BaseApiClient

Client for the DOAJ API version 4.

The search routes need no credentials. The client sends Accept: application/json on every request and paces requests at half of the documented limit of two per second by default.

journals cached property

The journals resource client.

articles cached property

The articles resource client.

Sync client

bibliofabric.doaj.DoajSyncClient

Bases: SyncBaseApiClient

Client for the DOAJ API version 4.

The search routes need no credentials. The client sends Accept: application/json on every request and paces requests at half of the documented limit of two per second by default.

journals cached property

The journals resource client.

articles cached property

The articles resource client.

Settings

bibliofabric.doaj.DoajSettings

Bases: BaseApiSettings

DOAJ-specific client settings.

Inherits timeout, max_retries, max_retry_wait, max_requests_per_second, max_concurrency, user_agent and mailto from :class:bibliofabric.config.BaseApiSettings and sets DOAJ defaults (1 request per second, concurrency 2). The search routes need no credentials; write routes that need an admin key are out of scope.

max_requests_per_second = Field(default=DEFAULT_MAX_REQUESTS_PER_SECOND, gt=0) class-attribute instance-attribute

max_concurrency = Field(default=DEFAULT_MAX_CONCURRENCY, gt=0) class-attribute instance-attribute

Resources

bibliofabric.doaj.JournalsClient

Bases: DoajResourceClient[Journal]

Client for the /search/journals route.

DOAJ has no journal listing; every read goes through a search. One query reaches at most 1000 records (page and page size combined). For the whole registry, :meth:download_csv fetches the public CSV export of every journal.

download_csv(dest) async

Stream the public CSV export of every DOAJ journal to dest.

The export holds one row per journal with 52 columns (2026-11-28) and is about 26 MB. Read it with :func:bibliofabric.doaj.iter_journal_csv. The download goes to a temporary file next to dest that replaces dest only after the last chunk arrived, so an interrupted download leaves no partial file. Parent directories are created, an existing file is overwritten, and the path is returned.

get(id, *, select=None, params=None) async

Return the journal with a given ISSN.

Accepts the grouped (1932-6203) and the compact (19326203) spelling and an ISSN URL. The search matches the print and the electronic ISSN, because DOAJ indexes both in one field. Raises NotFoundError when no journal carries the ISSN and ConfigurationError when select= is passed, because DOAJ has no field selection.

bibliofabric.doaj.ArticlesClient

Bases: DoajResourceClient[Article]

Client for the /search/articles route.

The route indexes about 14 million articles, but like the journals route it serves at most 1000 records per query, and the full article data dump needs an access grant from DOAJ.

get(id, *, select=None, params=None) async

Return the article with a given DOI.

Accepts a bare DOI (10.3389/fpubh.2020.00115) and a DOI URL. Raises NotFoundError when no article carries the DOI, and ConfigurationError when select= is passed, because DOAJ has no field selection. DOAJ answers an unknown DOI with a 200 envelope of zero results.

Models

bibliofabric.doaj.Journal

Bases: BaseModel

A DOAJ journal record (search result or /journals/{id}).

issns property

The print and electronic ISSNs that are set.

publisher_name property

The publisher name, or None when the record has no publisher.

title property

The journal title.

bibliofabric.doaj.Article

Bases: BaseModel

A DOAJ article record (search result or /articles/{id}).

doi property

The DOI of the article, or None when the record has none.

issns property

The ISSNs of the journal that published the article.

Reads bibjson.journal.issns first. The article search omits that field while it always carries the ISSNs as identifier entries, so the property falls back to the identifiers with type pissn, eissn, or issn, keeping the record order and dropping duplicates.

title property

The article title.

Query helpers

bibliofabric.doaj.issn_query(issn)

Return the issn: clause for a journal ISSN.

Accepts the grouped (1932-6203) and the compact (19326203) spelling and an ISSN URL such as https://portal.issn.org/resource/ISSN/1932-6203. Anything that does not normalize to an ISSN shape raises ConfigurationError. The clause matches the print and the electronic ISSN of a journal, because DOAJ indexes both in one field.

bibliofabric.doaj.doi_query(doi)

Return the doi: clause for an article DOI.

Accepts a bare DOI (10.3389/fpubh.2020.00115) and a DOI URL. Lucene special characters are quoted with a backslash (10.1002/(sici)... keeps its parentheses and colons), because a bare one of them changes the query meaning and DOAJ answers such a query with HTTP 400. DOAJ escapes the forward slash of a DOI itself, so the slash stays plain. A value that does not look like a DOI raises ConfigurationError.

Journal CSV export

bibliofabric.doaj.iter_journal_csv(path)

Yield one dict per journal row of a downloaded DOAJ journal CSV.

The keys are the column headers of the export as DOAJ writes them, for example "Journal title", "Journal ISSN (print version)", and "Journal EISSN (online version)". Every value is a string; an empty cell is "", so no key or cell is ever None. The file is read row by row, so memory use stays flat. A row shorter than the header gets empty strings for its missing cells, and cells past the header are dropped. An empty file yields nothing.