API

LocationBox API

GetEarthquakeInfo

GetEarthquakeInfo Service gives information about Earthquakes data based on criterias which you can find below.


Request Parameters


Key: LocationBox user key. (Register for user key)
Cmd: LocationBox service name. (TMCHatInfo)
Typ: Response format. (XML or JSON)
Latitude: Latitude of Earthquake Info.
Longitude: : Longitude of Earthquake Info.
Radius: The radius of the area bounding the search results.

Response Parameters


XML Response

GetEarthquakeInfo response returns in XML format when the Typ parameter is set as "XML".

Below is an example for an GetEarthquakeInfo request which is expected to return a response in XML format .

http://www.locationbox.com.tr/locationbox/services?Key=key&Cmd=GetEarthquakeInfoTyp=XML&Latitude=40.57&Longitude=29.13&Radius=20000

The response will be as following:


<response>
 <transactionid>LBS_50366390</transactionid>
 <status>0</status>
 <count>547</count>
 <avgmagnitude>2.68</avgmagnitude>
 <minmagnitude>2.0</minmagnitude>
 <maxmagnitude>5.0</maxmagnitude>
 <avgdepth>8.51</avgdepth>
 <mindepth>1.0</mindepth>
 <maxdepth>26.61</maxdepth>
</response>

JSON Response

GetEarthquakeInfo response returns in JSON format when the Typ parameter is set as "JSON".

Below is an example for an GetEarthquakeInfo request which is expected to return a response in JSON format .

http://www.locationbox.com.tr/locationbox/services?Key=key&Cmd=GetEarthquakeInfoTyp=JSON&Latitude=40.57&Longitude=29.13&Radius=20000

The response will be as following:


{ "transactionid": "LBS_80898", "status": 0, "count": 547, "avgMagnitude": 2.68, "minMagnitude": 2.0, "maxMagnitude": 5.0, "avgDepth": 8.51, "minDepth": 1.0, "maxDepth": 26.61 }

transactionid: The id of response given by LocationBox Service. Every response can be tracked using transactionid when necessary.
status: Response format. (XML or JSON)

Status Codes
0 -- Success
1 -- Fail

errno: Error code
errdesc: Error definition

Error Codes
10001 Error processing your request. Please try again soon.
Cmd parameter is misspelled/not found.
10011 Error processing your request. Please check the Cmd parameter.
Cmd is not specified.
10012 Error processing your request. Please check the Key parameter.
Key is not specified.
10013 Error processing your request. Please check the Key parameter.
Key is invalid.