NZ Mps Electorates
Use the read-only Python CLI to retrieve and filter records exposed by the official first-party source.
Every command supports --json, bounded requests, stable exit codes, source URLs and retrieval timestamps.
Commands
# list current MP directory resources
python3 scripts/cli.py list --json
# find an MP
python3 scripts/cli.py mp NAME --json
# find an electorate
python3 scripts/cli.py electorate NAME --json
# filter by party
python3 scripts/cli.py party NAME --json
# search portfolios and roles
python3 scripts/cli.py portfolio QUERY --json
# search committee membership
python3 scripts/cli.py committee NAME --json
Add --limit N (1–100) to bound any command. Human output is the default.
Coverage and interpretation
- Return official public office contact channels only.
- Do not infer voting position, ideology or availability from directory metadata.
- Current roles can change; use the retrieval timestamp.
The CLI parses Parliament's current member table into name, party, electorate/list status and
canonical profile URL. mp follows matching profiles for current roles and official Parliament
email addresses. portfolio and committee inspect labelled current-role tables on official
profiles and return only matching current MPs. This source does not provide historical coverage.
Resources
scripts/cli.py— canonical command entrypointscripts/test_contract.py— deterministic repository contract auditscripts/smoke_test.py— parser fixture and bounded live probetests/fixtures/members.htmlandprofile.html— representative Parliament fixturesreferences/source-profile.json— command schema, source allowlist and warningsreferences/source-notes.md— feasibility, provenance and source limits