Download Public Domain Works from Wikisource

Download public domain works from Wikisource <>, a free library from the Wikimedia Foundation project.

The wikisourcer R package helps you download public domain works from the free library Wikisource.

It includes two functions for downloading books and pages by url.

  • wikisource_book() to download a book.
  • wikisource_page() to download a page.


install.packages("wikisourcer") # or devtools::install_github("lgnbhl/wikisourcer")

Minimal examples

Download Voltaire’s philosophical novel Candide.

wikisource_book(url = "")

Download Chapter 1 of Candide.

wikisource_page(wikiurl = "", 
                page = "Chapter 1")

Download Candide in French, Spanish and Italian.

fr <- ",_ou_l%E2%80%99Optimisme/Garnier_1877"
es <- ",_o_el_optimismo"
it <- ""
purrr::map_df(c(fr, es, it), wikisource_book)

For more information on how to use wikisourcer, please read the vignette.


wikisourcer 0.1.3

  • Added a file to track changes to the package.
  • Fixed and improved vignette.
  • Removed dplyr and stringrdependencies.
  • Added the boolean cleaned variables to give the possibility to download all the metadata of the wikipages.

wikisourcer 0.1.4

  • Fixed vignette links.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


0.1.4 by Félix Luginbuhl, a year ago

Report a bug at

Browse source code at

Authors: Félix Luginbuhl [aut, cre]

Documentation:   PDF Manual  

MIT + file LICENSE license

Imports tibble, magrittr, rvest, purrr, xml2, urltools

Suggests dplyr, stringr, knitr, rmarkdown, ggplot2, tidyr, tidytext, widyr, SnowballC, ggraph, igraph

See at CRAN