# DigitalNZ API API

> DigitalNZ API API on Apizie: 3 endpoints (Run queries against DigitalNZ metadata search service., View metadata associated with a single record., The "More Like This" call returns similar records to the specified ID.) returned as clean JSON through one API key. Send your own provider key in the x-upstream-key header. Call it over REST at https://zieapi.vercel.app/v1/open-data:digitalnz/{endpoint} or from Claude, ChatGPT and Cursor through the Apizie MCP server. Free plan: 1,000 requests a month.

- Project key: `open-data:digitalnz`
- Category: Open Data
- Status: byok
- Source: https://digitalnz.org
- Page: https://zieapi.vercel.app/api/open-data/digitalnz
- OpenAPI: https://zieapi.vercel.app/api/open-data/digitalnz/openapi.json

OpenAPI specification of DigitalNZ's Record API. For more information about the API see [digitalnz.org/developers](https://digitalnz.org/developers). To learn more about the metadata/fields used in the API see the…

## Endpoints

### Run queries against DigitalNZ metadata search service.
`GET https://zieapi.vercel.app/v1/open-data:digitalnz/get-records-format` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| format | string | yes | Note - There is a small difference with some field names in the response between JSON and XML. When a field name has more than one word,… |
| Authentication-Token | string | no | The DigitalNZ API no longer requires a key to access public content. However, if you plan on using the API regularly, expect to be a high… |
| text | string | no | This field enables queries based on one or more search terms and provides the functionality of the main search box on… |
| and[category][] | string | no | These are the same categories that are used across the tabs in [digitalnz.org](https://digitalnz.org/records?text=&tab=Videos) |
| and[content_partner][] | string | no | Allows filtering for records from a particular Content Partner. Examples: `"Ministry for Culture and Heritage"` `"Trove"` `"V.C. Browne &… |
| and[primary_collection][] | string | no | Allows filtering for records from a particular *primary_collection*. Examples: `"Puke Ariki"` `"NZHistory"` `"TAPUHI"` *Tip* - To see a… |
| and[collection][] | string | no | Allows filtering for records from a particular Collection. Collections can be thought of as sub-collections or groupings under… |
| and[usage][] | string | no |  |
| and[subject][] | string | no | Examples: `"Cats"` `"Weddings"` `"climb*"` |
| and[dc_type][] | string | no | Examples: `"Conference item"` `"Magazines"` |
| and[format][] | string | no | Examples: `"Photolithographs"` `"Glass*"` |
| and[placename][] | string | no | This field can be used for text-based location search. For a more advanced coordinate-based search, see the "geo_bbox" field below.… |
| and[creator][] | string | no | Examples: `"Revelle Jackson"` `"Nicholas Chevalier"` `"Rita Angus"` |
| and[title][] | string | no | Examples: `"Pukeko"` `"Club"` `"Break*"`" |
| and[date] | string | no | This field can be useful for querying and sorting (see the 'sort' param further down). But it should be noted that, as with some other… |
| and[year] | string | no | This field allows searching specifically by year. The metadata is derived from the same date information that is searchable and returned… |
| and[decade] | string | no | This field allows searching specifically by decade. The metadata is derived from the same date information that is searchable and returned… |
| and[century] | string | no | This field allows searching specifically by century. The metadata is derived from the same date information that is searchable and… |
| without[{filter_field}] | string | no | All of the above `and[___][]` filters in this document are also able to be used with this syntax to exclude specific matches. For example… |
| and[or][{filter_field}][] | string | no | All of the above `and[___][]` filters in this document are also able to be used with the `and[or][___][]` syntax to allow multi-select… |
| and[is_commercial_use] | boolean | no | Some DigitalNZ partners offer their metadata for use in commercial applications. This content can be identified through the… |
| and[has_large_thumbnail_url] | string | no | Filters results to only those records that have an image available in the *large_thumbnail_url* field. **Note:** There is an issue with… |
| and[has_lat_lng] | boolean | no | Filters results to only those records that have latitude and longitude coordinates present in the metadata. *Tip* - To see the location… |
| geo_bbox | string | no | A geographic bounding box scoping a search to a geographic region. Order of latitude-longitude coordinates is north, west, south, east.… |
| fields | string | no | Comma-separated whitelist of fields to be returned. The syntax *"&fields=verbose"* can be used to return the bulk of the fields, or you… |
| sort | string | no | Used to control the order of the results in conjunction with the *direction* field. - *syndication_date* - is the creation date of the… |
| direction | string | no | Used in conjunction with *sort* to order the results - *asc* - Ascending, oldest first. - *desc* - Descending, newest first. |
| page | integer | no | Specify which page of results to return. |
| per_page | integer | no | The number of records to return per page of search results. |
| facets | array | no | Shows a breakdown of record counts for the specified facets based on the current result set. In the [DigitalNZ search… |
| facets_page | integer | no | This value specifies which page of facet results to return. Allowing pagination through large lists of facet values. |
| facets_per_page | integer | no | The number of facets to return per page of facet results. |
| exclude_filters_from_facets | boolean | no | This field can be used when filtering into some facets, to maintain the context of the wider facet values. A common use case is to allow… |

### View metadata associated with a single record.
`GET https://zieapi.vercel.app/v1/open-data:digitalnz/get-records-record-id-format` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| record_id | integer | yes | Every record has a unique, persistent *record_id*. |
| format | string | yes | Note - There is a small difference with some field names in the response between JSON and XML. When a field name has more than one word,… |
| Authentication-Token | string | no | The DigitalNZ API no longer requires a key to access public content. However, if you plan on using the API regularly, expect to be a high… |
| fields | string | no | Comma-separated whitelist of fields to be returned. The syntax *"&fields=verbose"* can be used to return the bulk of the fields, or you… |

### The "More Like This" call returns similar records to the specified ID.
`GET https://zieapi.vercel.app/v1/open-data:digitalnz/get-records-record-id-more-like-this-format` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| record_id | integer | yes | Every record has a unique, persistent *record_id*. |
| format | string | yes | Note - There is a small difference with some field names in the response between JSON and XML. When a field name has more than one word,… |
| Authentication-Token | string | no | The DigitalNZ API no longer requires a key to access public content. However, if you plan on using the API regularly, expect to be a high… |
| fields | string | no | Comma-separated whitelist of fields to be returned. The syntax *"&fields=verbose"* can be used to return the bulk of the fields, or you… |
| mlt_fields | string | no | Comma-separated list of fields used to evaluate relatedness. Available fields to compare are *title* and *subject*, eg… |
| filtering | string | no | More Like This (MLT) queries can be filtered in the same ways as regular searches, using the same syntax outined in the GET /records call… |

## Example
```
curl "https://zieapi.vercel.app/v1/open-data:digitalnz/get-records-format" \
  -H "x-api-key: $APIZIE_KEY" \
  -H "x-upstream-key: $PROVIDER_KEY"
```

## FAQ

### How do I call the DigitalNZ API API?
Create a free Apizie key, then send GET https://zieapi.vercel.app/v1/open-data:digitalnz/get-records-format with the header x-api-key. Every endpoint returns { project, data, timestamp }.

### Is the DigitalNZ API API free on Apizie?
Yes. The Free plan includes 1,000 requests a month at 100 requests a minute, no credit card. DigitalNZ API itself also needs your own key from digitalnz.org.

### Can AI agents use the DigitalNZ API API?
Yes. Add the Apizie MCP server (https://zieapi.vercel.app/mcp) to Claude, ChatGPT, Cursor or VS Code, then ask in plain language. The agent calls run_scraper with project key open-data:digitalnz.

### What is the status of the DigitalNZ API API?
Needs your own provider key (bring your own key)
