Keyword filter

This type of parameter is a filter, but instead of using an identifier from a controlled vocabulary, it uses the term for the concept itself to match on. This might seem preferable than having to discover some cryptic identifer for a concept such as “AAT132254”, now you can use the word “Vase” instead. However the downside of this is that you are only matching on the exact word you typed, so any variations such as “Vases”, “Flower Vase”, “Set of Vases”, and so on, will not be found. That’s why in general controlled vocabularies are a more reliable way of filtering object records (see our previous celebration of the joys of Filtering). For some keywords though (such as accession year) the year is the identifier so this is the preferred way to filter for that.

Object Type

At present, object types are not vocabulary controlled, so to identify, for example, all chairs in the catalogued collection, you need to use the keyword itself, rather than an identifer for the concept of ‘Chair’ (AAT37772)

import requests
req = requests.get('https://api.vam.ac.uk/v2/objects/search?kw_object_type=Chair')
object_data = req.json()
object_info = object_data["info"]
object_records = object_data["records"]
record_count = object_info["record_count"]
print(f"There are {record_count} objects that are of named object type 'Chair'")
There are 959 objects that are of named object type 'Chair'

As mentioned, the issue with this being a key word filter rather than a identifier filter is that the use of singular/plural terms will all be treated differently, so for example:

import requests
req = requests.get('https://api.vam.ac.uk/v2/objects/search?kw_object_type=Chairs')
object_data = req.json()
object_info = object_data["info"]
object_records = object_data["records"]
record_count = object_info["record_count"]
print(f"There are {record_count} objects that are of object type 'chairs'")
There are 0 objects that are of object type 'chairs'

Note that keyword types are not case sensitive ‘chair’ and ‘Chair’ return the same number of objects.

In common with identifier filtering, there is also the problem that all sub-types (e.g. Armchair, Chaise Longues, Egg Chair, etc) would not be discovered by this filter, and would have to be searched for individually, for example:

import requests
req = requests.get('https://api.vam.ac.uk/v2/objects/search?kw_object_type=Armchair')
object_data = req.json()
object_info = object_data["info"]
object_records = object_data["records"]
record_count = object_info["record_count"]
print(f"There are {record_count} objects that are of named object type 'Armchair'")
There are 529 objects that are of named object type 'Armchair'

These object records may or may not be relevant to your search, depending on whether you are interested in any type of chair held in the collection, or you are only interested in a specific type of chair.

Museum Accession Number

Museum Accession Numbers can be written in a variety of ways, depending on the cataloguing department, the time it was catalogued, and if it contains parts. This parameter will find an exact match for an accession number as written in the query

Note

Be aware the references to parts of objects can change how this number is written, which will mean this query will fail to find them. In that case you might prefer to use general text search instead.

import requests
req = requests.get('https://api.vam.ac.uk/v2/objects/search?kw_accession_number=E.1691-1949')
object_data = req.json()
object_info = object_data["info"]
object_records = object_data["records"]
record_count = object_info["record_count"]
print(f"There is {record_count} objects that match your query")
There is 1 objects that match your query

Museum Accession Year

The year an object was accessioned to the collection can be used as a filter, this will return all objects from that year

import requests
req = requests.get('https://api.vam.ac.uk/v2/objects/search?kw_accession_year=1925')
object_data = req.json()
object_info = object_data["info"]
object_records = object_data["records"]
record_count = object_info["record_count"]
print(f"There are {record_count} objects that match your query")
There are 7576 objects that match your query

Museum System Number

The number assigned to the object record by the collections management system can also be used a filter, if you already know the record you are looking for

import requests
req = requests.get('https://api.vam.ac.uk/v2/objects/search?kw_system_number=O18367')
object_data = req.json()
object_info = object_data["info"]
object_records = object_data["records"]
record_count = object_info["record_count"]
print(f"There is {record_count} objects that match your query")
There is 1 objects that match your query

Note

This is the same object as found by searching by the accession number above, a drawing of the Crystal Palace Dinosaurs