Today, I launched an unofficial MySpace API. It's a way of getting data out of MySpace in a variety of XML formats. Three to be specific - a raw XML format, RSS 2.0 and OPML 2.0. The RSS format is there to provide a feed of new comments that have been posted to a MySpace profile. 
The API supports gathering data from either a person's MySpace name or from their FriendID. Their name is what comes at the end of the URLs people give out (eg. myspace.com/foo would be 'foo'), while the FriendID is a long ID number. My API takes both, and in the OPML and RSS version, it uses FriendIDs to point to other profiles. 
The URL structure is as follows: 
xml.opiumfield.com/myspace/username/format 
Username can be either the username as it appears in the URL or the FriendID. Format can be either 'xml', 'rss' or 'opml'. The OPML is designed to be Grazed, so don't go importing it in to your aggregator because not much will happen.

I will hopefully be adding new functionality to this API as we go on, but none of the existing stuff should change. It may take a little while for the OPML version to get updated - there's a little bit of disconnect between writing Python and writing XSL. Hopefully, I'll be adding FOAF soon. 
If you want to build applications on top of this, please use the raw XML and don't try to reverse engineer the other feeds. The raw XML is there so that you can get as much information as possible. 
There is a lot of stuff which gets excluded though - I don't include HTML inside comments, for instance. If you want to get the full dancing baby, flaming skull, MIDI, Web 1.0 effect, you need to go to the person's profile. I just pull text out. I don't get friends other than the "Top" friends. This is not because I don't want to. I'd love to get a person's complete friends list, but it's all hidden away in highly obfuscated, JavaScript heavy code that blows my head to pieces. 
If you've got suggestions for data you'd like me to pull out of MySpace, please contact me and I'll try and extract it. To make my life easy, use something like Safari Guide or Firefox XPath Checker and produce me an XPath to the data that you want. 
It's all built using Python, BeautifulSoup (which rocks, btw - it seems like the sanest way to do HTML and XML parsing in any language I've seen) and a few XSLT 1.0 stylesheets to turn the raw XML in to RSS, OPML etc. The more I code in Python, the more I like it. I wish my web host would support it better - I'm currently putting it in to a cgi-bin and have some proxy scripts in PHP to handle things. 
