Skip to content. Skip to navigation

GeoNet

Sections
Personal tools
Document Actions

Quake Web Services

GeoNet earthquake information and felt reports can be queried using a variety of web services.

Earthquake Queries

URL Construction

All requests use the HTTP GET method and all request URLs start with the hostname and service name:

  • http://magma.geonet.org.nz/services/quake/

For retrieving individual events referenced by a unique identifier, the hostname and service name are followed by the output format and the format version (currently only QuakeML v1.0):

  • quakeml/1.0/

Those components form the base URL:

  • http://magma.geonet.org.nz/services/quake/quakeml/1.0/

For retrieving one or more events, the hostname and service name are followed by the method specification and a question mark:

  • /search?

Those components form the base URL:

  • http://magma.geonet.org.nz/services/quake/search?

An event or set of events can also be obtained in QuakeML (the default), IMS 1.0 and CSV format based on date and/or location and/or depth and/or magnitude and/or quality. Examples are shown below. Valid query parameters are:

  • startDate
  • endDate
  • latLower
  • latUpper
  • longLower
  • longUpper
  • magnitudeLower
  • magnitudeUpper
  • depthUpper
  • depthLower
  • stationsLower
  • stationsUpper
  • errorUpper
  • outputFormat (optional, default QuakeML)

Note: Viewing large datasets in a web browser is not recommended, for example all earthquakes in one year. A web service client that streams the data to a file is a better option.

Sample Individual Event Query

http://magma.geonet.org.nz/services/quake/quakeml/1.0/2737452g
Earthquake information for the specified reference number 2737452 and agency code g; both are mandatory.

Sample Date Query

http://magma.geonet.org.nz/services/quake/search?startDate=2007-05-17&endDate=2007-05-18
Earthquakes that occurred between the dates 2007-05-17 and 2007-05-18 (inclusive). Format is the standard date format ISO-8601 format yyyy-mm-dd. Both startDate and endDate are mandatory.

Sample Spatial Query

http://magma.geonet.org.nz/services/quake/search?latLower=-40.9&latUpper=-40.8&longLower=174.6&longUpper=174.65
Earthquakes that occurred within the bounding box latLower=-40.9, latUpper=-40.8, longLower=174.6, longUpper=174.65; all 4 parameters are mandatory.

Sample Depth and Magnitude Query

http://magma.geonet.org.nz/services/quake/search?depthLower=160&depthUpper=180&magnitudeLower=7.0&magnitudeUpper=7.5
Earthquakes of magnitude 7.0 to 7.5 that occurred between 160 and 180 km depth. Depth or magnitude queries require both upper and lower bounds.

Sample Quality Query

http://magma.geonet.org.nz/services/quake/search?stationsLower=50&phasesLower=70&errorUpper=0.15
Events with at least 70 phases recorded at at least 50 stations and with a error maximum of 0.15.

Sample IMS 1.0 Date Query

http://magma.geonet.org.nz/services/quake/search?startDate=2007-05-17&endDate=2007-05-18&outputFormat=ims
Earthquakes in IMS 1.0 format can be queried as above by the addition of the outputFormat=ims parameter.

Sample CSV Date Query

http://magma.geonet.org.nz/services/quake/search?startDate=2007-05-17&endDate=2007-05-18&outputFormat=csv
Earthquakes in CSV format (ideal for Microsoft Excel) can be queried as above by the addition of the outputFormat=csv parameter. Please refer to the description of the CSV columns for further information.

Sample Simple XML Date Query

http://magma.geonet.org.nz/services/quake/search?startDate=2007-05-17&endDate=2007-05-18&outputFormat=xml
Earthquakes in simple XML format can be queried by the addition of the outputFormat=xml parameter.

Felt Report Queries

URL Construction

All requests use the HTTP GET method and all request URLs start with the hostname and service name:

  • http://magma.geonet.org.nz/services/quake/reports

For retrieving one or more felt reports, the hostname and service name are followed by the method specification and a question mark:

  • /search?

Those components form the base URL:

  • http://magma.geonet.org.nz/services/quake/reports/search?

A set of felt reports can be obtained in GML (3.1.1 restricted to simple features profile 1.0.0) format based on event reference (externalRef and agency) or date. Only reports matched to a valid placename with an associated position (latitude and longitude) values are retrieved. Valid query parameters:

  • externalRef
  • agency
  • startDate
  • endDate
  • outputFormat (optional, default value GML 3.1.1)

Sample Individual Event Query

http://magma.geonet.org.nz/services/quake/reports/search?externalRef=2737452&agency=g
All felt reports for the earthquake with the specified externalRef and agency; both are mandatory.

Sample Date Queries

http://magma.geonet.org.nz/services/quake/reports/search?startDate=yyyy-mm-dd
Note: this link is deactivated in case it returns too much data; please use with care.
Felt reports submitted on and after yyyy-mm-dd up to the present day. Format is standard date format ISO-8601 format yyyy-mm-dd.

http://magma.geonet.org.nz/services/quake/reports/search?startDate=2007-05-17&endDate=2007-05-18
Felt reports submitted between 2007-05-17 and 2007-05-18. Format is standard date format ISO-8601 format yyyy-mm-dd.