Simple Library Search: Using the Bibliographic Deep Linking API
In this guide article you will learn how to add a simple search prompt, to any web page, that will search a Collection defined in the Platform directory with an associated Service.
Collections and Services can be maintained using the Directory User Interface. Full details of the Bibliographic Deep Linking API are available in the api reference.
To acces the api you will need to obtain an API Key. The API Key identifies your usage of the Talis Platform and helps us keep count of how popular the services are. You get your API Key by joining the TDN (which is free), and clicking on the "api keys" tab in your account view. Use the "request new api key" button to create new key that can be used immediately.
By using simple html form elements, to construct a URL which conforms to api definition, the following search prompts are easily created – try them, they work.
The code for these two search forms are as follows:
<center><b>Search Birmingham University Collection </b>
<form method="get" action="http://api.talis.com/1/node/items/bham.swdefault/bib">
Title: <input type="text" name="title" size="25"/> <input type="submit" value="Search"/><br/>
<input type="hidden" name="api_key" value="{API_KEY}">
</center>
</form>
<br/><center><b>Search Bury Metro Libraries Collection</b>
<form method="get" action="http://api.talis.com/1/node/items/0010.inst/bib">
Title: <input type="text" name="title" size="25"/> <input type="submit" value="Search"/><br/>
<input type="hidden" name="api_key" value="{API_KEY}">
</center>
</form>
As can be seen the only difference between the two search forms is the collection_id value (bham.swdefault for Birmingham and 0010.inst for Bury). Check out the Dircetory for the collection_id of your favorite library. If you copy one of these forms, remember to replace ‘{API_KEY}’ with your api_key.
And that’s all there is to it. By giving the text input a name of ‘isbn’ or ‘author’, searches of those types can be constructed.
Obviously the api URL can be constructed using many other methods, including JavaScript, php, etc.



Deep linking API queries
I've got a couple of questions about the deep linking API:
First, why does it only search a maximum of two fields simultaneously? I seem to recall reading some explanation of this somewhere, but my information retrieval skills have deserted me in anticipation of Friday lunchtime...
Second, why doesn't the API allow keyword searching? My three library services have recently upgraded to Prism 2.0, which allows keyword searching via Open URL Search, but the API won't (can't?) do it.
Two minor gripes: otherwise, I'm a fan of the API and the opportunities it presents. I lack the skills to do anything more interesting than a couple of HTML search boxes, but the mashups released so far have been genuinely interesting. Even if Lillian the Virtual Librarian doesn't recognise Bolton...
Cheers,
Michael.
Michael Stead
e-Resources Librarian
Bolton, Wigan and Trafford Libraries
michael[dot]stead[at]bolton[dot]gov[dot]uk
Deep Link mapping
Hi Michael,
I hope it was an excellent Friday lunchtime ;-}
The power of the Deep Linking API is that it provides a generic search API to an OPAC, regardless of the supplier of that OPAC. As you are probably aware, each system supplier uses different methods and URL syntaxes to drive searches in to their OPAC.
Under the covers of the Deep Linking API, these generic search parameters you pass to it are mapped to the equivalent for each specific OPAC type. Theses mappings are held in the Talis Directory. The issue that arises with such a mapping, is what do you do with a search that is not supported by the OPAC you are mapping to.
The initial release of the API, as documented, supports title, author, and isbn. The default mappings, as currently entered in to the Directory, are for these individual searches plus title and author together. These mappings were chosen as a default as they were supported by the vast majority of systems encountered at that time.
As you correctly identify the Talis OPAC Prism has recently added keyword as a search type to its OpenURL search capability, which is used by the Deep Linking API.
In the future we expect to enhance the API to take extra search terms, such as keyword. If we do this, we will have to enhance all the mappings to take account of this new supported search, by either mapping it to a specific system's keyword search if available, or probably to title if it does not.
Also in the future, our intention is that the mappings held in the Directory will be user configurable. This will enable the mappings to be fine tuned to the operation of each individual system.
I hope this clarifies the current situation.
Richard Wallis
Technology Evangelist - Talis
[Hangs head in shame]
Hi Richard.
Thanks for clearing that up. I'm ever-so-slightly appalled that I couldn't find the documentation, despite the vague recollection of having seen it. I'm putting it down to a combination of mental and physical fatigue-related factors.
What I had wondered about, and also looked for, was a method of changing the Software field in the Bolton Libraries OPAC entry to Prism 2.0, rather than Prism.
Obviously, it turned out that I couldn't do it. In my addled and half-starved state, I grasped desperately for the detail on the API I was sure I'd read, but met with failure. Which is where you come in: thanks, again, for answering my question.
In my view, the Directory and APIs based on it have the potential to make a massive difference to the way we search libraries and their holdings. It's just a shame that it can't exploit all of the advantages that Prism 2.0, and other OPACs, offer; but the reasons you give, and the anticipated future developments of all of the components involved, make the situation perfectly clear.
Lunch, BTW, solved my problems, just as it does every day :)
Michael Stead
e-Resources Librarian
Bolton, Wigan and Trafford Libraries
michael[dot]stead[at]bolton[dot]gov[dot]uk