Read-Write API Client Library for 'Wikidata'

An API client for the Wikidata <> store of semantic data.

An R API wrapper for the Wikidata store of semantic data.

Author: Oliver Keyes, Serena Signorelli & Christian Graul
License: MIT
Status: Stable

Travis-CI Build Statusdownloads


WikidataR is a wrapper around the Wikidata API. It is written in and for R, and was inspired by Christian Graul's rwikidata project. For details on how to best use it, see the explanatory vignette.

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.


For the most recent CRAN version:


For the development version:





  • extract_claims() allows you to, well, extract claims.
  • SPARQL syntax bug with some geo queries now fixed (thanks to Mikhail Popov)


  • get_* functions are now vectorised


  • geographic data for entities that exist relative to other Wikidata items can now be retrieved with get_geo_entity and get_geo_box, courtesy of excellent Serena Signorelli's excellent QueryWikidataR package.

  • A bug in printing returned objects is now fixed.


  • You can now retrieve multiple random properties or items with get_random_item and get_random_property


  • Various documentation and metadata improvements.


  • Fix a bug in get_* functions due to a parameter name mismatch
  • Print methods added by Christian Graul


  • This is the initial release! See the explanatory vignettes.

Reference manual

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


2.3.1 by Thomas Shafee, 3 months ago

Report a bug at

Browse source code at

Authors: Thomas Shafee [aut, cre] , Oliver Keyes [aut, cre] , Serena Signorelli [aut, cre] , Alex Lum [ctb] , Christian Graul [ctb] , Mikhail Popov [ctb]

Documentation:   PDF Manual  

Task views: Web Technologies and Services

MIT + file LICENSE license

Imports httr, jsonlite, WikipediR, WikidataQueryServiceR, tibble, dplyr, stringr, Hmisc, progress, pbapply, stats, readr, crayon, utils

Suggests markdown, testthat, tidyverse, knitr, pageviews

Imported by tidywikidatar, wikitaxa.

Suggested by WikipediR, pageviews.

See at CRAN