New photos API

I added a new API endpoint to for getting recent photos for a user. This is something we’ve been wanting for Sunlit, and hopefully it will be useful for other developers as well. It works for any user, even if they are hosting their blog somewhere else. For example, a request to for my username would look like this:

GET /posts/manton/photos
Authorization: Bearer ABCDEFG

The response is JSON Feed, and includes the photo thumbnail URL in addition to the HTML for the blog post and full-sized image. Here’s an abridged version of a response:

"id": "12345",
"content_html": "Test photo.<p><img src=\"…\">",
"image": "[...](https://...)",
"_microblog": {
"thumbnail_url": "[]("

For blogs hosted on, there’s also a feed of all your photos hosted at your own domain. Mine is here:

  • [](

And there’s a special photos-only feed for the Discover section of Here are a couple of the URLs:

  • []( — good for showing thumbnails in a grid
  • []( — good for showing posts in a timeline

Basing our API on JSON Feed has helped keep open by default. The URLs that don’t require authentication can even be dropped in a reader like Feedbin to use outside of the apps.

We’re working on an updated version of Sunlit that will use this new photos endpoint. Anyone can join the beta on TestFlight here and you’ll be notified when the app is ready to test.