Library location information can be displayed in two possible formats:
The XML output form follows the ISO 20775 Holdings schema and includes the OCLC institution symbol, institution name, physical location, and links to online resources. For example:
<holding> <institutionIdentifier> <value>CZP</value> <typeOrSource> <pointer>http://worldcat.org/registry/institutions/</pointer> </typeOrSource> </institutionIdentifier> <physicalLocation>Peninsula Library System</physicalLocation> <physicalAddress> <text>San Mateo, CA 94403 United States</text> </physicalAddress> <electronicAddress> <text>http://www.worldcat.org/wcpa/oclc/8114241? page=frame&url=http%3A%2F%2Fcatalog.plsinfo.org%2Fsearch%2Fi0380641135 &title=Peninsula+Library+System&linktype=opac &detail=CZP%3APeninsula+Library+System%3APublic &qt=affiliate&ai=wcapi</text> </electronicAddress> <holdingSimple> <copiesSummary> <copiesCount>1</copiesCount> </copiesSummary> </holdingSimple> </holding>
To access the JSON format simply use the same request pattern as XML Holdings Location request, but include a format parameter set to json. This will send back the response JSON format. You may choose to include a callback parameter or not. Requests for data in xml format should not include the format parameter
NOTE: Do NOT embed your WSKey in client side javascripts. This will make your key visible to end users. Keys which are exposed in this way will be reissued. We are working on changes to facilitate fuller use of the JSON output format.
The library location information in JSON includes very basic record metadata and basic holdings information. "Distance:" value is roughly the number of miles from the location of the user.
{
"title": "Battle cry of freedom : the Civil War era",
"author": "McPherson, James M.",
"publisher": "Oxford University Press",
"date": "1988.",
"ISBN": [
"0195038630",
"9780195038637"
],
"OCLCnumber": "15550774",
"library": [
{
"institutionName": "Bangor Public Library",
"streetAddress1": "145 HARLOW ST",
"streetAddress2": "",
"city": "Bangor",
"state": "ME",
"country": "United States",
"postalCode": "04401",
"opacUrl": "http://www.worldcat.org/wcpa/oclc/15550774?page=frame&url=http%3A%2F%2Fursus.maine.edu%2Fsearch%7ES8%2Fi%3D0195038630%26checksum%3Db41175eb12c7a7e8412870d566cd7d82&title=Bangor+Public+Library&linktype=opac&detail=BYN%3ABangor+Public+Library%3APublic&app=wcapi&id=OCL-test",
"oclcSymbol": "BYN",
"distance": "0"
},
{
"institutionName": "Maine State Library",
"streetAddress1": "LMA BLDG",
"streetAddress2": "STATE HOUSE STA #64",
"city": "Augusta",
"state": "ME",
"country": "United States",
"postalCode": "04333",
"opacUrl": "http://www.worldcat.org/wcpa/oclc/15550774?page=frame&url=http%3A%2F%2Fursus.maine.edu%2Fsearch%2Fi0195038630%26checksum%3D41d93a3b70c5eab447c2065a28980df6&title=Maine+State+Library&linktype=opac&detail=MEA%3AMaine+State+Library%3AState/National Libra&app=wcapi&id=OCL-test",
"oclcSymbol": "MEA",
"distance": "0"
}
]
}
When the frbrGrouping parameter is set to OFF, there is one additional element provided in the json response, the number of libraries that hold that specific record in WorldCat. This is the total number of holdings for a record. This total number of holdings is often only available at the full service level. The holdings count is provided in the totalLibCount JSON element.
The OCLC Developer Network supports the use of OCLC Web Services—a set of tools and APIs that expose data and services for WorldCat and our member libraries and partner institutions or companies. learn more »
© 2010 OCLC Domestic and international trademarks and/or service marks of OCLC Online Computer Library Center, Inc. and its affiliates
Follow the OCLC Developer Network: