Streams

A Real Time Streaming News API Using Server Sent Events (SSE)

Real Time Streaming Of A News API With SSEI am working my through the most obvious use cases for Streamdata.io. Things like currency, bitcoin, and now I’ve made my way to news and media. Making news real time and streaming is a pretty obvious use case, however there aren’t really that many news publications that have available news API. New York Times, The Guardian, and USA Today have APIs, but the majority of news publications haven’t gotten on the API bandwagon. It seems like a no brainer to me, but for some reason news publishers just do not see the benefits of going API first.

Luckily there is someone who has done the hard work to aggregate news APIs, and make a dead simple, yet a very powerful API available, simply called the News API. We took the News API and proxied with Streamdata.io, and published a simple HTML page that updates regularly using Server-Sent Events (SSE) and JSON Patch. It is a pretty simple example of what is possible, and pulls from the latest news feeds from the entire United States, but gets the idea across regarding what you can do with the News API and Streamdata.io.

I leave it to you to find the solutions for this type of streaming news. We are just hear to provide you with the proxy service. We are also going to reach out to the News API and see about setting up a reseller agreement, and see if we can include the real time streaming news feed in the gallery we are working on. We are working to profile the highest value APIs, and establish reseller agreements with them to make available as part of a streaming data catalog. We are still quite a ways off from having the catalog fully fleshed out, but are looking to generate interest around not just real time streaming services, but also participating in a quality stack of real time streaming data sources.

To get up and running with your own version of the streaming news API, just head over to newsapi.org and get your own key. Then sign into your Streamdata.io account, create a new application, and plug the News API path (http://newsapi.org/v2/top-headlines) into the quick test, with your apiKey parameter. Then you can grab the quick command line script, or use one of the other SDKs to stream real time news on the web using JavaScript, IOS, or Android.

**Original source: streamdata.io blog