Skip Navigation

Opencollection API

Requests

The methods provided by the API take a range of parameters specific to their endpoints, but all methods need authentication via a request header that contains the developer's API key. Only GET requests are possible.

Method-specific parameters are documented on the method detail pages, which are listed on the API index page.

Example: fetch highlighted objects from the European Collection

using jQuery:

      $.ajax({
      url: 'https://www.brooklynmuseum.org/api/v2/collection/2/highlight',
      type: 'GET',
      beforeSend: function (xhr) {
        xhr.setRequestHeader('api_key', 'YOUR_API_KEY');
      },
      data: {},
      success: function () { },
      error: function () { },
    });
    

using cURL:

      curl --header 'api_key: YOUR_API_KEY' https://www.brooklynmuseum.org/api/v2/collection/2/highlight
    

Reference:

Example: fetch a list of 10 exhibitions that opened in the 1990s

using jQuery

          $.ajax({
          url: 'https://www.brooklynmuseum.org/api/v2/exhibition?limit=10&decade=1990',
          type: 'GET',
          beforeSend: function (xhr) {
            xhr.setRequestHeader('api_key', 'YOUR_API_KEY');
          },
          data: {},
          success: function () { },
          error: function () { },
        });
        

using cURL:

        curl --header 'api_key: YOUR_API_KEY' https://www.brooklynmuseum.org/api/v2/exhibition?limit=10&decade=1990
      

Reference:

The API responds with JSON. You can read more about responses here.