Ad

Our DNA is written in Swift
Jump

Report Downloading Update

Fascinated by the Cingleton talk given by Michael Jurewitz (full video) on pricing elasticity I decided on a new project for my Lab Friday. Those are the 20% time where we try to explore something else than the nitty gritty we are working on all the other time.

It was in May four years ago that Apple had rejected my original MyAppSales app for scraping Apple’s site to get sales data. Shortly thereafter I started a Petition for Apple to give us an official API for downloading sales data. The bug report rdar://6807195 is still in status “Open” ever since April 20th 2009, its the oldest open Radar I have in my list.

Apple finally caved (a little) when they released the Autoingest.java tool for downloading some forms of reports in early 2012. Which I promptly decompiled and rewrote in a sensible language: Objective-C.

Ever since my first reverse implementation of Autoingest in ObjC this project was available Open Source on GitHub, offering two targets: one Mac command line utility that does exactly the same things as its Java brother, and a static library that you can add to your own custom solution.

The usefulness of Autoingest was quite limited initially because it only offered Daily and Weekly sales reports and some kind of “Opt-In” report, no idea what this is for. Until March 6th, 2013.

Getting back to my idea for a Friday Lab Project … I want to analyze my sales data for how elastic demand is for the various prices that I haven been charging for my apps. To get the sales data I fired up my Autoingest.objc and much to my surprise still found it working without problems.

For some reason I googled for the tool’s name and found the iTunes Connect Sales and Trends Guide: App Store which was updated to version 8 last month. The revision history mentions (emphasis mine)

Updates for Sales and Trends redesign. Monthly summary reports for the previous 12 months are now available. Yearly summary reports for all previous years can be downloaded. Graph and sales data can be filtered by free or paid content.

Version 7 of this document was mentioned as having a publication date of November 6th, 2012.

In addition these mentioned items I also found mention of Newsstand reports which are available in multiple detail levels as well.

Thus my Friday project mutated into an Updating session for DTITCReportDownloader. While being at it I revamped many things while adding support for the new parameters.

If you build the command line utility you can download the most recent available daily sales report like this. Omit the rightmost date parameter for the latest or specify a yyyyMMdd date for a specific date.

./Autoingest you@domain.com secretpassword 81234567 Sales Daily Summary

I also added an awesome looping capability that the Java version doesn’t have. You can have it download all available reports of one type, for example all Yearly reports:

./Autoingest you@domain.com secretpassword 81234567 Sales Yearly Summary ALL

Note that Sales reports only offer the Summary resolution level. Username and password are your Apple ID and the number beginning with 8 is your vendor ID which you can find on the portal.

Autoingest puts the downloaded reports in the current folder, if a report file of a certain name already exists it will be skipped.

Conclusion

I believe that we iOS and Mac developers should be using Objective-C for our tools and this is why I keep updating this component.  I am now looking for other developers (you?) who are willing to give this tool a try, be it on the command line or via static library.

I am specifically in need of feedback related to the Opt-In and Newsstand reports as I don’t have data for these myself. You don’t have to share any sales data with me, just test it and maybe suggest fixes. And I would be excited if you also find this useful.

The next step after now having taken care of the source of report data will be to load them into a CoreData DB and do some analyzing magic. More on that later.


Categories: Apple, Projects

2 Comments »