search_legislation
Search New Zealand legislation by title or full-text content, or browse with filters to find acts, bills, and secondary legislation with version details and links.
Instructions
Search New Zealand legislation (acts, bills, secondary legislation, amendment papers) by title or full-text content, or browse by omitting search_term and using filters alone. Returns matching works with their newest matching version id, website URLs, publisher, and available formats. latest_matching_version_is_latest is false when a content search matched only an older version (e.g. text since repealed). Type-specific filters (act_*, bill_*, instrument_*) imply legislation_type; mixing types is rejected. Ids containing ~ are ephemeral and carry ephemeral: true. Use this first to find a work_id or version_id.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | Page number (default 1). | |
| sort_by | No | Result ordering. | |
| act_type | No | Restrict acts to a subtype (e.g. public vs local/private). Acts only; implies legislation_type "act". | |
| per_page | No | Results per page (default 20, max 100). | |
| bill_type | No | Restrict bills to a type. Bills only; implies legislation_type "bill". | |
| publisher | No | Restrict by the publishing body. | |
| act_status | No | Restrict acts by their current legislative standing. Acts only; implies legislation_type "act". | |
| bill_status | No | Restrict bills by their current status. Bills only; implies legislation_type "bill". | |
| search_term | No | Search phrase. Supports ElasticSearch simple query syntax (e.g. "privacy", "data +breach"); stemming is on by default, wrap a phrase in double quotes to disable it. Omit it to browse: the filters alone (or no filters at all) list every matching work. | |
| search_field | No | Search titles only, or full document content. Defaults to the API default (title). | |
| legislation_type | No | Restrict to a category of legislation. Inferred automatically when an act_*, bill_*, or instrument_* filter is given. | |
| instrument_status | No | Restrict secondary legislation by its current status. Secondary legislation only; implies legislation_type "secondary_legislation". | |
| act_classification | No | Restrict acts to principal (foundational) or amendment acts. Acts only; implies legislation_type "act". | |
| legislation_status | No | Restrict by whether the legislation is currently in force. | |
| instrument_type_group | No | Restrict secondary legislation to an instrument type group. Secondary legislation only; implies legislation_type "secondary_legislation". | |
| administering_agencies | No | Filter by administering agency. Must be the agency's full name exactly as listed at https://www.legislation.govt.nz/browse/agencies (e.g. "Ministry of Justice"). | |
| instrument_classification | No | Restrict secondary legislation to principal or amendment instruments. Secondary legislation only; implies legislation_type "secondary_legislation". |