Skip to content

API reference

Generated from the source with mkdocstrings.

Client

diurnalia.DiurnaliaClient

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

diurnalia.DiurnaliaSyncClient

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

diurnalia.DiurnaliaSettings

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

diurnalia.JournalsClient

Bases: DiurnaliaResourceClient[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:diurnalia.iter_journal_csv. Creates parent directories, overwrites an existing file, and returns the path.

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.

diurnalia.ArticlesClient

Bases: DiurnaliaResourceClient[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. Harvest everything through the DOAJ public data dump instead.

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; DOAJ answers such a search with a 200 envelope of zero results.

Models

diurnalia.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.

diurnalia.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.

title property

The article title.

Query helpers

diurnalia.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. The clause matches the print and the electronic ISSN of a journal, because DOAJ indexes both in one field.

diurnalia.doi_query(doi)

Return the doi: clause for an article DOI.

Accepts a bare DOI (10.3389/fpubh.2020.00115) and a DOI URL. DOAJ escapes the forward slash of a DOI itself, so the clause can carry the plain DOI.

Journal CSV export

diurnalia.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 "". The file is read row by row, so memory use stays flat.