{"id":"providers/harvard-art-museums","relativePath":"providers/harvard-art-museums.md","title":"Harvard Art Museums API Integration Plan","markdown":"# Harvard Art Museums API Integration Plan\n\nStatus: Planned (B5 provider slice)  \nUpdated: May 30, 2026\n\n## Official source\n\n- API base/docs: <https://api.harvardartmuseums.org>\n\n## Key platform facts (from official docs)\n\n- Base API host: `https://api.harvardartmuseums.org`\n- API key required on all requests via `apikey` query parameter.\n- JSON response structure includes:\n  - `info` (pagination + response metadata)\n  - `records` (result rows)\n  - `aggregations` (optional analysis block)\n- Paging controls:\n  - `size` default 10, max 100\n  - `page` for page navigation\n  - `info.next` / `info.prev` provide full next/prev links\n- Errors:\n  - `401` invalid/missing API key\n  - `404` resource not found\n- IIIF:\n  - Image API via `baseimageurl`/`primaryimageurl` (IIIF Image API 2.1 style paths)\n  - Presentation collection: `https://iiif.harvardartmuseums.org/collections/top`\n  - Manifest base: `https://iiif.harvardartmuseums.org/manifests`\n\n## Integration goals\n\n- Add Harvard as a first-class B5 provider through `provider-interface`.\n- Preserve canonical Linked Art JSON-LD at storage boundary.\n- Respect Harvard operational/terms constraints in adapter and cache policy.\n\n## Proposed implementation slice\n\n### Adapter\n\n- `src/adapters/harvard.ts`\n  - profile descriptor\n  - object/person/exhibition search helpers\n  - content normalization to `SourceRecord` + `Artwork` DTO boundary\n  - IIIF image/manifest URL projection helpers\n\n### Routes\n\n- `GET /api/harvard/profile`\n- `POST /api/harvard/search`\n- `POST /api/harvard/object`\n- `POST /api/harvard/import`\n\n### UI\n\n- add `harvard` source toggle in `/explore`\n- preserve source attribution, rights/reuse messaging, and object link-back fields\n\n## Env configuration\n\n- `HARVARD_API_BASE` (default: `https://api.harvardartmuseums.org`)\n- `HARVARD_API_KEY` (required for live calls)\n- `HARVARD_IIIF_MANIFEST_BASE` (default: `https://iiif.harvardartmuseums.org/manifests`)\n\n## Operational and terms guardrails\n\n- Respect rate guidance: max 2500 API calls/day.\n- Do not cache/store Harvard API content longer than two weeks without explicit permission.\n- Use image URLs returned by Harvard APIs (no local image copying).\n- Preserve attribution and link-back to Harvard content location.\n- Treat provider as non-commercial-content constrained in downstream usage paths.\n\nImplementation policy:\n\n- Centralize request budgeting in provider adapter/service layer.\n- Add cache TTL defaults that cannot exceed the two-week policy.\n- Surface attribution + source URL fields in all UI entry points.\n\n## Standards mapping + tests\n\nRequired rounds (minimum): object/provenance/shared-structure + protocol/search rounds.\n\nRequired tests (failing-first):\n\n- `tests/adapters/harvard.test.ts`\n- `tests/api/harvard/profile.test.ts`\n- `tests/api/harvard/search.test.ts`\n- `tests/api/harvard/object.test.ts`\n- `tests/api/harvard/import.test.ts`\n\nPolicy tests:\n\n- API key missing/invalid behavior mapping\n- rate-budget guard behavior\n- cache TTL guard (`<= 14 days`)\n- attribution/link-back field persistence\n\nProtocol checks (B8):\n\n- OPTIONS/CORS behavior on Harvard routes\n- response shape conformance\n- URI opacity + array-cardinality safety where applicable\n\n## Exit criteria\n\n- Adapter + routes + tests green.\n- `/explore` can search/import Harvard records.\n- PR includes Standards Mapping note with round + fixture anchor coverage.\n","sections":[{"level":2,"heading":"Official source","anchor":"official-source"},{"level":2,"heading":"Key platform facts (from official docs)","anchor":"key-platform-facts-from-official-docs"},{"level":2,"heading":"Integration goals","anchor":"integration-goals"},{"level":2,"heading":"Proposed implementation slice","anchor":"proposed-implementation-slice"},{"level":3,"heading":"Adapter","anchor":"adapter"},{"level":3,"heading":"Routes","anchor":"routes"},{"level":3,"heading":"UI","anchor":"ui"},{"level":2,"heading":"Env configuration","anchor":"env-configuration"},{"level":2,"heading":"Operational and terms guardrails","anchor":"operational-and-terms-guardrails"},{"level":2,"heading":"Standards mapping + tests","anchor":"standards-mapping-tests"},{"level":2,"heading":"Exit criteria","anchor":"exit-criteria"}],"html":"<h1 id=\"harvard-art-museums-api-integration-plan\">Harvard Art Museums API Integration Plan</h1>\n<p>Status: Planned (B5 provider slice)  </p>\n<p>Updated: May 30, 2026</p>\n<h2 id=\"official-source\">Official source</h2>\n<ul><li>API base/docs: &lt;https://api.harvardartmuseums.org&gt;</li></ul>\n<h2 id=\"key-platform-facts-from-official-docs\">Key platform facts (from official docs)</h2>\n<ul><li>Base API host: `https://api.harvardartmuseums.org`</li><li>API key required on all requests via `apikey` query parameter.</li><li>JSON response structure includes:</li><li>`info` (pagination + response metadata)</li><li>`records` (result rows)</li><li>`aggregations` (optional analysis block)</li><li>Paging controls:</li><li>`size` default 10, max 100</li><li>`page` for page navigation</li><li>`info.next` / `info.prev` provide full next/prev links</li><li>Errors:</li><li>`401` invalid/missing API key</li><li>`404` resource not found</li><li>IIIF:</li><li>Image API via `baseimageurl`/`primaryimageurl` (IIIF Image API 2.1 style paths)</li><li>Presentation collection: `https://iiif.harvardartmuseums.org/collections/top`</li><li>Manifest base: `https://iiif.harvardartmuseums.org/manifests`</li></ul>\n<h2 id=\"integration-goals\">Integration goals</h2>\n<ul><li>Add Harvard as a first-class B5 provider through `provider-interface`.</li><li>Preserve canonical Linked Art JSON-LD at storage boundary.</li><li>Respect Harvard operational/terms constraints in adapter and cache policy.</li></ul>\n<h2 id=\"proposed-implementation-slice\">Proposed implementation slice</h2>\n<h3 id=\"adapter\">Adapter</h3>\n<ul><li>`src/adapters/harvard.ts`</li><li>profile descriptor</li><li>object/person/exhibition search helpers</li><li>content normalization to `SourceRecord` + `Artwork` DTO boundary</li><li>IIIF image/manifest URL projection helpers</li></ul>\n<h3 id=\"routes\">Routes</h3>\n<ul><li>`GET /api/harvard/profile`</li><li>`POST /api/harvard/search`</li><li>`POST /api/harvard/object`</li><li>`POST /api/harvard/import`</li></ul>\n<h3 id=\"ui\">UI</h3>\n<ul><li>add `harvard` source toggle in `/explore`</li><li>preserve source attribution, rights/reuse messaging, and object link-back fields</li></ul>\n<h2 id=\"env-configuration\">Env configuration</h2>\n<ul><li>`HARVARD_API_BASE` (default: `https://api.harvardartmuseums.org`)</li><li>`HARVARD_API_KEY` (required for live calls)</li><li>`HARVARD_IIIF_MANIFEST_BASE` (default: `https://iiif.harvardartmuseums.org/manifests`)</li></ul>\n<h2 id=\"operational-and-terms-guardrails\">Operational and terms guardrails</h2>\n<ul><li>Respect rate guidance: max 2500 API calls/day.</li><li>Do not cache/store Harvard API content longer than two weeks without explicit permission.</li><li>Use image URLs returned by Harvard APIs (no local image copying).</li><li>Preserve attribution and link-back to Harvard content location.</li><li>Treat provider as non-commercial-content constrained in downstream usage paths.</li></ul>\n<p>Implementation policy:</p>\n<ul><li>Centralize request budgeting in provider adapter/service layer.</li><li>Add cache TTL defaults that cannot exceed the two-week policy.</li><li>Surface attribution + source URL fields in all UI entry points.</li></ul>\n<h2 id=\"standards-mapping-tests\">Standards mapping + tests</h2>\n<p>Required rounds (minimum): object/provenance/shared-structure + protocol/search rounds.</p>\n<p>Required tests (failing-first):</p>\n<ul><li>`tests/adapters/harvard.test.ts`</li><li>`tests/api/harvard/profile.test.ts`</li><li>`tests/api/harvard/search.test.ts`</li><li>`tests/api/harvard/object.test.ts`</li><li>`tests/api/harvard/import.test.ts`</li></ul>\n<p>Policy tests:</p>\n<ul><li>API key missing/invalid behavior mapping</li><li>rate-budget guard behavior</li><li>cache TTL guard (`&lt;= 14 days`)</li><li>attribution/link-back field persistence</li></ul>\n<p>Protocol checks (B8):</p>\n<ul><li>OPTIONS/CORS behavior on Harvard routes</li><li>response shape conformance</li><li>URI opacity + array-cardinality safety where applicable</li></ul>\n<h2 id=\"exit-criteria\">Exit criteria</h2>\n<ul><li>Adapter + routes + tests green.</li><li>`/explore` can search/import Harvard records.</li><li>PR includes Standards Mapping note with round + fixture anchor coverage.</li></ul>","updatedAt":"2018-10-20T01:46:40.000Z","checksum":"fa8b980154f594b11288f8f782de47730a170624ca1f87fac89bef8b0c10faef","checksumPrefix":"fa8b980154f5","anchorCount":11,"lineCount":108,"rawUrl":"/api/docs/content?path=providers%2Fharvard-art-museums.md","htmlUrl":"/docs?doc=providers%2Fharvard-art-museums.md","apiUrl":"/api/docs/content?path=providers%2Fharvard-art-museums.md"}