# GeoNet NZ Earthquakes — MMI Floor (`spider355/nz-geonet-quakes`) Actor

Recent New Zealand quakes from the public GeoNet list, with an MMI floor. At most 100 quakes from the last 365 days. US$0.001 per result. No coordinates and no felt reports. Not endorsed by Earth Sciences New Zealand, GeoNet, NHC, LINZ, NEMA, or MBIE. Attribution is in the README.

- **URL**: https://apify.com/spider355/nz-geonet-quakes.md
- **Developed by:** [Mitchell](https://apify.com/spider355) (community)
- **Categories:** Other, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$1.00 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## NZ GeoNet quake list (Apify Actor)

MMI floor on the public GeoNet quake list. It sends **one** `GET https://api.geonet.org.nz/quake?MMI=` and writes allowlisted rows. It does not page, and it does not call felt reports, `/intensity`, `/network/`, `/news/`, `/p/`, `/assets/`, quake history, or the full catalogue.

The GeoNet API itself returns **at most 100 quakes from the last 365 days**. This Actor does not add pages and does not sell a decade or a catalogue dump. `truncated` in the run log is true only when that single response contains **100 or more features** (the documented cap was hit). It is not a dataset field. Rows with `quality=deleted` are removed after that check, so the dataset can be shorter than 100 even when `truncated` is true.

**Not endorsed by Earth Sciences New Zealand, GeoNet, NHC, LINZ, NEMA, or MBIE.** The attribution line is the credit. It does not add an endorsement claim. GeoNet logos are not downloaded or embedded.

**Changes from the public list:** an MMI floor is applied (integer -1 through 8); rows with `quality=deleted` are removed; the list is capped at 100 quakes from the last 365 days, not the full catalogue. Coordinates and geometry are not emitted.

**Data source called (default):** `https://api.geonet.org.nz/quake?MMI=3`

`Accept` is `application/vnd.geo+json;version=2`. Fetch uses `redirect: 'error'` (redirects are not followed). The body cap is **8 MiB**.

There is no URL input. `url`, `feedUrl`, `quakeUrl`, and `sourceUrl` are ignored. A process environment override `GEONET_QUAKE_BASE_URL` is accepted only when it is `https://api.geonet.org.nz` and the path is exactly `/quake` (optional `MMI` query, which is then replaced by the input floor). Any other host, path, or query key is rejected. Felt reports, intensity, network, news, `/p/`, and `/assets/` cannot be selected.

### Output fields

Each dataset item is an allowlist. Extra GeoJSON properties are dropped before push. `latitude`, `longitude`, `geometry`, and `coordinates` are never emitted (a point was on the live feature; the build-task allowlist does not include it).

| Field | Description |
|-------|-------------|
| `publicID` | GeoNet public id |
| `time` | Origin time as returned |
| `depth` | Depth as returned (kilometres) |
| `magnitude` | Magnitude as returned |
| `locality` | Place phrase. Not a person name |
| `mmi` | MMI on the feature |
| `quality` | `best`, `preliminary`, or `automatic`. `deleted` is dropped |
| `source` | The `/quake` URL this run called, including the MMI floor |
| `attribution` | Exact line below, on every row |

### Inputs

| Input | Notes |
|-------|--------|
| `mmi` | Integer floor from **-1** through **8** inclusive. Default **3** (the docs example). `9`, `-2`, and non-integers fail the run. The API treats this as a minimum: quakes at or above the floor. |

#### Try this

Floor 5, not the default 3. Still one `GET /quake`. A higher floor keeps the list shorter than the 100-quake cap.

```json
{
  "mmi": 5
}
```

#### Request

`GET https://api.geonet.org.nz/quake?MMI=3`

`Accept: application/vnd.geo+json;version=2`

Non-JSON, non-200, and an unexpected body fail the run. One request only.

A property-name probe on 3 Oct 2026 (PT) used that URL and Accept header. The raw body was not saved. The feature `properties` keys were `publicID`, `time`, `depth`, `magnitude`, `locality`, `mmi`, and `quality`. `geometry.type` was `Point`. The collection had 100 features.

### Attribution

GeoNet content is copyright Earth Sciences New Zealand and is licensed under the Creative Commons Attribution 3.0 New Zealand License (http://creativecommons.org/licenses/by/3.0/nz/). We acknowledge the New Zealand GeoNet programme and its sponsors NHC, Earth Sciences NZ, LINZ, NEMA and MBIE for providing data/images used in this study.

### Notes

- Research's MVP one-liner and the compliance field list included point coordinates. The build-task allowlist does not. The task allowlist wins, so coordinates are omitted.
- Compliance's emit list did not name `source`. The task allowlist includes the source URL, so each row has `source`.
- `quality=deleted` is matched after trim, exact token `deleted`.

### Known limits

- One endpoint only: `GET /quake` on `api.geonet.org.nz`.
- The 100-quake / 365-day cap is the GeoNet API's cap, not a page this Actor can extend.
- No logos. No felt-report fields. No intensity grids. No network metadata. No news.

# Actor input Schema

## `mmi` (type: `integer`):

Minimum Modified Mercalli Intensity. Integer from -1 through 8 inclusive. The GeoNet list returns quakes at or above this floor, from the last 365 days, at most 100 quakes. Default 3 (the docs example). There is no URL input.

## Actor input object example

```json
{
  "mmi": 3
}
```

# Actor output Schema

## `results` (type: `string`):

Allowlisted quake rows from GET /quake. quality=deleted rows are removed. Coordinates and geometry are not included.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "mmi": 3
};

// Run the Actor and wait for it to finish
const run = await client.actor("spider355/nz-geonet-quakes").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "mmi": 3 }

# Run the Actor and wait for it to finish
run = client.actor("spider355/nz-geonet-quakes").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "mmi": 3
}' |
apify call spider355/nz-geonet-quakes --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,spider355/nz-geonet-quakes"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/gyA8lKSIrZMg7MkDD/builds/2Zgn02QmQGqiI5rk2/openapi.json
