Skip to main content

OCLC WorldCat Search and Metadata APIs wrapper

Project description

Build Status Coverage Status PyPI version PyPI - Python Version Code style: black License: MIT


Early ALPHA version

A WorldCat Search and Metadata APIs wrapper abstracting OCLC's boilerplate.
BookOps-Worldcat simplifies requests to these web services making them more accessible to OCLC member libraries.


Use pip:

$ pip install bookops-worldcat


For full documentation please see


This package takes advantage of functionality of a popular Requests library. Interactions with OCLC's services are built around Requests' sessions. Authorizing a session simply requires passing OCLC's WSkey (SearchSession) or an access token (MetadataSession). Opening a session allows the user to call specific methods to facilitate communication between the user's script/client and a particular endpoint of OCLC's service. Many of the hurdles related to making valid requests are hidden under the hood of this package, making it as simple as possible.
Please note, not all functionalities of Worldcat Search and Metadata APIs are implemented as this tool was built primarily for the BookOps organization's specific needs. We are open to any collaboration to expand and improve this package.

At the moment, BookOps-Worldcat supports requests to following OCLC's web services:

Basic usage:

>>> from bookops_worldcat import SearchSession
>>> session = SearchSession(credentials="your_WSkey")
>>> result = session.lookup_oclc_number("1143317889")
>>> print(result)
<Response [200]>

Context manager:

with SearchSession(credentials="your_WSkey") as session:
    results = session.lookup_isbn("9781680502404")
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<record xmlns="">
    <leader>00000cam a2200000 i 4500</leader>
    <controlfield tag="001">1143317889</controlfield>
    <controlfield tag="008">200305t20202019nyuabf   b    001 0 eng c</controlfield>
    <datafield ind1=" " ind2=" " tag="010">
      <subfield code="a">  2018957420</subfield>
    <datafield ind1=" " ind2=" " tag="020">
      <subfield code="a">9780316230049</subfield>
      <subfield code="q">(pbk.)</subfield>
    <datafield ind1=" " ind2=" " tag="020">
      <subfield code="a">0316230049</subfield>
    <datafield ind1="1" ind2=" " tag="100">
      <subfield code="a">Christakis, Nicholas A.,</subfield>
      <subfield code="e">author.</subfield>
    <datafield ind1="1" ind2="0" tag="245">
      <subfield code="a">Blueprint :</subfield>
      <subfield code="b">the evolutionary origins of a good society /</subfield>
      <subfield code="c">Nicholas A. Christakis.</subfield>


Consult the Changelog page for fixes and enhancements of each version.


Please use Github issue tracker to submit bugs or request features.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bookops-worldcat-0.2.0.tar.gz (12.7 kB view hashes)

Uploaded source

Built Distribution

bookops_worldcat-0.2.0-py3-none-any.whl (14.8 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page