Miscellaneous

Random (random)

Fairly simply, this returns a random ordering of objects. There is not much point using this with most Searching or Filtering operations as they are the implacable enemy of the random.

import requests
req = requests.get('https://api.vam.ac.uk/v2/objects/search?random=1')
object_data = req.json()
object_info = object_data["info"]
object_records = object_data["records"]
print("There are %d objects records and the first object id at random is %s" % (object_info["record_count"], object_records[0]['systemNumber']))
There are 1238253 objects records and the first object id at random is O599665

Search Mode (search_mode)

As discussed in Narrow Matching, this controls whether multiple filters of the same type have to all be successfully matched or not. By default only one of them needs to match an object record for it to be returned (‘broad’). A ‘narrow’ search mode can be enforced so then an object record has to match on all of the filters specified.

import requests
req = requests.get('https://api.vam.ac.uk/v2/objects/search?id_material=AAT11029&id_material=AAT132861&search_mode=narrow')
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 contain silver ('AAT11029') and lace ('AAT132861')")
There are 5 objects that contain silver ('AAT11029') and lace ('AAT132861')

Search Profile (search_profile)

This controls the search type, and is used for the V&A website to enable various website features.