A dataset of IRS 990 filings are available there. It is a big collection of XML files.
Here is an example of one chosen at random: https://pastebin.com/pzNYBZYQ
EDIT: here is the same thru propublica explorer:
https://projects.propublica.org/nonprofits/organizations/437...
which links here, which is the document I posted:
https://s3.amazonaws.com/irs-form-990/201643199349201044_pub...
I will say for personal analysis that the schema has a habit of changing, and things like grants can appear in multiple places depending on the context. What’s more, just 2/3rds of nonprofits e-file now (and I’m sure fewer and fewer the further back you go) Just some things to look out for.
If you’re interested in processing the 990 XML data though, check out the truly excellent irsx: https://github.com/jsfenfen/990-xml-reader
Sounds like a lot of interesting data will be in that last third, in which case.