Restriction

A restriction can be applied in combination with Searching or Filtering to remove irrelevant matching results. You can also just use a restriction by itself, but this is likely to return too many results to be useful.

Restricting by year made

One way to narrow down overwhelming results from a search is to restrict them to a time period of particular interest, if it is known. These parameters allow you to give a range of years of interest for when the object was made.

Be aware that many objects have uncertain production dates; the further back in time the larger this production date uncertainty is likely to be. For example, an object made in the 16th century might only have an estimated date to within the century or half century range. This means there are often two ranges that need to be compared, the range you specify in the query and the range of the objects production date. We include in the response any object records where these two ranges overlap, even if it’s just by a year. For example, if you query for any objects made from 1700 to 1750, an object with a estimated production date range of 1650 to 1700 would be included in the returned object records.

If you need to use BC/BCE years you need to enter them as a negative number, for example ‘429BC’ is ‘-429’.

If you only use the year_made_from parameter, this will include all object records from that given year to the heat death of the current universe (inclusive).

If you only use the year_made_to parameter, this will cover all object records from the birth of the current universe to that given year (inclusive).

import requests
req = requests.get('https://api.vam.ac.uk/v2/objects/search?id_place=x33164&year_made_from=1800&year_made_to=1900')
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 catalogued that were made, depict or are associated with the city of Cork during the period 1800 to 1900")
There are 8 objects catalogued that were made, depict or are associated with the city of Cork during the period 1800 to 1900

Restricting by year accessioned

Similiarily to above, this lets you find when an object was accessioned into the V&A collection. In this case the year of accession is certain (compared to production dates), but be aware this might not have been when the object first arrived at the museum.

import requests
req = requests.get('https://api.vam.ac.uk/v2/objects/search?year_accessioned_from=2015&year_accessioned_to=2020')
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 catalogued that were accessioned during the period 2015 to 2020")
There are 46723 objects catalogued that were accessioned during the period 2015 to 2020

Restricting by images existing

This parameter (images_exist=1) restricts your results to only those object records that have object images available to show online.

import requests
req = requests.get('https://api.vam.ac.uk/v2/objects/search?id_place=x41085&images_exist=1')
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 were made, depict or are associated with Stavanger, Norway and have images available online")
There are 4 objects that were made, depict or are associated with Stavanger, Norway and have images available online

Restricting by image size

This further lets you restrict results to only those that have larger images available to show. The following parameter options are currently available:

  • 0 - Equivalant to images_exist above, this returns object records that have images of any size available

  • 1 - This returns object records that only have images available upto 768 pixels on the longest length

  • 2 - This returns object records that have images available upto 2500 pixels on the longest length

import requests
req = requests.get('https://api.vam.ac.uk/v2/objects/search?id_place=x32322&image_restrict=2')
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 were made, depict or are associated with Melbourne, Australia that have 2500px images available")
There are 44 objects that were made, depict or are associated with Melbourne, Australia that have 2500px images available

Restricting by abundance of data

This parameter (‘data_restrict’) let you select records depending on the extent of cataloguing. The parameter options are:

  • basic_only - Matches object records with only a few fields populated, at an early stage of cataloguing

  • physical_only - Matches only object records that have more fields populated, typically fields relating to the physical characteristics of the object such as Materials and Techniques

  • physical_plus - Matches basic_only records and object records that have more fields populated, typically fields relating to the physical characteristics of the object such as Materials and Techniques

  • descriptive_only - Matches only object records that usually have the most fields populated including the more descriptive fields such as summaryDescription.

import requests
req = requests.get('https://api.vam.ac.uk/v2/objects/search?q=Boston&data_restrict=basic_only')
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 records that mention the word 'Boston' and have basic data available")
There are 150 objects records that mention the word 'Boston' and have basic data available
import requests
req = requests.get('https://api.vam.ac.uk/v2/objects/search?q=Boston&data_restrict=physical_only')
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 records that mention the word 'Boston' and have basic_plus data available")
There are 291 objects records that mention the word 'Boston' and have basic_plus data available
import requests
req = requests.get('https://api.vam.ac.uk/v2/objects/search?q=Boston&data_restrict=physical_plus')
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 records that mention the word 'Boston' and have physical_plus data available")
There are 0 objects records that mention the word 'Boston' and have physical_plus data available
import requests
req = requests.get('https://api.vam.ac.uk/v2/objects/search?q=Boston&data_restrict=descriptive_only')
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 records that mention the word 'Boston' and have descriptive_only data only")
There are 660 objects records that mention the word 'Boston' and have descriptive_only data only

Restricting by on display

This parameter (‘on_display_at’) lets you restrict object record results to those that are currently on display at a V&A site. The current options are:

  • south_kensington

  • dundee

  • moc

import requests
req = requests.get('https://api.vam.ac.uk/v2/objects/search?q=viking&on_display_at=dundee')
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 record(s) that mention the word 'Viking' and are on display at V&A Dundee")
There are 1 objects record(s) that mention the word 'Viking' and are on display at V&A Dundee