You can integrate Streetics using a Badge or through the REST API.

Badge

Streetics Badge Integration Sample

This is the easiest way to integrate with Streetics. It takes less than a minute! Just copy&paste the badge code. Don't forget to change the relevant parameters.

Parameters:

  • Latitude (i.e. 38.7022294);
  • Longitude (i.e. -9.1929003);
  • Radius in meters (i.e. 250).

Code

Inside the HEAD section.
<head>
...
<script type='text/javascript' src='http://streetics.com/Streetics/web/bundles/streetics/js/streetics.script.js'></script>
...
</head>
<body>
...
Inside the BODY section.
<body>
...
<div>
<script type="text/javascript">
    streetics_placeholder_area("div_id", "38.7022294", "-9.1929003", "250");
</script>
</div>
...
</body>

API

The Streetics API currently supports the following REST methods:
GET Methods URL Description
Street Rank Score /streetrank/score Returns the StreetRank® score by streetid.
Area Rank Score /streetrank/area Returns the average StreetRank® score from a geographical area.
Area Rank Top /streetrank/area/top Returns the highest StreetRank® score and streetid from a geographical area.

Response Codes

  • OK = 200
  • BAD_REQUEST = 400
  • UNAUTHORIZED = 401
  • FORBIDDEN = 403
  • NOTFOUND = 404
  • INTERNAL_ERROR = 500
  • SERVICE_UNAVAILABLE = 503
  • NOT_MODIFIED = 304

AppId

All API methods require an AppId key. To get an AppId key, please send an email to support@streetics.com.

The AppId provided in the samples can only be used for testing purposes, please get your AppId if you intend to use the API.

Street Rank Score

https://streetics.com/api/v1/streetrank/score/streetid={streetid}&appid={appid}.{_format}
https://streetics.com/api/v1/streetrank/score/streetid={streetid}&appid={appid}

Parameters
streetid:integer
appid: AppId Key
_format (optional): xml || json

Sample call
https://streetics.com/api/v1/streetrank/score/streetid=1&appid={appid}

Returns
{"streetrank":"7.42"}

Area Rank Score

https://streetics.com/api/v1/streetrank/area/lat={lat}&lng={lng}&radius={radius}&appid={appid}.{_format}
https://streetics.com/api/v1/streetrank/area/lat={lat}&lng={lng}&radius={radius}&appid={appid}

Parameters
lat: latitude value
lng: longitude value
radius: in meters
appid: AppId Key
_format (optional): xml || json

Sample call
https://streetics.com/api/v1/streetrank/area/lat=38.7022294&lng=-9.1929003&radius=250&appid={appid}

Returns
{"areaRank":"7.42"}

Area Rank Top

https://streetics.com/api/v1/streetrank/area/top/lat={lat}&lng={lng}&radius={radius}&factors={factors}.&appid={appid}{_format}
https://streetics.com/api/v1/streetrank/area/top/lat={lat}&lng={lng}&radius={radius}&appid={appid}

Parameters
lat: latitude value
lng: longitude value
radius: in meters
appid: AppId Key
factors (optional): Y || N
_format (optional): xml || json

Sample call
https://streetics.com/api/v1/streetrank/area/top/lat=38.7022294&lng=-9.1929003&radius=250&appid={appid}

Returns
{"streetid":"1","streetrank":"7.42"}