Smithsonian

The Smithsonian Service provides access to the Smithsonan open-access EDAN database, containing catalogued information on millions of historical items.

RPCS

Smithsonian.getImage(id: String)

Get an image associated with the given object, if available. This requires the id of the object, as provided by Smithsonian.search() or Smithsonian.searchImageContent().

Arguments:

  • id: String (String) - id of the object

Returns: Image (Image) - an image of the object

Smithsonian.search(term: String, count: BoundedNumber<1, 1000>?, skip: BoundedNumber<0>?)

Search and return a list of up to count items that match the search term. Because there may be a large number of matching items, you can also provide a number of items to skip.

Each item in the returned array is structured data about that matching item. The fields for this data include:

  • id - the id of the matching item, needed by Smithsonian.getImage().
  • title - the title/name of the matching item
  • types - a list of categories the item falls under (e.g., Vases, Paintings)
  • authors - a list of authors/creators of the item or digitized version
  • topics - a list of topic names for the item (e.g., Anthropology, Ethnology)
  • notes - a list of extra notes about the object, in no particular organization
  • physicalDescription - a list of pairs of [label, content] regarding the physical description of the object
  • sources - a list of pairs of [label, content] describing the source of the item or digitization
  • hasImage - true if the image is listed as having image content in the database. Only items with this field being true can expect Smithsonian.getImage() to succeed.

If you would like to search for only items which have image content available, you can perform manual filtering on the hasImage field of the results, or you can use Smithsonian.searchImageContent(), which does the same thing for you.

Arguments:

  • term: String (String) - Term to search for
  • count: BoundedNumber<1, 1000>? (BoundedNumber) - Maximum number of items to return (default 100)
  • skip: BoundedNumber<0>? (BoundedNumber) - Number of items to skip from beginning

Returns: List (List) - Up to count matches

Smithsonian.searchImageContent(term: String, count: BoundedNumber<1, 1000>?, skip: BoundedNumber<0>?)

Equivalent to Smithsonian.search() except that only images with image content (hasImage = true) are returned.

The filtering of returned matches is done after pulling data from the database. Thus, you should treat count as the max number of unfiltered items to return, and similarly skip as the number of unfiltered items to skip.

Arguments:

  • term: String (String) - Term to search for
  • count: BoundedNumber<1, 1000>? (BoundedNumber) - Maximum number of items to return
  • skip: BoundedNumber<0>? (BoundedNumber) - Number of items to skip from beginning

Returns: List (List) - Up to count matches