I would stick to using Apple Apps for this to avoid getting dinged for a terms of service / license violation. 

> - Manipulating play counts, downloads, ratings, or reviews via any means — such as (i) using a bot, script, or automated process

> - You may access our Services only using Apple’s software, and may not modify or use modified versions of such software.

https://www.apple.com/legal/internet-services/itunes/

Once you’ve downloaded if using Apple’s software you should be clear to analyze it as long as you’re not further distributing it or using the app once you change it.