WindsoraiR package for accessing API from R

[This article was first published on П о д а т о ц и, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

I recently got acquainted with – a hub for connecting various sources of marketing data like Facebook ads or Google Analytics. The platform is interesting because it provides ways to analyze and visualize your merged marketing data through template dashboards or to pipe the data to any number of tools (Python, R, Google data Studio, Tableau, etc). In collaboration with the people at, I developed a very simple package to interface with the API.

The new package, called windsoraiR, is available on CRAN and on Github. Its first incarnation is rather simple. I just provide one function to access the API and return the queried data in the form of a data.frame making it super easy to do some additional wrangling, charting or analysis. To access data from the API, one needs to acquire a free API key and set up data sources (this can be pretty much any online channel of marketing data, see more on the website).

As per the Github Readme file, usage is quite straightforward.

We install from CRAN:


Or using remotes or devtools:

# install.packages("remotes")

Once we have the package installed, we can fetch data using winsdoraiR::winsdor_fetch():

winsdor_data <- 
windsor_fetch(api_key = "your api key",
 connector = "all",
 date_preset = "last_7d",
 fields = c("source", "campaign", "clicks",
            "medium", "sessions", "spend"))

This, of course, is work in progress and I would love feedback and ideas for future development. How might one want to query the API and or what helper function might be good to have to process the results in R once data has been pulled? Issues and pull requests are welcomed on Github. By the way, for the python lovers, a python package equivalent to winsdoraiR is also available.

To leave a comment for the author, please follow the link and comment on their blog: П о д а т о ц и. offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)