Main Content

Read Data from Channel

Use the REST and MQTT APIs to read channels using software or devices

ThingSpeak™ is an IoT platform that uses channels to store data sent from apps or devices. You can read data from your ThingSpeak channels using the HTTP calls and the REST API. You can use the MQTT subscribe method to receive messages whenever the channel is updated. And you can use thingSpeakRead to read data from your channel in desktop MATLAB. Learn more about when to Choose Between REST API and MQTT API to update a channel.

REST API

expand all

Read DataRead data from all fields in channel with HTTP GET
Read FieldRead data from single field of channel with HTTP GET
Read StatusRead status field of channel with HTTP GET
Read Last EntryRead last entry in channel with HTTP GET
Read Last Field EntryRead last entry in channel field with HTTP GET
Read Last StatusRead last status of channel with HTTP GET
Read Last Entry AgeRead number of seconds since last entry in channel with HTTP GET
Read Last Field Entry AgeRead number of seconds since last entry in field with HTTP GET

MQTT API

expand all

Subscribe to a Channel FeedSubscribe to updates from channel feed with MQTT
Subscribe to a Channel Field FeedSubscribe to channel updates from specific field of channel with MQTT

Functions

expand all

thingSpeakReadRead data stored in ThingSpeak channel (Since R2019a)

Topics

Choose How to Read Data

Read Data with Arduino or Particle Photon

Read Data with ESP8266

Read Data with ESP32

Troubleshooting

Error Codes

See the details of ThingSpeak REST API error messages and corresponding HTTP status codes.

Troubleshoot MQTT Subscribe

Common mistakes and problem resolution for subscribing to ThingSpeak.