Hello @UtkarshDevAcc,
This is a great question and I wish I would have seen it sooner! When I read your question, I actually see two questions.
- How many downloads have their been of my application since it has been launched on the App Store?
- How many installs exist of my application?
The first question we can easily answer with the App Store Connect API. The second question we are unable to answer with the App Store Connect API or any other Apple provided technologies that I am personally aware of. I believe this is due to "install" and "usage" information being opt-in information. I have tried to do a statistical analysis of the opt-in data available and have talked to Apple during WWDC about this, but a third party solution would be a better tool to answer this question.
In regards to how many downloads your application has, you can capture this information using the below App Store Connect API.
https://developer.apple.com/documentation/appstoreconnectapi/download_sales_and_trends_reports
Specifically, there are two loops that you may want to introduce based off the information you are looking to achieve. Apple currently provides this data in daily, weekly, monthly and annual cadences. Apple will only provide daily, weekly, and monthly data for the previous year (rolling), which after that only annual reports are available.
The simplest two loops to implement would be a loop over the previous 366 days (accounting for leap year) and the last X number of years. I personally use 366 intentionally because I have noticed a few times where App Store Sales data for a specific date, or date range is unavailable and I want to capture the previous years worth of data. I would also suggest setting a max on the annual loop you would have running to go back in years and hardcode the first year you published an application so that you can take advantage of the same logic in the daily loop.
One thing to note is that this approach will download ALL application data for an Apple Developer Account, and then you can use a data analysis tool or additional coding to break it apart for each application.
Hopefully this helps and happy coding!