It looks like you're offline.
Open Library logo
additional options menu
Last edited by Tom Morris
January 2, 2022 | History

RecentChanges API

The RecentChanges API provides a way to access the recent changes to documents in Open Library.

This API is experimental. Please be aware that this may change in future.

Request Format

Open Library supports HTTP content-negotiation. The URLs for serving html pages can serve content in other formats if appropriate Accept header is provided in the HTTP request. The same can be achieved by adding appropriate extension to the regular URL.

To get list of most recentchanges in JSON format:

http://openlibrary.org/recentchanges.json

To get the most recent changes for a given date:

http://openlibrary.org/recentchanges/YYYY.json
http://openlibrary.org/recentchanges/YYYY/MM.json
http://openlibrary.org/recentchanges/YYYY/MM/DD.json

To get the most recent changes of a particular kind:

http://openlibrary.org/recentchanges/KIND.json

KIND can be anything which can appear as a transaction type, including add-cover, add-book, edit-book, merge-authors, update, revert, new-account, register and lists. More kinds of changes may be added in the future.

It is even possible to combine both date and kind in the same URL. For example:

http://openlibrary.org/recentchanges/2010/08/merge-authors.json

TODO: URLs for accessing changes by any user and changes to any page.

All the above mentioned URLs accept the following query parameters.

limit: Maximum number of entries in the response. The default value is 100 and the allowed maximum limit is 1000 for performance reasons.

offset: Number of entries to skip in the response. The default value is 0 and the allowed maximum is 10000 for performance reasons.

bot: Useful to query for changes by humans or bots. Use value true to get only bot changes and use value false to get only human changes.

Response Format

The response is always a list of changesets, sorted in the descending order of timestamp.

[
    {...},
    {...},
    {...},
    {...}
]

Each changeset is a JSON object that represents one save operation, involving one ore more documents.

Here is a sample changeset.

{
    "id": "...",
    "kind": "merge-authors",
    "author": null,
    "ip": "1.2.3.4",
    "timestamp": "2010-09-01T23:24:34.237641",
    "comment": "merge authors",
    "data": {
        "master": "/authors/OL123A",
        "duplicates": [
            "/authors/OL1235A",
            "/authors/OL1236A",
        ]
    },
    "changes": [
        {"key": "/author/OL123A", "revision": 4},
        {"key": "/author/OL1235A", "revision": 4},
        {"key": "/author/OL1236A", "revision": 4},
        {"key": "/works/OL123W", "revision": 4},
        ...
    ]
}

Sample Queries

Bulk Access

This API should not be used for bulk download. Dumps of all changes are regularly provided.

See http://openlibrary.org/data#bulk_download for more details

History

January 2, 2022 Edited by Tom Morris Change protocol to HTTPS on examples and fix typo for "bot" query parameter
December 1, 2015 Edited by Jessamyn West test
August 24, 2015 Edited by Tom Morris Add revert & register kinds
June 15, 2013 Edited by Ben Companjen Added change types that can be queried
September 9, 2010 Created by Anand Chitipothu recentchanges api