/dev/docs/api/recentchanges
Type: /type/page
body: value: The RecentChanges API provides a way to access the recent changes to documents in Open Library.

<div class="warning">This API is experimental. Please be aware that this may change in future.</div>

## 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

* 10 most recent changes

    <https://openlibrary.org/recentchanges.json?limit=10>
    
* 10 most recent changes by people

    <https://openlibrary.org/recentchanges.json?limit=10&bot=false>
    
* changes in a given day

    <https://openlibrary.org/recentchanges/2010/08/31.json>
    
* recent author merges

    <https://openlibrary.org/recentchanges/merge-authors.json>
    
* author merges on a given day

    <https://openlibrary.org/recentchanges/2010/08/31/merge-authors.json>

## 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
title: RecentChanges API
m: edit