Add gender to an Apple Numbers spreadsheet
Numbers has no add-ins and no function that calls a web API, so the lookup happens next to it: copy the column into the namegender command in Terminal and open the result in Numbers, or export the sheet and upload it.
100 free credits every day. No card.
From the clipboard in one Terminal command
Select the cells with first names in Numbers, without the header, and copy them. Numbers puts one cell per line on the clipboard. In Terminal, with Node.js installed and your key in NAMEGENDER_API_KEY, run pbpaste | npx namegender --csv > genders.csv && open -a Numbers genders.csv.
Numbers opens the result as a new table with query, gender, probability, sample_size and country for every name, in the same order as your selection. Copy the gender and probability columns and paste them next to your original names.
Add --country GB, or --locale en-GB when you only know the language, to narrow the answer to one country. Without it the answer is the worldwide aggregate.
Large tables: export and upload
Choose File → Export To → Excel or CSV, upload the file in the NameGender dashboard, pick the name column and an optional country column, and check the cost before starting. The result comes back as the same file with gender, probability, sample size and match columns added, and Numbers opens it directly.
Distinct names are looked up once and joined back to every row, so a list of customers with many repeated first names costs less than its row count suggests.
Keep the evidence, not just the label
Keep probability next to gender. A table sorted or filtered on gender alone treats a 55% guess like a 99% answer, while a filter on probability of 90 and above keeps only confident rows.
Leave unknown rows in the table rather than deleting them. Role addresses, initials and rare names are part of the list, and a count of how many came back unknown is the honest measure of how much of the list the result covers.
Questions
Is there a Numbers add-in?
No. Numbers does not support add-ins or web functions, so the lookup runs in Terminal or through a file upload.
Do I need to install anything?
Node.js for the command; npx downloads the namegender command on first use. The upload route needs nothing.
Does an unknown name cost a credit?
Yes. Every name sent costs one credit, unknown results included.
Can I read email addresses instead of names?
Yes. Add --email to the command and paste a column of addresses; only the part before the @ is read.
Related pages
Fill gender and probability next to a column of names in LibreOffice Calc with a Python macro, the command line or a file upload.
Add gender, probability and evidence columns to an Excel or CSV file. Upload and download without code, or connect Excel Power Query to the REST API.
Upload a CSV or XLSX name list and get a gender column back, with confidence fields, automatic deduplication and the cost shown before charging.
A walkthrough for analysts: upload a name list, pick the right columns, read the confidence fields, and decide what to do with the rows that come back empty.
Check it against your own list
Every number on this page is reproducible with a free key. If your data breaks it, that is the more interesting result.