Export material instance data

We’re looking for a way to export out material data to determine whether certain flags are turned on or off in hundreds of material instances. I did a bit of googling but haven’t found any way to do this.

We have tons of material instances potentially flagging unnecessary node functions and this’d be a great way to find them. Any suggestions are appreciated. Thanks!