redcapAPI: Access data, meta data, and files from REDCap using the API


REDCap is a database development tool built on MySQL. Visit for more information. REDCap provides an API through which data, the data dictionary, files, and project information can be accessed. The redcapAPI package facilitates the use of these functions and simplifies the work needed to prepare data for analysis.


As much as possible, I've tried to adequately document redcapAPI. Some topics did not seem well-suited to documenting in the typical R help files. Additional tips and discussion are available at the package wiki at These topics include "Getting started with redcapAPI", "Setting Rights to Grant API Access", "Export data from REDCap" and a detailed description of the REDCap API parameters and how they are implemented in R. I expect most documentation improvements to be placed on the wiki.

Please refer to your institution's REDCap API documentation as a primary resource of what is available. Different versions of REDCap support different features–your REDCap API documentation will address the features specific to your version of REDCap.

redcapAPI wouldn't be possible without the efforts of Jeffrey Horner, Will Gray, and Jeremy Stevens at Vanderbilt University. Their work in developing the redcap package ( was invaluable in helping me understand the API. A few of their functions (redcapConnection, fieldToVar, exportMetaData, and exportRecords) are included in redcapAPI largely unaltered.

Many thanks also go to Will Beasley of University of Oklahoma for his development of the REDCapR package Will introduced me to the httr package–which improved the use of messages from the API–and to the idea of batching API calls to reduce the likelihood of servers timing out.

Questions? Problems? Suggestions? or email at

All documentation is copyright its authors; we didn't write any of that.