APIs for Libraries

Key Points

Introduction to APIs
  • APIs are used all over the web’

  • APIs alllow applications to request data from web servers

  • There are several types of APIs

  • APIs can act as a ‘middle-man’ between you and data

  • APIs can help gather bulk data & metadata from library services

Data on the Web
  • How to read structured data types: JSON & XML

  • What are parameters?

  • What are appropriate uses of data retrieved via API?

Creating URL Queries
  • REST APIs use query stings to make requests

  • URL queries are found all across the web

API Queries in Shell
  • You can request and process data from APIs using Unix shell tools

  • JSON or XML results can be parsed to plain text, to be consumed by standard Unix shell tools

API Queries in OpenRefine
  • You can augment existing data in OpenRefine with ‘Add column by fetching URLs

  • JSON or XML results can be parsed within OpenRefine

Synchronous Exercises
  • You can apply your knowledge of APIs to any of the many APIs available to you.

Exercise: OCLC WorldCat Search API
Exercise: NCBI E-utilities
  • By linking to the NCBI Entrez system through the E-utilities, you can make complicated data requests across a huge dataset.

More APIs Queries in OpenRefine
  • Such API calls can be custom built, or one can use existing Reconciliation services to enrich data

  • OpenRefine can be further enhanced by installing extensions