roadoi interacts with the Unpaywall API, a simple web-interface which links DOIs and open access versions of scholarly works. The API powers Unpaywall.

This client supports the most recent API Version 2.

API Documentation:

How do I use it?

Use the oadoi_fetch() function in this package to get open access status information and full-text links from Unpaywall.

There are no API restrictions. However, providing an email address is required and a rate limit of 100k is suggested. If you need to access more data, use the data dump instead.

RStudio Addin

This package also has a RStudio Addin for easily finding free full-texts in RStudio.

How do I get it?

Install and load from CRAN:


To install the development version, use the devtools package


Long-Form Documentation including use-case

Open access copies of scholarly publications are sometimes hard to find. Some are published in open access journals. Others are made freely available as preprints before publication, and others are deposited in institutional repositories, digital archives maintained by universities and research institutions. This document guides you to roadoi, a R client that makes it easy to search for these open access copies by interfacing the Unpaywall service where DOIs are matched with freely available full-texts available from open access journals and archives.

About Unpaywall

Unpaywall, developed and maintained by the team of Impactstory, is a non-profit service that finds open access copies of scholarly literature simply by looking up a DOI (Digital Object Identifier). It not only returns open access full-text links, but also helpful metadata about the open access status of a publication such as licensing or provenance information.

Unpaywall uses different data sources to find open access full-texts including:

  • Crossref: a DOI registration agency serving major scholarly publishers.
  • Directory of Open Access Journals (DOAJ): a registry of open access journals
  • Various OAI-PMH metadata sources. OAI-PMH is a protocol often used by open access journals and repositories such as arXiv and PubMed Central.

See Piwowar et al. (2017) for a comprehensive overview of Unpaywall.[^1]

Basic usage

There is one major function to talk with Unpaywall, oadoi_fetch(), taking a character vector of DOIs and your email address as required arguments.

What’s returned?

The client supports API version 2. According to the Unpaywall Data Format, the following variables with the following definitions are returned:

Column Description
doi DOI (always in lowercase)
best_oa_location list-column describing the best OA location. Algorithm prioritizes publisher hosted content (e.g. Hybrid or Gold)
oa_locations list-column of all the OA locations.
data_standard Indicates the data collection approaches used for this resource. 1 mostly uses Crossref for hybrid detection. 2 uses more comprehensive hybrid detection methods.
is_oa Is there an OA copy (logical)?
journal_is_oa Is the article published in a fully OA journal? Uses the Directory of Open Access Journals (DOAJ) as source.
journal_issns ISSNs
journal_name Journal title
publisher Publisher
title Publication title.
year Year published.
updated Time when the data for this resource was last updated.
non_compliant Lists other full-text resources that are not hosted by either publishers or repositories.
authors Lists authors (if available)

The columns best_oa_location and oa_locations are list-columns that contain useful metadata about the OA sources found by Unpaywall These are

