Open Art Search API

Semantic search over {{COUNT}} public-domain artworks from The Metropolitan Museum of Art Open Access collection, for agents and scripts. Read-only JSON over HTTPS. No key needed.

Index build {{BUILD}} · the same index, EmbeddingGemma 2 model and ranking as the Open Art Search app · machine-readable spec: /openapi.json

Quick start

curl "{{BASE}}/api/search?query=a+cat+sleeping&limit=2"

Response (live from this server):

{{EXAMPLE}}

Then use a result's id with /api/artworks/{id}, /api/artworks/{id}/similar or /api/attribution?ids=….

For agents

Endpoints

GET

/api/search

Semantic search. The query is embedded by EmbeddingGemma 2 and compared with every artwork's image embedding, its catalogue-text embedding, or both. With no query, the endpoint returns the browse order (highlights first) for the filters.

parametervaluemeaning
querytext, ≤ 200 charactersWhat to find, in any language: stormy sea at night, Hokusai, a cat sleeping. q is an alias.
matchboth (default) · img · txtimg compares the query with what artworks look like (image embedding). txt compares it with what the catalogue says (title, maker, date, culture, medium, classification, subject tags). both adds the two standardised scores and gives a small lift to exact title/artist words.
typean object typeFor example Paintings, Prints or Photographs. See /api/filters for the full list.
departmenta Met curatorial departmentFor example Asian Art. See /api/filters.
dateFrom, dateToyears, −10000…2100Keep artworks whose date range overlaps the given years. Negative years are BCE. Undated works are excluded when either is set.
limit1–50, default 8Results per page.
offset0–1199Start position. The top 1,200 results per query can be paged. Follow nextOffset while hasMore is true.

Each result carries id, rank, title, artist, date, thumbnailUrl, sourceUrl and its scores. score is the ranking value (sum of per-signal z-scores). imageSimilarity and metadataSimilarity are approximate cosine similarities (−1…1) that show why it matched. matchedOn names the signal used.

curl "{{BASE}}/api/search?query=portrait+of+a+woman&match=img&type=Paintings&dateFrom=1600&dateTo=1700&limit=4&offset=4"
GET

/api/artworks/{id}

The full catalogue record for one artwork. It includes title, artist, date, object name, medium, dimensions, culture, department, accession number, subjects, image URLs, the metmuseum.org page, rights, credit line and a citation-ready attribution. An unknown ID returns 404.

curl "{{BASE}}/api/artworks/met:436535"
GET

/api/artworks/{id}/similar

Artworks that look similar to this one, ranked by their stored image embeddings. No text is involved, and the artwork itself is excluded. Accepts type, department, dateFrom, dateTo, limit and offset as above. Each result has a visualSimilarity.

curl "{{BASE}}/api/artworks/met:436535/similar?type=Paintings&limit=5"
GET

/api/attribution

Source page, rights statement, credit line and attribution line for up to 20 artworks. Pass them as comma-separated ids. Unknown IDs are flagged per item and don't fail the request.

curl "{{BASE}}/api/attribution?ids=met:436535,met:45434"
GET

/api/filters

Accepted type and department values with artwork counts, plus the dated year range and the match modes.

GET

/api/status

Index build and size, query-model readiness, uptime and request counts. If the model is ever unavailable, /api/search falls back to title/artist keyword matching and says so in matchedOn.

Errors and limits

Data and rights

Only objects The Met flags as public domain, with an image and no third-party rights note, are indexed. Metadata and images are CC0 1.0 (The Met Open Access). Thumbnails load from images.metmuseum.org. The index is derived from that data: filtered, re-formatted and embedded. Model: google/embeddinggemma-2 (Apache 2.0; use is subject to the Gemma Prohibited Use Policy). Queries run on its q4 ONNX text encoder (onnx-community/embeddinggemma-2-ONNX). This project is not affiliated with or endorsed by The Metropolitan Museum of Art.