Localstreamer API Documentation

  1. General info
  2. Mashape API Markplace info
  3. Ip to Country
  4. Geohash
  5. Geolocate text
  6. Static Image Map
  7. Worldtime



General info

Localstreamer provides a set of REST end-points to developers and 3rd parties. Developers may use these Application Programming Interface (API), services to customize their web-site or applications to their end users. Localstreamer's API uses a REST-like interface. This means that the API method calls are made over the internet by sending HTTP GET requests to our server and the response is returned as JSON String. Every modern programming framework provides methods for communicating over HTTP with a REST server, so you can select PHP, .NET, Java, Python, Ruby and more.. In order to get started, you will need to request an API key to use with Localstreamer services. This is necessary so we can track general usage, and also tell us if someone is abusing it. The use of these API is at your own risk. We make no warranty that these services will be uninterrupted, timely, secure, or error-free. We are not responsible for any damages or losses that occur as a result of the use of (or inability to use) our API. [^]


Mashape Api Marketplace info

Localstreamer api now available in the Mashape Api Marketplace read the tutorial: here. [^]


Geohash

The geohash is a hash function for geolocation coordinates invented by Gustavo Niemeyer (not to be confused with the xkcd Spontaneous Adventure Generation algorithm of the same name). A geohash string encodes latitude/longitude pairs in a compact form, wikipedia gives a reasonable explanation of how geohashes work (read more...) essentially the latitude and longitude are encoded as alphanumeric string. For example the decimal coordinates of the city Rome are latitude:41.8954656 longitude:12.4823243 the corrispective geohash is sr2yk4c6g0zdg.

Localstreamer uses geohash algorithm for Geotagging informations by adding geographical identification metadata in the publish news or event function. We have build our json webservice that you can use to encode latitude/longitude decimal points. [^]


Geolocate text

Geolocate text is a geoparsing Web service. It helps developers by extracting from a given short text a countrycode, a language and a latitude/longitude pair. It is a very experimental webservice that try to create geo metadata from simple short text. For example for a webservice call with a given text like this:

"Il viaggio intorno al mondo in 80 giorni, un avventuroso romanzo dell'autore francese Jules Verne."

The webservice answer with this json string {"countrycode":"it","language":"Italian","lat":"41.9","lng":"12.4833","success":"true"} The api identify the country and the language, it gives also in the result the latitude and longitude of one city of the state or the average. In the previuos example, the webservice answers with Rome coordinates because the text uses Italian language.

The following languages are supported: Arabic, Catalan, Croatian, Czech, Dutch, Danish, English, Esperanto, Farsi, Finnish, French, German, Greek, Hebrew, Hindi, Hungarian, Italian, Norwegian, Polish, Portuguese, Romanian, Russian, Slovenian, Slovak, Spanish, Swedish, Turkish. [^]


Ip to Country

Geolocation IP Address to Country State. This API uses an IPv4 (version 4) address to identify the geographical location (country). This is very usefull in situations like you have to redirect web pages based on country , target advertising , build web log statistics or you want to apply a spam filter on your web site.

After invoking this API you will have as result:

* The flag icons are available for free use for any purpose with no requirement for attribution at Famfamfam.com

Learn how to access to this Api. [^]

Static Image Map

You can find on Internet a lot of mapping services available these days. There are plenty of free mapping tools, but which to use? These services let you embed static maps of different types in your web pages. Static map api usually is very simple , it takes latitude and longitude place as parameter, along with other optional formatting params and delivers a static image to the request client. Developers dont need to put into the project page complex javascript files when they use a static image as map, you can embed such static maps by specifying the url as a 'src' attribute of tag. This service offer static map url using a wrapper.This API is a wrapper implementation to obtain valid static map url from different map providers. You create a static map by adding an image to your HTML page. Then, by specifying a bunch of parameters in the API querystring, you can set the image size, zoom level, and some other parameters. One of the most important parameter is the 'provider', this is the list of avaliable

The response of this service give you the url of the static image map for the selected map provider and the url of terms of service for the requested map, this should be checked prior to using it. Learn how to access to this Api. [^]


Worldtime

The service enables you to obtain the current local time for any place in the world by specifying the decimal coordinates latitude/longitude pair and a data display pattern. A pattern example maybe this yyyy-MM-dd HH:mm:ss where

as specified in the ISO 8601 standard. [^]