Column Description
evidence How the OA location was found and is characterized by Unpaywall?
host_type OA full-text provided by publisher or repository.
license The license under which this copy is published
url The URL where you can find this OA copy.
versions The content version accessible at this location following the DRIVER 2.0 Guidelines (

There at least two ways to simplify these list-columns.

To get the full-text links from the list-column best_oa_location, you may want to use purrr::map_chr().

If you want to gather all full-text links and to explore where these links are hosted, simplify the list-column oa_locations with tidyr::unnest():

Note that fields to be returned might change according to the Unpaywall API specs

Any API restrictions?

There are no API restrictions. However, providing your email address when using this client is required by Unpaywall. Set email address in your .Rprofile file with the option roadoi_email when you are too tired to type in your email address every time you want to call Unpaywall.

options(roadoi_email = "[email protected]")

Use Case: Studying the compliance with open access policies

An increasing number of universities, research organisations and funders have launched open access policies in recent years. Using roadoi together with other R-packages makes it easy to examine how and to what extent researchers comply with these policies in a reproducible and transparent manner. In particular, the rcrossref package, maintained by rOpenSci, provides many helpful functions for this task.

Gathering DOIs representing scholarly publications

DOIs have become essential for referencing scholarly publications, and thus many digital libraries and institutional databases keep track of these persistent identifiers. For the sake of this vignette, instead of starting with a pre-defined set of publications originating from these sources, we simply generate a random sample of 100 DOIs registered with Crossref by using the rcrossref package.

# get a random sample of DOIs and metadata describing these works
random_dois <- rcrossref::cr_r(sample = 100) %>%
  rcrossref::cr_works() %>%
#> # A tibble: 100 x 30
#>  container.title   created deposited doi   indexed issn 
#>    <chr>           <chr>             <chr>   <chr>     <chr> <chr>   <chr>
#>  1 S1353829213000… Health & Place    2013-0… 2017-06-… 10.1… 2018-0… 1353…
#>  2 BFjhh2008119    Journal of Human… 2008-0… 2017-12-… 10.1… 2018-0… 0950…
#>  3 <NA>            Economics of Sci… 2017-1… 2017-11-… 10.1… 2018-0… 1381…
#>  4 S0020169304000… Inorganica Chimi… 2004-0… 2017-06-… 10.1… 2018-0… 0020…
#>  5 <NA>            American Nationa… 2018-0… 2018-02-… 10.1… 2018-0… <NA> 
#>  6 <NA>            Clinical Infecti… 2011-0… 2017-08-… 10.1… 2018-0… 1058…
#>  7 S0030401808009… Optics Communica… 2008-1… 2017-06-… 10.1… 2018-0… 0030…
#>  8 <NA>            <NA>              2015-1… 2017-02-… 10.1… 2018-0… <NA> 
#>  9 <NA>            Prenatal Diagnos… 2002-0… 2018-08-… 10.1… 2018-0… 0197…
#> 10 <NA>            L'aide-soignant … 2012-1… 2015-02-… 10.1… 2018-0… <NA> 
#> # ... with 90 more rows, and 23 more variables: issued <chr>,
#> #   member <chr>, page <chr>, prefix <chr>, publisher <chr>,
#> #   reference.count <chr>, score <chr>, source <chr>, title <chr>,
#> #   type <chr>, update.policy <chr>, url <chr>, volume <chr>,
#> #   assertion <list>, author <list>, link <list>, license <list>,
#> #   issue <chr>, isbn <chr>, archive <chr>, subject <chr>, subtitle <chr>,
#> #   abstract <chr>

Let’s see when these random publications were published

and of what type they are

Calling Unpaywall

Now let’s call Unpaywall. We are capturing possible errors.

oa_df <- purrr::map(random_dois$doi, .f = purrr::safely(
  function(x) roadoi::oadoi_fetch(x, email = "[email protected]")
  )) %>%

and merge the resulting information about open access full-text links with parts of our Crossref metadata-set

my_df <- random_dois %>%
  select(doi, type) %>% 
  left_join(oa_df, by = c("doi" = "doi"))


After gathering the data, reporting with R is very straightforward. You can even generate dynamic reports using R Markdown and related packages, thus making your study reproducible and transparent for others.

To display how many full-text links were found and which sources were used in a nicely formatted markdown-table using the knitr-package:

my_df %>%
  group_by(is_oa) %>%
  summarise(Articles = n()) %>%
  mutate(Proportion = Articles / sum(Articles)) %>%
  arrange(desc(Articles)) %>%
is_oa Articles Proportion
FALSE 74 0.74
TRUE 26 0.26

How did Unpaywall find those Open Access full-texts, which were characterized as best matches, and how are these OA types distributed over publication types?

my_df %>%
  filter(is_oa == TRUE) %>%
  tidyr::unnest(best_oa_location) %>% 
  group_by(evidence, type) %>%
  summarise(Articles = n()) %>%
  arrange(desc(Articles)) %>%
evidence type Articles
open (via free pdf) journal-article 12
oa repository (via OAI-PMH doi match) journal-article 5
oa repository (via OAI-PMH title and first author match) journal-article 2
open (via page says license) journal-article 2
oa journal (via publisher name) component 1
oa repository (via OAI-PMH doi match) book 1
open (via free pdf) dissertation 1
open (via free pdf) other 1
open (via page says license) book-chapter 1

More examples

For more examples, see Piwowar et al. 2018.[^1] Together with the article, they shared their analysis of Unpaywall Data as R Markdown supplement.


Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

License: MIT

Please use the issue tracker for bug reporting and feature requests.