I've played with finance.yahoo.com's feed of CSV stock ticker data before and recently had an idea that was so simple that I'm surprised that no one's done it before: why not write a script that passes along a request for this data but converts the result to RDF before returning it? So I did.

I supposed it might count as a semantic web service.

A URL like http://www.rdfdata.org/cgi/stockquotes.cgi?symbols=BUD,IBM,SNE asks for recent ticker information about the stock symbols listed in the comma-separated value list. The stockquotes.cgi script adds the parameters to the appropriate stub to create a URL like http://download.finance.yahoo.com/d/quotes.csv?f=sl1d1t1ohgv&e=.csv&s=BUD,IBM,SNE, uses this URL to retrieve the CSV results, converts them to RDF/XML, and sends that back to the original requester with a MIME type of application/rdf+xml. The whole script, with white space and comments, wasn't even 100 lines. You can click the first link in this paragraph to see an example of it in action.

I haven't done anything with the rdfdata.org domain name in a while, so I thought that would be a nice place for this. I've already used this little web service in a work-related demo that combines and cross-references RDF data from multiple sources, because after all, that's one of the things that RDF is so good at.

Is this a "semantic web service"? All it does is convert the data returned by a Yahoo feed into a different syntax and pass it along. I did throw together a little ontology to name the properties, but it doesn't add a lot of semantics. On the other hand, my script's output syntax is based on a semantic web standard, and it makes the data easier to use in semantic web applications, so I suppose it might count as a semantic web service.

I hope this is useful to others, and I hope that more people look for opportunities to convert live feeds of useful data in simple formats into live feeds of RDF.