The above is from the Ergast API Gallery. In their words: "The Ergast Developer API is an experimental web service which provides a historical record of motor racing data for non-commercial purposes. Currently the API provides data for the Formula 1 series, from the 1990 season onwards."
It's an absolute goldmine of Formula One stats, and trivially easy to use, the API Documentation gives you a taster. The api is RESTful and has great urls for every request and json or xml results. If you're just into mere tinkering most web browsers will present the xml in a very usable form. I've used the core data for the Wiki's Grand Prix 2009 page, I now need to write a script to auto-populate my wiki page with the latest results after each round.