Quake Web Services
GeoNet earthquake information and felt reports can be queried using a variety of web services.
Earthquake Queries in QuakeML
Constructing a QuakeML query
For retrieving individual events in QuakeML use the following URL followed by the earthquake reference number:
- http://magma.geonet.org.nz/services/quake/quakeml/1.0.1/query?externalRef=
For retrieving multiple events in QuakeML use the following URL followed by a set of parameters:
- http://magma.geonet.org.nz/services/quake/quakeml/1.0.1/query?
Query parameters are:
- startDate and endDate (mandatory): format is yyyy-mm-ddThh:MM:ss and times are in UTC (GMT)
- latLower, latUpper, longLower and longUpper (optional, but if present, all must be specified): values should be in decimal degrees
- magnitudeLower and magnitudeUpper (optional, but if present, both must be specified)
- depthUpper and depthLower (optional, but if present, both must be specified): values in km
- stationsLower, phasesLower and errorUpper (optional, but if present, all must be specified): solution quality specifying the minimum number of stations, the minimum number of phases and the maximum standard error
The default download is restricted to QuakeML event, preferred origin and magnitude elements. Three optional flags are available to include additional information:
- includePicksAndArrivals=true (optional): include pick elements, and the preferred origin element will contain arrival elements that each reference one of the picks
- includeAmplitudesAndStationMagnitudes=true (optional): include amplitude elements, and the preferred origin element will contain stationMagnitude elements that each reference one of the amplitudes. In addition, the magnitude element will also contain stationMagnitudeReference elements that reference the stationMagnitudes
- includeMultipleMagnitudes=true (optional): include all magnitude estimates, not just the preferred estimate
Examples of QuakeML queries
Earthquake information for the specified reference number 2737452:
http://magma.geonet.org.nz/services/quake/quakeml/1.0.1/query?externalRef=2737452
Earthquakes that occurred between the dates 2007-05-17 and 2007-05-18 (inclusive):
Earthquakes that occurred between 10:00 on 2008-08-01 and 10:30 on 2008-08-01:
Earthquakes that occurred between 10:00 on 2008-08-01 and 10:30 on 2008-08-01, together with picks, arrivals, amplitudes and magnitudes:
Earthquakes that occurred between the dates 2007-05-17 and 2007-05-19 inclusive, within the bounding box latLower=-45, latUpper=-40, longLower=173, longUpper=176 of magnitude up to 7.5 that occurred up to 180 km depth with at least 5 phases recorded and at least 5 stations and with a standard error maximum of 0.15 seconds:
Potential high volume of returned data
The amount of information available via multi-event QuakeML web services is sizeable. Around a gigabyte of information is available even when events are restricted to a magnitude of 3 or higher and a maximum depth constraint of 40 km is applied. As a general rule, viewing datasets that encompass more than one or two months in a web browser is not recommended. The web service can be streamed to a file using WGET. For example:
wget --output-document='/home/joe/quakeml2008.xml' 'http://magma.geonet.org.nz/services/quake/quakeml/1.0.1/query?startDate=2008-08-01&endDate=2008-08-10'
Earthquake Queries in KML
Using the Quake Search application
KML data sets can be obtained by using the Quake Search application. If you wish to use the web service directly, please read on.
Constructing a KML query
For retrieving one or more events in KML (for display in Google Earth/Maps), use the following URL followed by a set of parameters:
- http://magma.geonet.org.nz/services/quake/kml/2.2/search?
Query parameters are:
- startDate and endDate (mandatory): format is yyyy-mm-dd and times are in UTC (GMT)
or
- numberDays (mandatory): number of days before "now" (ie. 24 hours before now)
- latLower, latUpper, longLower and longUpper (optional, but if present, all must be specified): values in decimal degrees
- magnitudeLower and magnitudeUpper (optional, but if present, both must be specified)
- depthUpper and depthLower (optional, but if present, both must be specified): values in km
- stationsLower, phasesLower and errorUpper (optional, but if present, all must be specified): solution quality specifying the minimum number of stations, the minimum number of phases and the maximum standard error
Examples of KML queries
To retrieve earthquakes that occurred between the dates 2007-05-17 and 2007-05-18 (inclusive):
http://magma.geonet.org.nz/services/quake/kml/2.2/search?startDate=2007-05-17&endDate=2007-05-18
To retrieve earthquakes 7 days back from today:
http://magma.geonet.org.nz/services/quake/kml/2.2/search?numberDays=7
which, if today was March 8 2011, would be equivalent to http://magma.geonet.org.nz/services/quake/kml/2.2/search?startDate=2011-03-01&endDate=2011-03-08.
Earthquakes that occurred between the dates 2007-05-17 and 2007-05-19 inclusive, within the bounding box latLower=-45, latUpper=-40, longLower=173, longUpper=176 of magnitude up to 7.5 that occurred up to 180 km depth with at least 5 phases recorded and at least 5 unique stations and with a standard error maximum of 0.15 seconds:
Felt Report Queries
Constructing a felt report query
For retrieving one or more felt reports in GML (3.1.1 restricted to simple features profile 1.0.0), use the following URL followed by a set of parameters:
- http://magma.geonet.org.nz/services/quake/reports/search?
Query parameters are:
externalRef and agency (both must be specified): always use agency g
or
- startDate and endDate: format is yyyy-mm-dd and times are in UTC (GMT)
Examples of felt report queries
All felt reports for the earthquake with reference number 2737452 and agency g ; both are mandatory for this query type:
http://magma.geonet.org.nz/services/quake/reports/search?externalRef=2737452&agency=g
Felt reports submitted on and after yyyy-mm-dd up to the present day. Note: this link is deactivated in case it returns too much data; please use with care:
http://magma.geonet.org.nz/services/quake/reports/search?startDate=yyyy-mm-dd
Felt reports submitted between 2007-05-17 and 2007-05-18:
http://magma.geonet.org.nz/services/quake/reports/search?startDate=2007-05-17&endDate=2007-05-18
Queries in GeoJSON
Earthquakes
- http://magma.geonet.org.nz/services/quake/geojson/quake?
Query parameters are:
- startDate and endDate (mandatory): format is yyyy-mm-dd and times are in UTC (GMT)
or
- numberDays (mandatory): number of days before and including today
or
- externalRef (mandatory): earthquake reference number
For example:
http://magma.geonet.org.nz/services/quake/geojson/quake?numberDays=14
Felt reports
- http://magma.geonet.org.nz/services/quake/geojson/felt?
Query parameters are:
- startDate and endDate (mandatory): format is yyyy-mm-dd and times are in UTC (GMT)
or
- externalRef and agency (both must be specified): always use agency g
For example:
http://magma.geonet.org.nz/services/quake/geojson/felt?externalRef=2737452&agency=g

