-
Notifications
You must be signed in to change notification settings - Fork 3
External API Endpoints Documented
Matt Miller edited this page Dec 17, 2025
·
1 revision
This document describes all external API endpoints used by the reconciliation service strategies.
Base URL: https://openlibrary.org
File: lib/strategies_openlibrary.py
-
URL:
/search.json - Method: GET
- Purpose: Search for books by title and author
-
Parameters:
Parameter Type Description titlestring Book title to search authorstring Author name to search limitstring Maximum number of results (default: '50') -
Function:
_search_title()
-
URL:
/works/{work_key}.json - Method: GET
- Purpose: Fetch detailed work data for a specific work
- Parameters: None (work_key is part of the path)
-
Function:
extend_data()
-
URL:
/works/{work_key}/editions.json - Method: GET
- Purpose: Fetch all editions for a work (ISBNs, publishers, OCLC numbers, etc.)
- Parameters: None (work_key is part of the path)
-
Function:
extend_data()
Base URL: https://www.googleapis.com/books/v1
File: lib/strategies_google_books.py
-
URL:
/volumes - Method: GET
- Purpose: Search for books
-
Parameters:
Parameter Type Description qstring Query string with intitle:andinauthor:prefixesprojectionstring Data projection level maxResultsinteger Maximum number of results -
Function:
_search_google_books()
-
URL:
/volumes/{volume_id} - Method: GET
- Purpose: Retrieve specific volume details
- Parameters: None (volume_id is part of the path)
-
Function:
_parse_single_results()
Base URL: https://viaf.org
File: lib/strategies_viaf.py, lib/strategies_helpers.py
-
URL:
/api/search - Method: POST (JSON body)
- Purpose: Search for names and titles
-
Request Body:
{ "reqValues": { "field": "local.localID", "index": "local.localID", "searchTerms": "search query" }, "meta": { "env": "live", "pageIndex": 1, "pageSize": 100 } } -
Functions:
_search_name(),_search_title()
-
URL:
/{viaf_id}/rdf.xmlor/viaf/{viaf_id}/rdf.xml - Method: GET
- Purpose: Download cluster RDF data for a VIAF record
- Parameters: None (viaf_id is part of the path)
-
Function:
_download_viaf_cluster_rdf()
Base URL: https://americas.discovery.api.oclc.org/worldcat/search/v2
File: lib/strategies_oclc.py
-
URL:
https://oauth.oclc.org/token - Method: POST
- Purpose: Obtain OAuth2 access token
-
Parameters:
Parameter Type Description grant_typestring Always 'client_credentials' scopestring API scope - Authentication: Basic Auth with client_id and client_secret
-
Function:
get_access_token()
-
URL:
/bibs - Method: GET
- Purpose: Search WorldCat bibliographic records
-
Parameters:
Parameter Type Description qstring Search query with au:(author) andti:(title) prefixeslimitinteger Maximum number of results -
Headers:
Authorization: Bearer {access_token} -
Functions:
_search_worldcat(),_search_title()
Base URL: https://id.loc.gov
File: lib/strategies_id_loc_gov.py, lib/strategies_helpers.py
-
URL:
/resources/works/suggest2/ - Method: GET
- Purpose: Search and suggest works
-
Parameters:
Parameter Type Description qstring Search query searchtypestring Type of search rdftypestring RDF type filter countinteger Number of results -
Function:
_search_id()
-
URL:
/authorities/names/suggest2/ - Method: GET
- Purpose: Search and suggest name authorities
-
Parameters:
Parameter Type Description qstring Search query (LCCN or name) -
Function:
_return_lc_suggest2_data()
-
URL:
/resources/instances/{id}.cbd.rdf - Method: GET
- Purpose: Retrieve instance RDF data
- Parameters: None (id is part of the path)
-
Function:
_enrich_id()
Base URL: https://query.wikidata.org
File: lib/strategies_wikidata.py, lib/strategies_helpers.py
-
URL:
/sparql - Method: GET
- Purpose: Execute SPARQL queries against Wikidata
-
Parameters:
Parameter Type Description querystring SPARQL query string formatstring Response format (default: 'json') -
Functions:
_search_title(),_return_wikidata_value()
Files: lib/strategies_hathitrust.py, lib/strategies_hathitrust_build_db.py
-
URL:
https://www.hathitrust.org/files/hathifiles/hathi_file_list.json - Method: GET
- Purpose: Get list of available HathiTrust dump files for download
- Parameters: None
-
Function:
find_dump_url()
-
URL:
https://catalog.hathitrust.org/Record/{ht_bib_key} - Purpose: Direct link to HathiTrust catalog records
-
Usage: Building result URIs in
_parse_results()
-
URL:
https://babel.hathitrust.org/cgi/imgsrv/cover - Method: GET
- Purpose: Retrieve cover images for records
-
Parameters:
Parameter Type Description idstring HathiTrust identifier widthinteger Image width -
Function: Used in
extend_data()for thumbnails
Base URL: http://www.worldcat.org
-
URL:
/oclc/{oclc_number} - Purpose: Direct link to WorldCat records
- Usage: Building result URIs in OCLC strategy
| API Service | Base URL | Auth Required | Primary Use |
|---|---|---|---|
| Open Library | https://openlibrary.org |
No | Book search & metadata |
| Google Books | https://www.googleapis.com/books/v1 |
API Key (optional) | Book search |
| VIAF | https://viaf.org |
No | Authority data |
| OCLC WorldCat | https://americas.discovery.api.oclc.org |
OAuth2 | Bibliographic search |
| Library of Congress | https://id.loc.gov |
No | Authority & work data |
| Wikidata | https://query.wikidata.org |
No | SPARQL queries |
| HathiTrust | https://www.hathitrust.org |
No | Dump files & records |