xml based API

I have to write a program through which I can automate the testing of multiple websites at a time. Are there certain xml based API which can give the result in xml format and I can store it using the progam by writing the logic.

Here you go: http://www.webperformancecentral.com/wiki/WebPagetest/Automating_Pagetest

Just be careful if you are going to be automating against the public instance - if you submit too many tests you will get blocked. It’s mostly intended for automating private instances where you run your own infrastructure.

Would this work for you?

http://www.webpagetest.org/forums/showthread.php?tid=395