API, Part II: Tags
Work on the web services API for the encyclopedia continues, now with tags. Â Here’s a quick rundown:
You can get a list of supported tags here:
http://pedia.directededge.com/api/v1/tags/
That currently returns:
<?xml version="1.0" encoding="UTF-8"?> <directededge version="0.1"> <tag>actor</tag> <tag>author</tag> <tag>book</tag> <tag>company</tag> <tag>film</tag> <tag>musician</tag> </directededge>
You can then get results from article queries based on a tag, using something like this:
http://pedia.directededge.com/api/v1/article/KDE/tags/company/
Which returns:
<?xml version="1.0" encoding="UTF-8"?> <directededge version="0.1"> <item id="KDE"> <link>Trolltech</link> <link>Novell</link> <link>Hewlett-Packard Company</link> <link>Nokia</link> <link>World Wide Web Consortium</link> <link>Mandriva</link> <link>Canonical Ltd.</link> <link>Sirius Satellite Radio</link> </item> </directededge>
You can query any article for any tag (unlike in the web interface). Â Right now the results for “off topic” tags tend to be hit-or-miss. Â One of the other big items on our to-do list is improving tagged results in our engine.
I’m posting incremental updates like this in the hopes that if you’re planning on using our API in a mashup that you’ll let us know what you like and don’t like before we freeze v1.
We’ve also decided on a couple of limitations for the open API that aren’t true for our commercial API (running either on customer data sets or open data sets):
- You’re limited to 10 results.
- You can only filter on one tag at a time, meaning, you can’t get ranked results for movies and music simultaneously.
We think those are pretty reasonable and still give users a fair bit of room to play for free. Â If you’re interested in using our commercial API, drop us a line! Â We’ve also just created an announcement list where we’ll notify folks that are signed up of important details. Â You can sign up for that here.
Leave a comment