New API: What work?
I've added a small, but nifty new API that provides a sure-fire way of connecting any site's book data to LibraryThing.
The "What work?" API takes an ISBN and/or the book title and author and returns the LibraryThing work number, with link URL in XML.
It's a very forgiving algorithm—these all lead to my wife's The Mermaids Singing.
If there's interest, I can add a JSON version.
*You need to provide either an ISBN (ISBN10 or 13; with dashes or not) or a title and author. Authors can be in last-first (preferred) or first-last (fine). You can omit the author and tack it onto the title, eg., "Huckleberry Finn / Twain, Mark." It's very forgiving about punctuation, capitalization and so forth. It doesn't make wild guesses, but it makes sensible ones.
The "What work?" API takes an ISBN and/or the book title and author and returns the LibraryThing work number, with link URL in XML.
It's a very forgiving algorithm—these all lead to my wife's The Mermaids Singing.
- http://www.librarything.com/api/whatwork.php?isbn=0380815591
- http://www.librarything.com/api/whatwork.php?title=The+Mermaids+Singing&author=Carey,+Lisa
- http://www.librarything.com/api/whatwork.php?title=The+Mermaids+Singing+/+by+Lisa+Carey
- http://www.librarything.com/api/whatwork.php?title=merenneitojen+laulu&author=carey,+lisa
If there's interest, I can add a JSON version.
*You need to provide either an ISBN (ISBN10 or 13; with dashes or not) or a title and author. Authors can be in last-first (preferred) or first-last (fine). You can omit the author and tack it onto the title, eg., "Huckleberry Finn / Twain, Mark." It's very forgiving about punctuation, capitalization and so forth. It doesn't make wild guesses, but it makes sensible ones.
Labels: apis, new features
5 Comments:
Neat new algorithm. However - is 'sure-wife' a Freudian slip (since your example is your wife's book)?
I am not sure what your links are supposed to show but I get:
This XML file does not appear to have any style information associated with it. The document tree is shown below.
Its the same for all of them.
I am on a PC, XP, FF2.XX
@FicusFan: it's not meant for people to look at; it's meant for programs to request and process.
Thanks. Planning to include a link to the LibraryThing work in the next version of OpenBook. April ... maybe.
Tim, a JSON version would be quite handy for including a LT link in OpenBook.
Post a Comment
<< Home