Skip to main content

Module preprint

Module preprint 

Source
Expand description

Finding a DOI’s arXiv preprint when Unpaywall does not name one (#636, ADR-0062).

The #325 fallback fetches an arXiv preprint in place of a blocked or missing publisher copy, but only one Unpaywall reports. A paper can be closed at its publisher, unknown to Unpaywall, and on arXiv all the same (measured on 10.1103/bbnt-brjz, arXiv:2512.07923). Three ways to find it, tried in order, each stopping the search when it answers:

  1. Crossref relation.has-preprint – in the Crossref record the fetch already holds, so it costs no request. An arxiv id, or an arXiv DOI (10.48550/arXiv.<id>).
  2. OpenAlex locations[] – a location whose landing page is arxiv.org/abs/<id>. One request to api.openalex.org, and only when the user enabled OpenAlex (DOIGET_ENABLE_OPENALEX), so a default fetch contacts no host it did not before.
  3. arXiv search by title and first author – one request to arXiv’s API, at arXiv’s own rate. A hit counts only when its title is the record’s title (compared letters and digits only, case-folded), its authors include the first author’s surname, and it does not name a different published DOI.

Each answer says which of the three found it; nothing here fetches.

Structs§

Found
A preprint found for a DOI.
FoundDoi
A non-arXiv preprint found for a DOI (#640): its own DOI, fetched through the ordinary OA route (the location Unpaywall reports for it).

Enums§

FoundBy
Which method found a preprint.

Constants§

ADS_TOKEN_ENV
The user’s own NASA ADS token (#644). Never shipped, never logged.

Functions§

find
Look for a preprint of doi: Crossref’s relation, then OpenAlex (when openalex_enabled), then arXiv’s search. crossref_message is the record the fetch already holds.
find_preprint_doi
Look for a non-arXiv preprint of doi (#640): Crossref’s relation, then bioRxiv and medRxiv pubs when biorxiv_enabled.
from_ads_answer
The arXiv id in an ADS search answer’s first record: the identifier entry arXiv:<id> (ADS’s search syntax lists arXiv ids among a record’s identifiers). Nothing else is read (#644).
from_crossref
The arXiv id Crossref’s relation.has-preprint names, if any.
from_inspire_record
The arXiv id INSPIRE-HEP’s record gives (metadata.arxiv_eprints), if any. Nothing else in the record is read (#642): its documents are files whose provenance and licence are not stated per file.
from_openalex_work
The arXiv id of an OpenAlex work’s arXiv location, if any.
preprint_doi_from_crossref
A non-arXiv preprint DOI Crossref’s relation.has-preprint names: any DOI but an arXiv one (10.48550), which from_crossref handles.