| 
  • If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • Get control of your email attachments. Connect all your Gmail accounts and in less than 2 minutes, Dokkio will automatically organize your file attachments. You can also connect Dokkio to Drive, Dropbox, and Slack. Sign up for free.

View
 

Victoria and Albert Museum API Docs

Page history last edited by Owen Stephens 8 years, 5 months ago

Victoria & Albert Museum API Documentation

 

Welcome to our API. It is designed as a RESTful interface to our collections and what we know about them.

 

If you make a request to this service you are deemed to have accepted the terms and conditions.

 

Principles and Getting Started

 

Interface

We strongly believe in the URL as interface. It's nice to be able to read a URL and guess what it might bring back

We also believe the URL is a better interface than a complex SOAP or XML-RPC based system for returning data that is generally available elsewhere.

http://www.vam.ac.uk/api

This page.

 

Format

The first part of the URL indicates the format in which you would like your response

http://www.vam.ac.uk/api/json/museumobject/

Returns all items in the database (paginated) in serialised JavaScript format

http://www.vam.ac.uk/api/xml/museumobject/

Returns all items in the database (paginated) in XML format. Note this is not yet as fully implemented as JSON but could be useful if your app prefers to consume XML. The JSON contains more of the related information concerning objects.

 

Using the API in anger

 

General Keyword Searching

The emphasis on the API is on bringing back Objects from the museum collection.

Everything the API knows about is searchable by keyword. Simply pass your query string to the search interface in the q GET parameter

http://www.vam.ac.uk/api/json/museumobject/search?q=wooden+door

 

Keyword searches in specific fields

You can filter your museum object search results by type, people, places. materials, techniques and categories

Object Type and Title

To find necklaces:

http://www.vam.ac.uk/api/json/museumobject/search?objectnamesearch=necklace

Or The Hay Wain

http://www.vam.ac.uk/api/json/museumobject/search?objectnamesearch=hay+wain

People and Places

Search on a specific artist or maker:

http://www.vam.ac.uk/api/json/museumobject/search?namesearch=josiah+wedgwood

Or items from Stockon

http://www.vam.ac.uk/api/json/museumobject/search?placesearch=stockton

Materials and techniques

Crucial to a museum of applied arts, you too can search on this information. Look for items that are glazes:

http://www.vam.ac.uk/api/json/museumobject/search?materialsearch=glazing

Or items made with ivory

http://www.vam.ac.uk/api/json/museumobject/search?materialsearch=ivory

 

Dates and other delights

Why not bring back recent objects?

http://www.vam.ac.uk/api/json/museumobject/search?after=1990

Or before 1000BC? Note the signed integer indicating a date BCE.

http://www.vam.ac.uk/api/json/museumobject/search?before=-1000

Pre-Roman Greek objects made of silver?

http://www.vam.ac.uk/api/json/museumobject/search?before=-150&placesearch=greece&materialsearch=silver

A selection of random* objects associated with wine!

http://www.vam.ac.uk/api/json/museumobject/search?q=wine&random=1

*Not really random but a pseudo-random offset of the results. MySQL RAND() is SO slow.

A selection of nudes, but only those with images available!

http://www.vam.ac.uk/api/json/museumobject/search?q=nude&images=1

Only records with a detailed description

http://www.vam.ac.uk/api/json/museumobject/search?q=nude&pad=1

 

Geospatial search

You can set an anchor point using latitude and longitude to search around, then set a radius within which you wish to search

This returns objects we have succesfully geocoded within a 50km radius of Bruges

http://www.vam.ac.uk/api/json/museumobject/search?latitude=51.208013&longitude=3.227105&radius=50

You can order your results in ascending order of distance from the anchor point

http://www.vam.ac.uk/api/json/museumobject/search?latitude=51.208013&longitude=3.227105&radius=50&orderby=distance

 

Full record details

If you like the look of something in your results, simply append the object_number from the fields section of the response to the end of the appropriate URL interface more information

http://www.vam.ac.uk/api/json/museumobject/O12345

Yes - that's an 'O' for Oscar.

With a museum object, you'll see all the associated people, places, categories, styles and periods, materials and techniques. In short, everything we know about the object usefully split up into separate fields.

 

Images and Media

We have pre-processed several sizes of images and we make these available at predictable URLs based on the image_id field of image records

Many high-resolution images are available to order for free at http://collections.vam.ac.uk/

 

Constructing URLS to images

By taking this Museum Object result, and identifying the primary_image_id value, we can make a URL to retreive the image.

    {
        "pk": 7052, 
        "model": "collection.museumobject", 
        "fields": {
            ...
            "primary_image_id": "2007BL8769", 
        }, 
        ...

Collection object images are served from this location.

http://media.vam.ac.uk/media/thira/collection_images/

The second part of the URL is constructed from the first 6 characters of the image id.

http://media.vam.ac.uk/media/thira/collection_images/2007BL/

The final part of the URL is the image id with a jpg extension - at its most simple...

http://media.vam.ac.uk/media/thira/collection_images/2007BL/2007BL8769.jpg

 

Images Sizes

We have also pre-processed the following image sizes:

Please note that due to the extra-ordinary bulk import of these images, some may not be available. A standard 404 will be returned in these cases.

 

Comments (1)

Richard Light said

at 10:42 am on Dec 10, 2010

I'm puzzled by the comment that the JSON is more detailed than the XML. An examination of the results suggests the opposite: certainly the XML contains textual info lacking in the JSON. What additional info is found only in the JSON output?

Another question: what is the purpose of the "slug" field? Is it for constructing dbpedia-style URLs, and if so, what form should they take?

You don't have permission to comment on this page.