# DigitalNZ

> Search New Zealand's public cultural collections, read source and rights information, and count matches by category or collection.

App · 3 actions. Web page: https://docs.lodol.com/docs/integrations/digitalnz

## Actions

### Count DigitalNZ matches by field

Group matching records by categories, content partners, collections, creators or decades and get a count for each group.

**Inputs**

- Query (`query`, text, required): Words to look for in DigitalNZ collection records.
- Group by (`group_by`, text, required): Field to group counts by. One of: `category`, `content_partner` (Content partner), `display_collection` (Display collection), `creator`, `decade`.
- Limit (`limit`, number): Maximum groups to return (1 to 50). From 1 to 50.

**Outputs**

- `data` (object): The response from DigitalNZ.

**Example output**

```json
{
  "data": {
    "search": {
      "facets": {},
      "result_count": 1
    }
  }
}
```

### Get a DigitalNZ record

Read a record's metadata, the contributing organization, the source link and reuse rights.

**Inputs**

- Record ID (`record_id`, number, required): Numeric DigitalNZ record ID. At least 1.

**Outputs**

- `data` (object): The response from DigitalNZ.

**Example output**

```json
{
  "data": {
    "record": {
      "category": [
        "example"
      ],
      "content_partner": [
        "example"
      ],
      "creator": [
        "example"
      ],
      "description": "example",
      "id": 1,
      "landing_url": "example",
      "rights": "example",
      "title": "example",
      "usage": [
        "example"
      ]
    }
  }
}
```

### Search DigitalNZ records

Find images, maps, newspapers and other records across New Zealand collections.

**Inputs**

- Query (`query`, text, required): Words to look for in DigitalNZ collection records.
- Page (`page`, number): Page number to return, starting at 1. At least 1.
- Page size (`page_size`, number): Records to return per page (1 to 100). From 1 to 100.

**Outputs**

- `data` (object): The response from DigitalNZ.

**Example output**

```json
{
  "data": {
    "search": {
      "page": 1,
      "per_page": 1,
      "result_count": 1,
      "results": [
        {
          "category": [
            "example"
          ],
          "content_partner": [
            "example"
          ],
          "creator": [
            "example"
          ],
          "description": "example",
          "id": 1,
          "landing_url": "example",
          "rights": "example",
          "title": "example",
          "usage": [
            "example"
          ]
        }
      ]
    }
  }
}
```
