Metropolitan Museum GPT

Metropolitan Museum GPT · GPT-Aktionen

Metropolitan Museum of Art Collection API

Access to over 470,000 artworks from the Metropolitan Museum of Art's collection, including high-resolution images.

  • GET /objects/{objectID}Record for an Object
  • GET /departmentsList of All Departments
  • GET /searchSearch Objects
Ursprüngliches API-Schema
{
  "openapi": "3.1.0",
  "info": {
    "title": "Metropolitan Museum of Art Collection API",
    "description": "Access to over 470,000 artworks from the Metropolitan Museum of Art's collection, including high-resolution images.",
    "version": "v1.0.0"
  },
  "servers": [
    {
      "url": "https://collectionapi.metmuseum.org/public/collection/v1"
    }
  ],
  "paths": {
    "/objects/{objectID}": {
      "get": {
        "summary": "Record for an Object",
        "operationId": "getObjectById",
        "parameters": [
          {
            "name": "objectID",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Data about the specified object",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectResponse"
                }
              }
            }
          }
        }
      }
    },
    "/departments": {
      "get": {
        "summary": "List of All Departments",
        "operationId": "getDepartments",
        "responses": {
          "200": {
            "description": "A list of all departments",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DepartmentsResponse"
                }
              }
            }
          }
        }
      }
    },
    "/search": {
      "get": {
        "summary": "Search Objects",
        "operationId": "searchObjects",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "description": "Search term, e.g., 'sunflowers'",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "isHighlight",
            "in": "query",
            "description": "Returns objects that are designated as highlights when true",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "title",
            "in": "query",
            "description": "Search specifically against the title field for objects",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Search results",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ObjectsResponse": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer",
            "description": "The total number of publicly-available objects"
          },
          "objectIDs": {
            "type": "array",
            "description": "An array containing the object ID of each publicly-available object",
            "items": {
              "type": "integer"
            }
          }
        },
        "required": [
          "total",
          "objectIDs"
        ]
      },
      "ObjectResponse": {
        "type": "object",
        "properties": {
          "objectID": {
            "type": "integer"
          },
          "isHighlight": {
            "type": "boolean"
          },
          "accessionNumber": {
            "type": "string"
          },
          "accessionYear": {
            "type": "string"
          },
          "isPublicDomain": {
            "type": "boolean"
          },
          "primaryImage": {
            "type": "string",
            "format": "uri"
          },
          "primaryImageSmall": {
            "type": "string",
            "format": "uri"
          },
          "additionalImages": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uri"
            }
          },
          "constituents": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "constituentID": {
                  "type": "integer"
                },
                "role": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "constituentULAN_URL": {
                  "type": "string",
                  "format": "uri"
                },
                "constituentWikidata_URL": {
                  "type": "string",
                  "format": "uri"
                },
                "gender": {
                  "type": "string"
                }
              }
            }
          },
          "department": {
            "type": "string"
          },
          "objectName": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "culture": {
            "type": "string"
          },
          "period": {
            "type": "string"
          },
          "dynasty": {
            "type": "string"
          },
          "reign": {
            "type": "string"
          },
          "artistRole": {
            "type": "string"
          },
          "artistDisplayName": {
            "type": "string"
          },
          "artistDisplayBio": {
            "type": "string"
          },
          "artistNationality": {
            "type": "string"
          },
          "artistBeginDate": {
            "type": "string"
          },
          "artistEndDate": {
            "type": "string"
          },
          "artistGender": {
            "type": "string"
          },
          "artistWikidata_URL": {
            "type": "string",
            "format": "uri"
          },
          "artistULAN_URL": {
            "type": "string",
            "format": "uri"
          },
          "objectDate": {
            "type": "string"
          },
          "objectBeginDate": {
            "type": "integer"
          },
          "objectEndDate": {
            "type": "integer"
          },
          "medium": {
            "type": "string"
          },
          "dimensions": {
            "type": "string"
          },
          "creditLine": {
            "type": "string"
          },
          "geographyType": {
            "type": "string"
          },
          "city": {
            "type": "string"
          },
          "state": {
            "type": "string"
          },
          "county": {
            "type": "string"
          },
          "country": {
            "type": "string"
          },
          "region": {
            "type": "string"
          },
          "subregion": {
            "type": "string"
          },
          "locale": {
            "type": "string"
          },
          "locus": {
            "type": "string"
          },
          "excavation": {
            "type": "string"
          },
          "river": {
            "type": "string"
          },
          "classification": {
            "type": "string"
          },
          "rightsAndReproduction": {
            "type": "string"
          },
          "linkResource": {
            "type": "string",
            "format": "uri"
          },
          "metadataDate": {
            "type": "string",
            "format": "date-time"
          },
          "repository": {
            "type": "string"
          },
          "objectURL": {
            "type": "string",
            "format": "uri"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "term": {
                  "type": "string"
                },
                "AAT_URL": {
                  "type": "string",
                  "format": "uri"
                },
                "Wikidata_URL": {
                  "type": "string",
                  "format": "uri"
                }
              }
            }
          },
          "objectWikidata_URL": {
            "type": "string",
            "format": "uri"
          },
          "isTimelineWork": {
            "type": "boolean"
          },
          "GalleryNumber": {
            "type": "string"
          }
        },
        "required": [
          "objectID",
          "isHighlight",
          "primaryImage"
        ]
      },
      "DepartmentsResponse": {
        "type": "object",
        "properties": {
          "departments": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "departmentId": {
                  "type": "integer"
                },
                "displayName": {
                  "type": "string"
                }
              },
              "required": [
                "departmentId",
                "displayName"
              ]
            }
          }
        },
        "required": [
          "departments"
        ]
      },
      "SearchResponse": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer",
            "description": "The total number of publicly-available objects"
          },
          "objectIDs": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "An array containing the object ID of publicly-available objects"
          }
        },
        "required": [
          "total",
          "objectIDs"
        ]
      }
    }
  }
}