GET
/api/objects/random Random Object
Retrieve one random artwork from the MoMA collection.
Parameters
| Name | Type | Required | Location | Description |
|---|---|---|---|---|
| onview | boolean | No | query | Filter for artworks currently on view. |
| token | string | Yes | query | MoMA API token. |
Try It
Client-side request execution
Live URL
https://api.moma.org/api/objects/random?onview=1Example Request
GET /api/objects/random?onview=1&token=YOUR_TOKEN
Example Response
{
"source": "MoMA TMS API",
"language": "en",
"resultsCount": 1,
"objects": [
{
"objectID": 3201,
"title": "Random Artwork",
"onView": 1
}
]
}