Scrapes Data from Fitbit

Scrapes data from Fitbit <>. This does not use the official API, but instead uses the API that the web dashboard uses to generate the graphs displayed on the dashboard after login at <>.

This package scrapes data from
It only works if you use email / password to login. Not sure about facebook or google login.


cookie <- login(email="", password="mypassword")  
# 15_min_data "what" options: "steps", "distance", "floors", "active-minutes", "calories-burned"   
df <- get_intraday_data(cookie, what="steps", date="2015-01-21")  
ggplot(df) + geom_bar(aes(x=time, y=data, fill=data), stat="identity") + 
             xlab("") +ylab("steps") + 
                   panel.grid.major.x = element_blank(), 
                   panel.grid.minor.x = element_blank(), 
                   panel.grid.minor.y = element_blank(), 
                   panel.grid.major.y=element_line(colour="gray", size=.1), 
# daily_data "what" options: "steps", "distance", "floors", "minutesVery", "caloriesBurnedVsIntake"   
df <- get_daily_data(cookie, what="steps", start_date="2015-01-13", end_date="2015-01-20")  
ggplot(df) + geom_point(aes(x=time, y=data))  
  • get_activity_data() - end_date now works. Start_date removed.


  • added vignette
  • switch from RJSONIO to jsonlite
  • use real URL in DESCRIPTION
  • added <> around URLs in DESCRIPTION
  • added methods and utils to imports in DESCRIPTION
  • added corresponding methods:: and utils:: in code
  • changed get_activity_data() function to have a working end_date.
  • pull request #7 calories burned vs intake
  • pull request #5 Add check.names=T for creating data.frames
  • pull request #4 slight changes to sleep variable names
  • pull request #3 Update login.R
  • added get_activity_data() function
  • added "getRestingHeartRateData" to get_daily_data() function
  • added rememberMe parameter to login function
  • merged pull request #2, a change to the login function
  • Changed the API calls to match changes on fitbit end of things.
  • Added get_sleep_data()
  • Added get_premium_export()
  • Changed output column of get_daily_data(), get_15_min_data(), and get_weight_data() to correspond to the data type requested... for example: "weight" instead of "data"", "steps" instead of "data"
  • Added heart-rate for get_15_min_data() and get_daily_data()
  • added get_intraday_data()
  • Deprecated get_15_min_data(), use get_intraday_data() instead
  • Basic checks included for arguments
  • tz added to the return dataframes as.POSIXct date field
  • documentation cleanup
  • No error checking
  • Three functions: login, get_daily_data, get_15_min_data

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.8 by Cory Nissen, 9 months ago

Browse source code at

Authors: Cory Nissen <> [aut, cre]

Documentation:   PDF Manual  

Task views: Web Technologies and Services

MIT + file LICENSE license

Imports httr, stringr, jsonlite, methods, utils

Suggests knitr, rmarkdown, ggplot2, ggthemes

Imported by lifelogr.

See at CRAN