The Google Fit APIs, including the Google Fit REST API, will no longer be available after June 30, 2025. As of May 1, 2024, developers cannot sign up to use these APIs.
Stay organized with collections
Save and categorize content based on your preferences.
This section demonstrates reading the aggregate daily nutrition from a specific
data source. The response contains a list of buckets (one per 24-hour period),
each with a single dataset and datapoint that contains a field for all recorded
nutrition data types. If no nutrition values exist for a particular time
period, there is no dataset. If more than one meal_type is recorded, the
value will be set to UNKNOWN.
Your app can read the aggregate daily nutrition data for a user by
making a POST request and querying the specified data source. You must
make a separate query for each data source.
If the data source is created successfully, the response is a 200 OK
status code. The response body contains a JSON representation of the data
source, including a datasource.dataStreamId property that you can use as
the data source ID for subsequent requests.