Yahoo! Developer Network Blog
« Previous | Main | Next »
January 13, 2009
YQL now supports microformats!
Microformats are the revolution that still has to happen. The idea is great: use information that is already published on the web and mark it up to be reusable in other ways. The classic example given in almost any microformats presentation is how you can turn a person's details into a downloadable vCard by adding a few spans with the right classes around the appropriate text content.
Since we publish in HTML anyways, it was deemed a good idea to add this extra layer of semantic goodness to allow software to extract structured data instead of having to write an extra API. Adding microformats is not hard (although there are disputes about the readiness of microformats in terms of internationalization and accessibility) - the consumption however is.
Naturally the best place for this to happen is the browser - the idea was to have the user agent recognize information in microformats and allow the user to re-use this information where it makes sense. Whilst there are several extensions for Firefox that do exactly that, none of the out-of-the-box browser configurations are microformat-aware.
Which means that if we wanted to re-use microformats, we need to write our own parser. Luckily enough this has been done for us in various languages. The pain is still to convert them into other formats once we retrieve them (not to mention the problem of not being able to pull them from a resource on another domain via Ajax).
Yahoo! likes microformats. We've been sneaking them into a lot of our products and we've already started to make their discovery and re-use a lot easier in SearchMonkey.
Now, with the release of YQL, we've gone a step further. We took the content-mixing capabilities of Pipes, and added a SQL-style language and REST interface to access directly without having to paint your data retrieval and filtering flow.
After discussing the microformats capabilities of SearchMonkey with the YQL team over a mug of coffee at my last visit stateside, we decided to see if it would be possible to get YQL to retrieve microformat data from web documents. I am proud to say that my wish has been granted.
If you check the YQL console you'll find that in the "Available Tables" section you can now see "Microformats" (spookily enough with my blog as the demo example). Together with the public REST API you can use this to retrieve information, filter it down, and return it as XML or JSON for re-use.
Say for example you want to get all the location information for a venue in Upcoming without using the API - this is now easy. The Bricklayer's Arms is the notorious location of the London Pub Standards, and you can retrieve the Microformats with the following REST call:
Use filtering to get only what you want:
You can switch to JSON and provide a callback parameter to use the information directly in JavaScript:
This will hopefully make it much easier for people to write software that consumes microformats and maybe bring the "chicken" of adding microformats and the egg of finding good uses for them a bit closer together.
Chris Heilmann
Yahoo Developer Network
Posted at January 13, 2009 6:40 PM | Permalink
Comments
Is this something for computer illiterates like me?
Is there a dictionary for the terms?
I want to establish a site where people can post comments on specified subjects, kind of like a guestbook, except more easily available.
Hmmmm. Maybe that's what I should do. Just establish a website that is basically nothing but a guestbook with stubject categories for folks to comment.
Is thaat a good idea or am I dreaming again? And how can I read the answers to questions here?
Sorry for my lack of knowledge.
Posted by: janiska at January 14, 2009 4:45 AM
This is excellent news and I'm really happy to see the addition of microformats to YQL.
That said, after playing around with the query browser, I still find it a lot simpler to use the RESTful interface onto hKit for my microformat extracting needs. I'm sure YQL is more powerful and capable of doing a lot more but alas, I fear it is too much for my little brain.
I'll try poring over the documentation again and see if I can figure out how to something more than a "SELECT * FROM microformats WHERE url=..." statement.
In any case, it's great to see more RESTful microformats parsers returning yummy, yummy JSON.
Posted by: Jeremy Keith at January 16, 2009 3:41 AM
This is amazing news! I wonder if the URL Mapping could improve to lead us toward a more powerful RESTful architecture. I am a huge fan of microformats and yahoo pipes. We can use tools like this in our web strategy to reduce our digital noise.
Yahoo is the Grandfather of the Social Media Platform.
Does anyone have examples of incorporating these technologies into a Social Media Platform?
Thank you!
Posted by: Daniel Hudson at January 16, 2009 11:35 AM
Post a comment
Comment Policy: We encourage comments and look forward to hearing from you. Please note that Yahoo! may, in our sole discretion, remove comments if they are off topic, inappropriate, or otherwise violate our Terms of Service. Fields marked with asterisk '*' are required.
Subscribe
Recent Blog Articles
view all
YQL Open Table for Google Buzz now live
Tue, 09 Feb 2010
INSERT INTO twitter.status ...
Mon, 08 Feb 2010
Announcing the Yahoo! Brasil Open Hack Day 2010, 20-21 March
Mon, 08 Feb 2010
Marketing hacks, linchpins, and tech women of valor
Sun, 07 Feb 2010
Yahoo! India invites you to join the first India Hadoop Summit
Thu, 04 Feb 2010
Recent Links
Appcelerator Titanium + Yahoo YQL on Vimeo
Mon, 08 Feb 2010
Tue, 02 Feb 2010
PhoneGap | Cross platform mobile framework
Sat, 30 Jan 2010
Web developers can rule the iPad - O'Reilly Radar
Sat, 30 Jan 2010
rc3.org - Is the iPad the harbinger of doom for personal computing?
Thu, 28 Jan 2010
Archives
2010
2009
2008
2007
2006
2005
Recent Readers

