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 <>.

New changes:

  • Added minutesSedentary data to 'get_daily_data'
  • fixed bug in the column names in ‘get_daily_data’ for getTimeInHeartRateZonesPerDay
  • if login returns a cookie that is character(0), throw error

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="[email protected]", 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))  


fitbitScraper 0.1.8

  • added minutesSedentary data to 'get_daily_data' (14)
  • fixed bug in the column names in 'get_daily_data' for getTimeInHeartRateZonesPerDay (9) (13)
  • if login returns a cookie that is character(0), throw error (10)

fitbitScraper 0.1.7

  • added vignette

fitbitScraper 0.1.6

  • switch from RJSONIO to jsonlite

fitbitScraper 0.1.5

  • 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

fitbitScraper 0.1.4

  • 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

fitbitScraper 0.1.3

  • Changed the API calls to match changes on fitbit end of things.

fitbitScraper 0.1.2

  • 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

fitbitScraper 0.1.1

  • Basic checks included for arguments
  • tz added to the return dataframes as.POSIXct date field
  • documentation cleanup

fitbitScraper 0.1

  • 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, 3 years ago

Browse source code at

Authors: Cory Nissen <[email protected]> [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