Open Library logo
Last edited by Drini
3 days ago | History

Open Library Search API

Open Library provides an experimental API to search.

WARNING: This is an experimental API and can change in future.

URL format

The URL format for API is simple. Take the search URL and add .json to the end. Eg:

Response Format

The response with be of the following format.

{
    "start": 0,
    "num_found": 629,
    "docs": [
        {...},
        {...},
        {...},
        ...
        {...}]
}

Each document specified listed in "docs" will be of the following format:

{
    "cover_i": 258027,
    "has_fulltext": true,
    "edition_count": 120,
    "title": "The Lord of the Rings",
    "author_name": [
        "J. R. R. Tolkien"
    ],
    "first_publish_year": 1954,
    "key": "OL27448W",
    "ia": [
        "returnofking00tolk_1",
        "lordofrings00tolk_1",
        "lordofrings00tolk_0",
        "lordofrings00tolk_3",
        "lordofrings00tolk_2",
        "lordofrings00tolk",
        "twotowersbeingse1970tolk",
        "lordofring00tolk",
        "lordofrings56tolk",
        "lordofringstolk00tolk",
        "fellowshipofring00tolk_0"
    ],
    "author_key": [
        "OL26320A"
    ],
    "public_scan_b": true
}

The fields in the doc are described by Solr schema which can be found here:
https://github.com/internetarchive/openlibrary/blob/master/conf/solr/conf/schema.xml

The schema is not guaranteed to be stable, but most common fields (e.g. title, IA ids, etc) should be safe to depend on.

The special text field is a composite of the strings in many other fields (edition titles, subtitles, subjects, ISBNs, etc) which is used for the current "All" search mode. This, in particular, is very likely to change in the future.

History

3 days ago Edited by Drini Add author search example
March 12, 2020 Edited by Tom Morris Add info on the Solr document schema
April 1, 2016 Edited by Charles Horn correct urls and update returned json examples
February 27, 2013 Created by Anand Chitipothu documented search API.