Hans on IoT

ThingSpeak, MATLAB, and the Internet of Things

Accessing Historical Data on a ThingSpeak Channel 2

Posted by Hans Scharler,

We have recently received a few email about accessing historical data. We even noticed some posts on other forums asking about older data.

All ThingSpeak Channels are continuous logs of data. Using API commands, you can access recent data and historical data. The default API parameters allow for easy access to recent data. To get access to older data, all you need to do is pass in a “start” and “end” parameter into a channel request.

Here is my feed from New Year’s Eve:


And remember, you can also do this with charts too:


Let us know if you need any more clarification on the many API parameters possible. Have fun!

PS. Some big features coming soon!

2 CommentsOldest to Newest

Paul Effting replied on : 1 of 2
I just want to read back the latest data of one single chart (e.g. the last stored temperature to tingspea to chart 1) How to do this?
Hans Scharler replied on : 2 of 2
Hi Paul, The charts API has this form: http://api.thingspeak.com/channels/9/charts/FIELDNUMBER?start=2011-12-31%2000:00:00&end=2012-01-01%2000:00:00&average=60 Field 1: http://api.thingspeak.com/channels/9/charts/1?start=2011-12-31%2000:00:00&end=2012-01-01%2000:00:00&average=60 Field 2: http://api.thingspeak.com/channels/9/charts/2?start=2011-12-31%2000:00:00&end=2012-01-01%2000:00:00&average=60