I don’t have much experience with PHP, I code my custom projects with javascript. Currently, I use MainWP to manage Worpdress client sites and I wanted to pull info for each site into my javascript app.
If you check the maiwnp-getsites filter you will be able to find details about it and see how to pull site info. Please see here: https://mainwp.com/codex/#mainwp-getsites