A command-line tool that takes a CSV of NZ charity names, looks each one up on the NZ Charities Register, and uses Claude AI to evaluate whether they are likely to make grants to Outward Bound NZ.
For each charity name in the input CSV, the tool:
- Queries the NZ Charities Register public OData API to find matching registered charities
- Sends the register data to Claude, which identifies the correct match and evaluates funding alignment
- Writes the original rows plus evaluation columns to an output CSV
No web scraping — the register exposes a public OData API at https://www.odata.charities.govt.nz/.
- Python 3.9+
- An Anthropic API key
pip install -r requirements.txt
export ANTHROPIC_API_KEY=sk-...python find_grantors.py input.csv output.csvThe input CSV must have a name column (case-insensitive). If no name column is found, the first column is used.
name
World Vision New Zealand
NZ Community Trust
Rotary Foundation
The output CSV contains all original columns plus:
| Column | Values | Description |
|---|---|---|
match_found |
yes / no / uncertain / error | Whether a match was found in the register |
charity_name_in_register |
string | Exact name as it appears in the register |
registration_number |
e.g. CC12345 | Charity registration number |
activities |
string | Raw Activities field from register |
sectors |
string | Raw Sectors field from register |
beneficiaries |
string | Raw Beneficiaries field from register |
likely_donor |
yes / no / uncertain / error | Claude's assessment |
confidence |
high / medium / low | Claude's confidence level |
reasoning |
string | 1–2 sentence explanation |
Claude marks a charity as a likely donor if:
- Their activities include "Makes grants to organisations"
- Their sector or beneficiaries align with: youth, education, personal development, sports/recreation, mental health, or community development
- They operate in NZ (not exclusively overseas)
charity-finder/
├── find_grantors.py # Main script
├── requirements.txt # httpx, anthropic
└── README.md