GetEarthquakeProbability API

For a specified location, the GetEarthquakeProbability API returns:

  1. The latitude and longitude of the location.

  2. The current expected rate of earthquakes of specified magnitude over a specifiec time window.

  3. The current exptected probability of experiencing at least one such earthquake.

The GetEarthquakeProbability Web Service is located at:
http://api.openhazards.com/GetEarthquakeProbability.xml.

The parameters of the API are:

Parameter Description Required
q The geographical location to query.  This can be a city name, street adress, etc.  The parameter type is a text string. Yes
w The calculation window (in days) for the forecast. The parameter type is an integer.  Default value: 365 (1 year). No
m The magnitude threshold for the forecast. The parameter type is a float.  Default value: 6.0. No
r The calculation radius (in km) for the forecast. The parameter type is an integer.  Default value: 50 (approximately 31 miles) . No

The results returned by the API are:

Parameter Description
location

The resulting parsed location for the calculation:

  • place
  • lat
  • lng
  • radius
forecast

The calculation results:

  • window
  • mag
  • rate
  • prob

Messages and Codes:

The following table summarizes possible return codes from the API:

Error Code Description Resolution
0 No location was specified Check if you have provided a geographical location in your API call.
1 Location could not be found Check the provided geographical location for spelling mistakes.

Flag icon for 'fr' languageFlag icon for 'zh-CN' languageFlag icon for 'es' languageFlag icon for 'ja' languageFlag icon for 'de' languageFlag icon for 'it' languageFlag icon for 'tr' language

Search