Welcome to api.geonet.org.nz. The data provided here is used for the GeoNet web site and other similar services.
The GeoNet project makes all its data and images freely available. Please ensure you have read and understood our Data Policy and Disclaimer before using any of these services.
API queries may be versioned via the Accept header. Please specify the Accept
header for your request exactly as specified for the endpoint query you are using.
If you don't specify an Accept header with a version then your request will be routed to the current highest API version of the query.
Taking advantage of the API versioning will pay dividends in the future for any client that you write. We use the jq command for JSON pretty printing etc. A curl command might look like:
curl -H "Accept: application/vnd.geo+json;version=2" "http://...API-QUERY..." | jq .
You may also be able to find a browser plugin to help with setting the Accept header for requests.
The response for a query can be compressed. If your client can handle a compressed response then the reduced download size is a great benifit. Gzip compression is supported. You can request a compressed response by including gzip
in your Accept-Encoding
header.
If you believe you have found a bug, please raise an issue on our Help repository.
Retrieve shaking intensity information.
[GET] /intensity?type=(measured|reported)[&aggregation=(max|median)][&publicID=(publicID)]
application/vnd.geo+json;version=2
reported
or measured
. If publicID
is not specified the information is for the last 60 minutes.type=reported
.type=reported
.GeoJSON features with the following properties for both reported
and measured
queries.
For measured
queries the addtional GeoJSON properites
As well as a summary of report counts by MMI.
Retrieve strong motion information for specified quake.
[GET] /intensity/strong/processed/(publicID)
application/json
GeoJSON data containing quake information and strong motion data from stations:
A simple JSON feed of GeoNet news.
[GET] /news/geonet
application/json;version=2
No query parameters are required.
JSON with the following properties
Information for a single quake
[GET] /quake/(publicID)
application/vnd.geo+json;version=2
2014p715167
GeoJSON features with the following properties:
best
, preliminary
, automatic
, deleted
.Location history for a single quake. Not all quakes have a location history.
[GET] /quake/history/(publicID)
application/vnd.geo+json;version=2
2014p715167
GeoJSON features with the following properties:
best
, preliminary
, automatic
, deleted
.Quake statistics.
[GET] /quake/stats
application/vnd.geo+json;version=2
Returns quakes possibly felt in the New Zealand region during the last 365 days up to a maximum of 100 quakes.
[GET] /quake?MMI=(int)
application/vnd.geo+json;version=2
-1..8
inclusive. -1
is used for quakes that are to small to calculate a stable MMI value for.GeoJSON features with the following properties:
best
, preliminary
, automatic
, deleted
.Information in CAP format for a single quake.
[GET] /cap/1.2/GPA1.0/quake/(ID)
Queries to this endpoint are not versioned by accept header.
The response is a CAP document using the Google Public Alerts CAP v1.0 profile e.g.,
<?xml version="1.0" encoding="UTF-8"?>
<alert xmlns="urn:oasis:names:tc:emergency:cap:1.2">
<identifier>2.49.0.0.554.1.2015p012816.1420493554884741</identifier>
<sender>https://geonet.org.nz</sender>
<sent>2015-01-06T10:32:34+13:00</sent>
<status>Actual</status>
<msgType>Alert</msgType>
<scope>Public</scope>
<info>
<language>en-NZ</language>
<category>Geo</category>
<event>Earthquake</event>
<responseType>Monitor</responseType>
<urgency>Past</urgency>
<severity>Moderate</severity>
<certainty>Observed</certainty>
<onset>2015-01-06T10:31:34+13:00</onset>
<expires>2015-01-08T10:32:34+13:00</expires>
<senderName>GNS Science (GeoNet)</senderName>
<headline>Quake 25 km south-west of Arthur's Pass , intensity severe, approx. M6.0, depth 5 km Tue Jan 06 2015 10:31 PM (NZDT).</headline>
<description>A magnitude 6.0 earthquake occurred 25 km south-west of Arthur's Pass, New Zealand at Tue Jan 06 2015 10:31 PM (NZDT). The quake was 5.1 kilometres deep and the intensity was severe close to the quake. The quake may have been felt in Arthur's Pass, Hokitika, Greymouth, Methven and surrounding localities.</description>
<instruction>During an earthquake, if you are inside a building, move no more than a few steps, then Drop, Cover and Hold. Stay indoors until the shaking stops and you are sure it is safe to exit. If you are outdoors when the shaking starts, move no more than a few steps away from buildings, trees, streetlights and power lines, then Drop, Cover and Hold. After an earthquake, listen to your local radio stations as emergency management officials will be broadcasting the most appropriate advice for your community and situation. Expect to feel aftershocks. If you are in a damaged building, try to get outside and find a safe, open place. Use the stairs, not the elevators.</instruction>
<web>https://geonet.org.nz/quakes/2015p012816</web>
<contact>info@geonet.org.nz</contact>
<parameter>
<valueName>PublicID</valueName>
<value>2015p012816</value>
</parameter>
<parameter>
<valueName>Time</valueName>
<value>2019-11-20T15:48:04+13:00</value>
</parameter>
<parameter>
<valueName>LatitudeLongitude</valueName>
<value>-43.06,171.25</value>
</parameter>
<parameter>
<valueName>Depth</valueName>
<value>5</value>
</parameter>
<parameter>
<valueName>Magnitude</valueName>
<value>6.0</value>
</parameter>
<parameter>
<valueName>Locality</valueName>
<value>25 km south-west of Arthur's Pass, 40 km south-east of Hokitika, 65 km south of Greymouth, 70 km north-west of Methven</value>
</parameter>
<parameter>
<valueName>Quality</valueName>
<value>best</value>
</parameter>
<parameter>
<valueName>Intensity</valueName>
<value>severe</value>
</parameter>
<parameter>
<valueName>MMI</valueName>
<value>8.0</value>
</parameter>
<area>
<areaDesc>25 km south-west of Arthur's Pass, 40 km south-east of Hokitika, 65 km south of Greymouth, 70 km north-west of Methven</areaDesc>
<circle>-43.06,171.25 71.3</circle>
</area>
</info>
</alert>
Quake feed with CAP links for alerting.
Feed of quakes in the last 48 hours of intensity moderate or higher in the New Zealand region and a suitable quality for alerting. Links (type application/cap+xml
) to individual quakes in the requested CAP version and profile are included in the returned feed.
[GET] /cap/1.2/GPA1.0/feed/atom1.0/quake
queries to this endpoint are not versioned by accept header.
/cap/1.2/GPA1.0/feed/atom1.0/quake
Returns the current Volcanic Alert Level for volcanoes in New Zealand.
[GET] /volcano/val
application/vnd.geo+json;version=2
GeoJSON features with the following properties:
Returns quakes in the vicinity of a volcano (within a pre-defined region) in the past 60 days.
[GET] /volcano/quake/(volcanoID)
application/vnd.geo+json;version=2
ruapehu
GeoJSON features with the following properties:
best
, preliminary
, automatic
, deleted
.automatic
, reviewed
, duplicate
, deleted
.Returns GeoNet network sensor data.
[GET] /network/sensor
application/vnd.geo+json;version=2
1,2,3,4,5,6,7,8,9,10
, which can be queried from /network/sensor/typeGeoJSON features with the following properties:
/network/sensor?sensorType=2,6&endDate=9999-01-01
Returns GeoNet network sensor details (GNSS marks and FDSN stations).
[GET] /network/fdsn/station
[GET] /network/gnss/mark
application/vnd.geo+json;version=2
GeoJSON features with the detailed information of the mark or station