The Ably API Streamer makes it easy and cost-effective for organizations and developers to offer realtime APIs, at any scale. It provides a unified solution for publishing, managing and distributing realtime data via open protocol APIs, all built on the global Ably Platform. From live sports scores to financial market data, mobility IoT data such as GPS locations, and SaaS integration updates, API Streamer can be used to seamlessly distribute and consume realtime data.

You can consume data streams using the API Streamer either by following a direct invitation from a data producer (mostly applicable for commercial and private streams) or by subscribing to an open data stream of a product listed on the Ably Hub, a marketplace for streaming data sources. Once you have a subscription to a product, you can integrate the data into your own apps and projects.

Ably supports two subscription models to consume streams of data:

  • Pull Subscription Protocols are used by clients that connect to Ably and explicitly subscribe to streams on-demand. Protocols such as MQTT, SSE, or Ably’s realtime protocol, are all Pull based protocols as clients initiate the connection to Ably and request a subscription to a stream of data from the Ably service.
  • Push Subscription Protocols are outbound streams to third party systems that are initiated when data is published on a channel. Push Subscription protocols are often used where it is not practical to consume data on-demand, typically when the volumes of messages or channels are high, and complexity for the subscriber increases. Ably’s Push Subscription Protocols are offered through the Ably Integrations, and enable developers to stream data into their streaming or queuing services such as AMQP (RabbitMQ), Amazon SQS or Amazon Kinesis. They can also be used to trigger serverless functions across all popular cloud providers.

API Streamer Consumer options

To subscribe to a product, you’ll need to know how channel names work in the API Streamer. A channel name is made up of producer credentials combined with the topic that the data represents. As an example, for the product trains from the company train-company, where they’re publishing data to their channel underground, would make up the channel [product:train-company/trains]underground. In most cases the producer of the data will have channel names directly listed in their documentation.

To start consuming data streams, you can log into the API Streamer’s consumer dashboard. In the Subscriptions tab, you’ll see a list of all the products that you have access to. You can view any product for more information about the producer offering that product, as well as the documentation on how to use that product. One of the key things you need from the documentation is the channel names to which the data streams are being published.

As a consumer, you simply need to subscribe to this channel with either a Pull Subscription Protocol or a Push Subscription Protocol explained previously.

To manage the data from the products you have access to easily, you can set up any number of apps in your apps dashboard. By default, all the Ably accounts come with two pre-loaded apps called ‘Production’ and ‘Sandbox’. If you are just trying out the API Streamer for the first time, we recommend you use the ‘Sandbox’ app to get up and running quickly.

In order to use the Ably client SDKs, your client devices will need to authenticate with Ably first. You can simply use the API key which you can obtain from the app you wish to use, also called Basic Auth mechanism or set up an auth server so your client devices can use the Token Auth mechanism. Tokens are short lived and hence more secure in cases where embedding API Keys on the client-side code isn’t feasible. Learn more about the various authentication mechanisms in Ably.

The following code snippets show examples of subscribing to the streaming data channels using Ably’s Client SDKs using basic authentication for simplicity. Note: You can choose the language of your choice from the navbar on the top of this page to see an example in that language.

var realtime = new Ably.Realtime('YOUR-API-KEY-OR-TOKEN'); var channel = realtime.channels.get('CHANNEL-NAME-FROM-PRODUCT-DOCS'); channel.subscribe(function(message) { alert('Received: ' +; });

You are currently in the consumer page of the API Streamer documentation. You can read more about: