Skip to content

Latest commit

 

History

History
75 lines (53 loc) · 2.34 KB

File metadata and controls

75 lines (53 loc) · 2.34 KB

Charity Grantor Finder

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.

How It Works

For each charity name in the input CSV, the tool:

  1. Queries the NZ Charities Register public OData API to find matching registered charities
  2. Sends the register data to Claude, which identifies the correct match and evaluates funding alignment
  3. 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/.

Requirements

Setup

pip install -r requirements.txt
export ANTHROPIC_API_KEY=sk-...

Usage

python find_grantors.py input.csv output.csv

The input CSV must have a name column (case-insensitive). If no name column is found, the first column is used.

Example input CSV

name
World Vision New Zealand
NZ Community Trust
Rotary Foundation

Output Columns

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

Evaluation Criteria

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)

Project Structure

charity-finder/
├── find_grantors.py   # Main script
├── requirements.txt   # httpx, anthropic
└── README.md