This project contains an R package to interact with the Qualtrics API.
Note that your institution must support API access and that it must be enabled for your account. Whoever manages your Qualtrics account can help you with this. Please refer to the Qualtrics documentation on how to find your API token. You’ll also need your institution-specific base url.
To install this package, execute the following in R:
install.packages("qualtRics")
Or, if you want to install the latest development version, run:
install.packages("devtools")
devtools::install_github("JasperHG90/qualtRics")
Currently, the package contains three functions. It supports fetching a list of courses and their IDs from qualtrics, as well as downloading and reading a survey export.
Note that, while requests will work without a base url, it is desirable that you supply it to the functions. Supplying the correct url will reduce the number of errors you’ll experience. Please refer to the official documentation to find out your institution-specific base url.
Note that you can only export surveys that you own, or to which you have been given explicit administration rights.
Load the package:
library(qualtRics)
Construct the header information:
head <- constructHeader(API.TOKEN = "<yourapitoken>")
Get a data frame of surveys:
surveys <- getSurveys(head, survey_baseurl="https://leidenuniv.eu.qualtrics.com/API/v3/responseexports/") # URL is for my own institution
Export a survey and load it into R:
mysurvey <- getSurvey(surveyID = surveys$id[6], headers = head, base_url = "https://leidenuniv.eu.qualtrics.com/API/v3/responseexports/", verbose = TRUE)
For specific information about the Qualtrics API, you can refer to the official documentation.
Should you encounter any bugs or issues, please report them here
If you have a request (like adding a new argument), please leave it here