The Met Art API
A quick look at the Met’s art api. I mention async python. I don’t go into detail, because I don’t know what I’m doing.
I’m not exactly an educated art consumer. I love landscapes, though, and I hate hosting my own images. I remember hearing something about the Met supporting an api for its collection and thought “gosh, wouldn’t that be neat.”
Said API is documented here, and it’s pretty full featured. You
basically get a bunch of objectID
integers that correspond to a query (I haven’t played around
with their query engine too much, although it seems…interestingly structured; hit refresh a few times
and you’ll notice the variety of images that correspond to the query keyword “landscape”).
I have a /random_art
Check out the automatically generated (thanks FastAPI) documentation over at the docs
page! Ok, it’s not actually that helpful at the moment. Should a website be a crypto api anyway? Who knows!
endpoint setup on this website, and a messily implemented object that
does some cache-ing and rate limiting (of sorts). It’s messy because I’m trying to learn about async python
code and that’s been a work in progress. I think I’m going to extend the endpoint to accommodate different
queries, but probably not just yet. I did this! Check out those docs!