Discover/NZLII API
live

NZLII APInzlii.org ↗

Search New Zealand court and tribunal decisions on NZLII by case name or citation, and retrieve full judgment text with PDF and RTF download links.

Endpoint health
verified 6d ago
search_cases
search_by_citation
get_case
3/3 passing latest checkself-healing
Endpoints
3
Updated
27d ago

What is the NZLII API?

The NZLII API gives programmatic access to New Zealand legal decisions across three endpoints: search by case name, search by citation, and retrieve a full judgment. The get_case endpoint returns 12 fields per decision including the full plain-text judgment, neutral citation, decision date, court name, and direct URLs for PDF and RTF downloads from the New Zealand Legal Information Institute.

This call costs2 credits / call— charged only on success
Try it
Result ordering.
NZLII court/tribunal database code to restrict the search to, as it appears in court_code of results (confirmed: NZCA, also NZHC, NZSC, NZDC, NZFC, NZEmpC, NZEnvC among the site's advanced-search list). Alphanumeric only. Omitted = all case-law databases.
Case name or words from the decision title, e.g. 'smith v police'.
Zero-based index of the first result row to return; use next_offset from the previous page. Pages hold 10 rows.
→ api.parse.bot/scraper/2136ce2d-cee6-4ca4-868f-da3bd6c0c69d/<endpoint>
Ready to send
Fill in the parameters and hit sign in to send to see live response data here.
Call it over HTTPgrab a free API key at signup
curl -X GET 'https://api.parse.bot/scraper/2136ce2d-cee6-4ca4-868f-da3bd6c0c69d/search_cases?sort=relevance&query=smith+v+police' \
  -H 'X-API-Key: $PARSE_API_KEY'
Python SDK · recommended

Typed, relational, agent-ready

A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.

  • Fully typed · autocompletes
  • Objects link to objects
  • Typed errors & pagination

Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:

uv add parse-sdk
uv run parse init
uv run parse add --marketplace nzlii-org-api

uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.

"""Walkthrough: search NZ case law on NZLII, then fetch the full decision text."""
from parse_apis.nzlii_org_api import Nzlii, SortOrder, CaseNotFound

client = Nzlii()

# Search for cases by name, sorted by most-cited, capped at 5 results.
for case in client.cases.search(query="smith v police", sort=SortOrder.CITED_MOST, limit=5):
    print(case.title, "|", case.citation, "| cited:", case.citation_count)

# Take the first hit and retrieve the full decision text.
hit = client.cases.search(query="commerce commission", court="NZHC", sort=SortOrder.DATE_LATEST, limit=1).first()
if hit is not None:
    try:
        decision = client.decisions.get(citation=hit.citation)
    except CaseNotFound:
        decision = None
    if decision is not None:
        print(decision.title)
        print("  court:", decision.court, "| year:", decision.year)
        print("  text preview:", decision.text[:120])
        print("  pdf:", decision.pdf_url)

# Look up cases by citation.
for match in client.cases.search_by_citation(citation="[2019] NZCA 219", limit=3):
    print(match.title, "|", match.court, "|", match.date)

print("exercised: cases.search / decisions.get / cases.search_by_citation")
All endpoints · 3 totalmissing one? ·

Searches NZLII case-law databases by case name: the query is matched against decision titles (e.g. 'smith v police'), not full text. Returns one page of 10 result rows (the site's fixed page size), each with the decision title, neutral citation, court database code and name, year, decision number, decision date as shown on the site, document size, LawCite citation count, relevance percentage (present only for the relevance sort, null otherwise) and the decision URL. total_documents is the site's reported match count across all pages. Paging is by offset: pass next_offset from the previous response; has_more is false on the last page. The same decision can appear more than once when the site indexes multiple versions of it. An unknown court code or a name with no matches returns an empty results array with total_documents 0.

Input
ParamTypeDescription
sortstringResult ordering.
courtstringNZLII court/tribunal database code to restrict the search to, as it appears in court_code of results (confirmed: NZCA, also NZHC, NZSC, NZDC, NZFC, NZEmpC, NZEnvC among the site's advanced-search list). Alphanumeric only. Omitted = all case-law databases.
queryrequiredstringCase name or words from the decision title, e.g. 'smith v police'.
offsetintegerZero-based index of the first result row to return; use next_offset from the previous page. Pages hold 10 rows.
Response
{
  "type": "object",
  "fields": {
    "sort": "sort order applied",
    "court": "court code filter applied, or null when searching all case databases",
    "query": "the case-name query as searched",
    "offset": "integer, offset of this page",
    "results": "array of decision rows: title, citation (neutral citation), court_code, court (database name), year (integer), decision_number (string), date (as shown, e.g. '13 June 2019'), size, citation_count (integer LawCite count), relevance_percent (integer or null), url",
    "has_more": "boolean, whether another page exists",
    "page_size": "integer, fixed at 10",
    "next_offset": "integer offset for the next page, or null on the last page",
    "total_documents": "integer, the site's total match count across all pages"
  },
  "sample": {
    "data": {
      "sort": "relevance",
      "court": "NZCA",
      "query": "smith v police",
      "offset": 0,
      "results": [
        {
          "url": "https://www.nzlii.org/cgi-bin/viewdoc/nz/cases/NZCA/2019/219.html",
          "date": "13 June 2019",
          "size": "6.35 KB",
          "year": 2019,
          "court": "Court of Appeal of New Zealand - Te Kōti Pīra",
          "title": "Smith v Police [2019] NZCA 219 (13 June 2019)",
          "citation": "[2019] NZCA 219",
          "court_code": "NZCA",
          "citation_count": 1,
          "decision_number": "219",
          "relevance_percent": 100
        },
        {
          "url": "https://www.nzlii.org/cgi-bin/viewdoc/nz/cases/NZCA/1979/95.html",
          "date": "21 November 1979",
          "size": "5.08 KB",
          "year": 1979,
          "court": "Court of Appeal of New Zealand - Te Kōti Pīra",
          "title": "Smith v Police CA113/79 [1979] NZCA 95 (21 November 1979)",
          "citation": "[1979] NZCA 95",
          "court_code": "NZCA",
          "citation_count": 0,
          "decision_number": "95",
          "relevance_percent": 100
        }
      ],
      "has_more": false,
      "page_size": 10,
      "next_offset": null,
      "total_documents": 3
    },
    "status": "success"
  }
}

About the NZLII API

Search and Retrieval

The search_cases endpoint accepts a query string matched against decision titles — for example 'smith v police' — and returns up to 10 results per page. Each result row includes the decision title, citation (neutral citation), court_code, court (database name), year, and decision_number. An optional court parameter restricts results to a single NZLII court or tribunal database code. Pagination is handled via the offset parameter and the next_offset value returned in each response; total_documents gives the full match count across all pages.

Citation Lookup

search_by_citation works the same way but matches against a citation string such as '[2019] NZCA 219'. Brackets are optional and whitespace is normalised before matching. This is useful when you have a citation from another source and need to resolve it to an NZLII record. It returns the same page structure — results, has_more, next_offset, total_documents — and supports the same court filter.

Full Decision Data

get_case accepts either a url (from search results) or a citation string and returns the complete judgment. Response fields include text (full plain-text judgment with line breaks), pdf_url and rtf_url (direct download links, null when the site offers none), pdf_size as labelled on the page, date (decision date from the title string), last_updated (the site's printed last-updated date, or null), court, year, title, and citation.

Coverage and Limitations

All three endpoints cover only case-law databases on NZLII. Search matches against decision titles, not the full text of judgments. The fixed page size is 10 results; there is no way to request a larger page. get_case returns text as it appears on the decision page and does not parse or structure individual judgment sections.

Reliability & maintenanceVerified

The NZLII API is a managed, monitored endpoint for nzlii.org — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when nzlii.org changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.

This isn't an official nzlii.org API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.

Last verified
6d ago
Latest check
3/3 endpoints passing
Maintenance
Monitored & self-healing
Will this API break when the source site changes?+
It's built not to. Every endpoint is health-checked on a schedule with automated test probes. When the source site changes and a check fails, the API is automatically queued for repair and re-verified — that's the self-healing layer. Each API page shows when its endpoints were last verified. And because marketplace APIs are shared, any fix reaches everyone using it.
Is this an official API from the source site?+
No — Parse APIs are independent, managed REST wrappers over publicly available data. That is the point: where a site has no official API (or only a limited one), Parse gives you a maintained, monitored endpoint for that data and keeps it working as the site changes — so you get a stable contract over a source that never promised one.
Can I fix or extend this API myself if I need a new endpoint or field?+
Yes — and you don't have to wait on us. This API was generated by the Parse agent, which stays attached. Describe the change in plain English ("add an endpoint that returns reviews", "fix the price field") in the revise box on the API page or via the revise_api MCP tool, and the agent rebuilds it against the live site in minutes. Contributing the change back to the public API is free.
What happens if I call an endpoint that has an issue?+
Errors are machine-readable: a bad call returns a clean status with the list of available endpoints and a repair hint, so an agent (or you) can recover or trigger a fix instead of failing silently. Confirmed failures feed the automatic repair queue.
Common use cases
  • Build a case-law research tool that resolves a neutral citation to the full judgment text via get_case.
  • Aggregate New Zealand Court of Appeal decisions by year using search_cases with a court filter and the year field.
  • Automate citation verification by cross-referencing a list of citations through search_by_citation and checking total_documents.
  • Construct a decision archive by paginating search_cases with offset and storing pdf_url links for bulk PDF retrieval.
  • Power a legal search interface that surfaces title, citation, court, and year from case-name queries.
  • Check whether a PDF version of a judgment exists before rendering it, using the pdf_url and pdf_size fields from get_case.
Pricing & limitsSee full pricing →
TierPriceCredits/monthRate limit
Free$0/mo2005 req/min
Hobby$30/mo1,00020 req/min
Developer$100/mo5,000100 req/min
Team$300/mo20,000300 req/min
Company$1,000/mo100,000500 req/min

Each endpoint has a fixed posted price per successful call — most fall between 1 and 10 credits — shown on this API's page before you run it. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.

Frequently asked questions
Does NZLII offer an official developer API?+
NZLII (the New Zealand Legal Information Institute) does not publish an official developer API or documented data access service. This Parse API provides structured access to the same decision data available on nzlii.org.
What does `search_cases` return, and how is it different from `search_by_citation`?+
search_cases matches your query string against decision titles and is intended for case-name lookups like 'smith v police'. search_by_citation matches a citation string such as '[2019] NZCA 219' against titles. Both return the same result shape — title, citation, court_code, court, year, decision_number — but are optimised for different lookup patterns. Neither searches full judgment text.
Does the API cover legislation, law reform reports, or other NZLII content beyond case law?+
Not currently. The API covers case-law databases only: searching decisions by case name or citation, and retrieving individual judgments. NZLII also hosts legislation, law commission reports, and journal articles, but those are not included. You can fork this API on Parse and revise it to add endpoints targeting those content types.
Can I retrieve more than 10 results at once?+
The page size is fixed at 10 results, matching the site's own pagination. To retrieve further results, pass the next_offset value from the current response as the offset parameter in your next request. has_more tells you whether another page exists, and total_documents gives the full match count.
Is the decision date always available in `get_case`?+
The date field is parsed from the decision title string (for example '13 June 2019'). When the title does not include a date in that position, the field returns null. Similarly, last_updated returns null when the site does not print a last-updated date on the decision page.
Page content last updated . Spec covers 3 endpoints from nzlii.org.
Related APIs in Government PublicSee all →
austlii.edu.au API
Search and access Australian legal cases from AustLII's comprehensive database, browsing by year and downloading decisions in multiple formats including RTF, PDF, and print-friendly versions. Discover available case databases and retrieve specific court rulings with prioritized download options to suit your preferred format.
bailii.org API
Search and retrieve court judgments and case law from British and Irish courts across multiple jurisdictions, with filtering by date range and location. Access complete case details including full judgment text and metadata to research legal precedents and decisions.
canlii.org API
Access Canadian legal information from CanLII.org. Discover jurisdictions and databases, search case law and legislation across all provinces and territories, and retrieve full document text and metadata.
jade.io API
Access Australian legal cases from JADE, including recent High Court of Australia decisions and full case content retrieved by article ID or medium neutral citation. Look up specific cases quickly using their standardized citation format to stay informed on the latest Australian legal precedents.
oscn.net API
Search Oklahoma State Court Network records across 80+ counties to find cases, review detailed docket information, and track daily court filings. Quickly look up case details by county and district court type to stay informed on legal proceedings and filing activity.
afca.org.au API
Search through thousands of published AFCA financial complaints decisions to find relevant cases by keyword, case number, or financial firm, and filter results by product type and complaint issues. Quickly locate precedents and outcomes to understand how AFCA has ruled on specific financial disputes.
law.justia.com API
Search federal court dockets and retrieve detailed case filings to stay informed about ongoing litigation, track case outcomes, and access official court documents. Find specific cases by keywords or case identifiers to monitor legal proceedings relevant to your interests or research.
indocourtatlas.com API
Search and browse judicial records, legal decisions, and court cases from courts throughout Indonesia to find relevant case information and rulings. Access comprehensive Indonesian court data through simple search and browsing capabilities to research legal precedents and case outcomes.