ThingSpeak MQTT API

Lightweight pub/sub MQTT broker at `mqtt3.thingspeak.com` over TCP (1883), TLS (8883), WebSocket (80), and secure WebSocket (443, path `/mqtt`). Publish to `channels/{channelID}/publish` and subscribe via `channels/{channelID}/subscribe/fields/field{n}/{readAPIKey}`. QoS 0 only; connections time out after one hour of inactivity. Devices use MQTT-specific Client ID / Username / Password credentials provisioned in ThingSpeak.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/thingspeak-mqtt-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

AsyncAPI Specification

thingspeak-mqtt-asyncapi.yml Raw ↑
asyncapi: 2.6.0
info:
  title: ThingSpeak MQTT API
  version: '1.0'
  description: |
    ThingSpeak's MQTT broker at `mqtt3.thingspeak.com`. Devices publish channel
    updates and subscribe to channel/field feeds using MQTT credentials (Client ID,
    Username, Password) provisioned in the ThingSpeak portal.

    Available transports:
    - TCP on port 1883 (unencrypted)
    - TCP on port 8883 (TLS)
    - WebSocket on port 80 (path `/mqtt`, unencrypted)
    - WebSocket on port 443 (path `/mqtt`, TLS)

    QoS 0 only. Connections time out after one hour of inactivity.
servers:
  production-tcp:
    url: mqtt3.thingspeak.com:1883
    protocol: mqtt
    description: Production MQTT broker (unencrypted TCP).
  production-tcp-tls:
    url: mqtt3.thingspeak.com:8883
    protocol: mqtts
    description: Production MQTT broker (TLS TCP).
  production-ws:
    url: mqtt3.thingspeak.com:80/mqtt
    protocol: ws
    description: Production MQTT broker (unencrypted WebSocket).
  production-wss:
    url: mqtt3.thingspeak.com:443/mqtt
    protocol: wss
    description: Production MQTT broker (TLS WebSocket).
channels:
  channels/{channelID}/publish:
    description: Publish multi-field updates to a channel. Payload is form-encoded
      (`field1=value&field2=value&status=...`).
    parameters:
      channelID:
        schema:
          type: integer
    publish:
      operationId: publishChannelFeed
      message:
        $ref: '#/components/messages/ChannelUpdate'
  channels/{channelID}/publish/fields/field{fieldNumber}:
    description: Publish a single field's value.
    parameters:
      channelID:
        schema:
          type: integer
      fieldNumber:
        schema:
          type: integer
          minimum: 1
          maximum: 8
    publish:
      operationId: publishFieldValue
      message:
        $ref: '#/components/messages/FieldValue'
  channels/{channelID}/subscribe/fields/field{fieldNumber}/{readAPIKey}:
    description: Subscribe to a specific field on a channel. Requires the channel's
      Read API Key in the topic.
    parameters:
      channelID:
        schema:
          type: integer
      fieldNumber:
        schema:
          type: integer
          minimum: 1
          maximum: 8
      readAPIKey:
        schema:
          type: string
    subscribe:
      operationId: subscribeFieldFeed
      message:
        $ref: '#/components/messages/FieldValue'
  channels/{channelID}/subscribe/json/{readAPIKey}:
    description: Subscribe to all channel updates as JSON.
    parameters:
      channelID:
        schema:
          type: integer
      readAPIKey:
        schema:
          type: string
    subscribe:
      operationId: subscribeChannelFeedJson
      message:
        $ref: '#/components/messages/ChannelUpdateJson'
components:
  messages:
    ChannelUpdate:
      contentType: application/x-www-form-urlencoded
      payload:
        type: string
        example: field1=23.5&field2=45.2&status=ok
    FieldValue:
      contentType: text/plain
      payload:
        type: string
        example: '23.5'
    ChannelUpdateJson:
      contentType: application/json
      payload:
        type: object
        properties:
          channel_id:
            type: integer
          created_at:
            type: string
            format: date-time
          entry_id:
            type: integer
          field1:
            type: string
          field2:
            type: string
          field3:
            type: string
          field4:
            type: string
          field5:
            type: string
          field6:
            type: string
          field7:
            type: string
          field8:
            type: string
  securitySchemes:
    MqttUserPassword:
      type: userPassword
      description: MQTT device credentials (Client ID, Username, Password) created
        in the ThingSpeak portal under Devices > MQTT.