I'm currently making a system to track data transfered from my clients but by using the apache logs. I used the internal crappy stats tool to manually extract data transfered for a web site but most of the time it doesnt work.

Is there an easy way to extract data from the reports AWStats generate? Would it be a nice idea to make data extraction and query routines (In perl or any other language) so that someone may use it as an api and get data out?