data graph on desktop computer

Streamline Your Data for Faster Growth

Connect to your data-driven future with Streamdata.io β€” we help businesses increase efficiency and revenue by turning existing API into event-driven streaming API.

Get Started For Free Today

Streamdata.io Enhances Businesses Across All Industries

Discover how our serverless, scalable, and cost-effective product can better serve your business.

Data Providers

data_providers

Generate new revenue from your existing API through our scalable, secure, and cost effective service.

Data Providers

data_providers

Generate new revenue from your existing API through our scalable, secure, and cost effective service.

Devices & Desktop

data_consumers

Take advantage of streaming to create more effective interfaces and increase user engagement.

Devices & Desktop

data_consumers

Take advantage of streaming to create more effective interfaces and increase user engagement.

Machine Learning

machine_learning

We empower data scientists by allowing them to take advantage of any API to feed their models with events.

Machine Learning

machine_learning

We empower data scientists by allowing them to take advantage of any API to feed their models with events.

How Streamdata.io Works

Without Streamdata.io

graph of polling between API and clients

Every time a client needs data from an API, it has to be requested to the server. This request-response mechanism is called polling.

With Streamdata.io

graph of Streamdata.io receiving data from API and sending data to clients

Data updates are dynamically pushed to the clients whenever available on the API, making the whole process more efficient.

alert(β€˜? For Developers, By Developers’)

Go beyond the basics of Streamdata.io and find out how it works in more detail.

Developers
JS logo
Cpp logo
iOS logo
Android logo
Node.js logo
RX logo
Python logo
.NET logo
JavaScript
var eventSource = streamdataio.createEventSource(targetUrl, appToken, headers);
var data = [];

eventSource.onData(function(snapshot) {
    data = snapshot;
})
.onPatch(function(patch) {
    jsonPatch.applyPatch(data, patch);
});
Github icon See it on GitHub
Copied to clipboard Copy to clipboard
C++
bool success = sse.LoadEvent(eventStr);
CkString evName;
evName.append(sse.eventName());
CkString evData;
evData.append(sse.data());
if (evData.isEmpty() != true) {
	if (evName.equals("data")) {
		jData = json::parse(evData.getString());
	}
	else if (evName.equals("patch")) {
		json jPatch;
		jPatch = json::parse(evData.getString());
		jData = jData.patch(jPatch);
	}
}
Github icon See it on GitHub
Copied to clipboard Copy to clipboard
iOS
(void)eventSource:(TRVSEventSource *)eventSource didReceiveEvent:(TRVSServerSentEvent *)anEvent;
{
    NSError *e;
    if([anEvent.event isEqualToString:@"data"]==TRUE)
    {
        dataObject = [NSJSONSerialization JSONObjectWithData:anEvent.data options:NSJSONReadingMutableContainers error:&e];
    }
    else if ([anEvent.event isEqualToString:@"patch"]==TRUE)
    {
        NSArray *patch =[NSJSONSerialization JSONObjectWithData:anEvent.data options:NSJSONReadingMutableContainers error:&e];
        [JSONPatch applyPatches:patch toCollection:dataObject];
    }
}
Github icon See it on GitHub
Copied to clipboard Copy to clipboard
Android
EventSource eventSource = new EventSource(new URI(targetUrl), new URI(myApi), new SSEHandler(), headers);
private JsonNode data;
private class SSEHandler implements EventSourceHandler {
    public void onMessage(String event, MessageEvent message) throws IOException {
        if ("data".equals(event)) {
            data = Json.mapper.readTree(message.data);
        } else if ("patch".equals(event)) {
            JsonNode patchNode = mapper.readTree(message.data);
            JsonPatch patch = JsonPatch.fromJson(patchNode);
            data = patch.apply(data);
        }
    }
}
Github icon See it on GitHub
Copied to clipboard Copy to clipboard
Node.js
var eventSource = streamdataio.createEventSource(targetUrl, appToken, headers);
var data = [];
eventSource.onData(function(snapshot) {
    data = snapshot;
})
.onPatch(function(patch) {
    jsonPatch.applyPatch(data, patch);
})
Github icon See it on GitHub
Copied to clipboard Copy to clipboard
Reactive Extensions
StreamdataClient.clientRxJavaClient(apiURL, appKey)
    .toFlowable()
    .subscribe(event -> {
        if (event.isSnapshot()) {
          logger.info("INITIAL SNAPSHOT {}", event.getSnapshot());
        } else if (event.isPatch()) {
          logger.info("PATCH {}, SNAPSHOT UPDATED {}", event.getPatch(), event.getSnapshot());
        } else if (event.isError()) {
          logger.warn("WARNING {}", event.getError());
        }
    }, err -> logger.error("Unexpected error occurred in creating the event source", err));

//Java (sans RxJava)
StreamdataClient.createClient(apiURL, appKey)
       .onSnapshot(snaphot -> logger.info("INITIAL SNAPSHOT {}", data))
       .onPatch(patch -> logger.info("PATCH {} SNAPSHOT UPDATED {}", patch, eventSource.getCurrentSnaphot()))
       .onOpen(() -> logger.info("And we are... live!"))
       .open();
Github icon See it on GitHub
Copied to clipboard Copy to clipboard
Python
with requests.get(URL, stream=True, headers=headers) as response:
    client = sseclient.SSEClient(response)
    for event in client.events():
        if event.event == "data":
            data = json.loads(event.data)
        elif event.event == "patch":
            patch = jsonpatch.JsonPatch.from_string(event.data)
            patch.apply(data, in_place=True)
Github icon See it on GitHub
Copied to clipboard Copy to clipboard
.NET
EventSource es = new EventSource(new Uri(targetUrl));
es.EventReceived += new EventHandler<ServerSentEventReceivedEventArgs>((o, e) =>
{
    if (e.Message.EventType == "data") {
        state = JsonConvert.DeserializeObject<MyObject>(e.Message.Data);
    }
    else if (e.Message.EventType == "patch") {
        var operations = JsonConvert.DeserializeObject<List<Operation<MyObject>>>(e.Message.Data);
        var patchDocumentOperations = new JsonPatchDocument<MyObject>(operations);
        patchDocumentOperations.ApplyTo(state);
    }
} 
Github icon See it on GitHub
Copied to clipboard Copy to clipboard

See The Value Over Time

This graph shows you in real time the amount of data exchanged while polling or using Streandata.io. Combining streaming and data optimization, Streamdata.io offers significant value over time in terms of bandwidth usage and associated costs.

https://stockmarket.streamdata.io/v2/prices

Getting Started

Once signed up, you can easily connect an API and immediately begin sending or receiving data updates in realtime. Code samples will help you get started or explore new possibilities.

Get Started

Docs

To learn more about how Streamdata.io works β€” from resources and security to compression and configuration β€” visit our Docs page where our in-house developers explain everything you need to know about optimizing your data streaming.

Learn More