IMG_20200908_114948.jpg

Blog

Instagram to Google Maps

Are you aware that you can bookmark photos in Instagram? Are you aware you can add them to custom "Collections" (folders)? Are you aware you can save locations in Google Maps? Are you aware you can create and save different kinds (lists) of places (only on mobile though)?

In preparation for a trip to Europe, I've been bookmarking great looking photos from accounts like @beautifuldestinations and adding them to a Collection called "TO ADD". Then, once a week I'll go through that folder one-by-one and add photos to a Google Maps list I've created ("Destinations"). Now I have a geo-map of a bunch of badass locations!

So, being a nerd, I asked "how can we automate this?" - turns out we can't. Instagram has locked down their API pretty hard and only allows access to marketing and advertising sectors. In addition, there doesn't seem to be any support for Collections. Once I hit that roadblock, I didn't investigate Google's API for adding to lists, but their API access is usually pretty robust.

Regardless, below is a quick diagram I created to demonstrate how I'd build it out. Ideally, a user would register and grant access to the webapp (very lightweight, probably run on Heroku with a couple worker processes) and specify a collection name (such as "To Add" or "InstaGeo"). Every hour/night/etc. the app would poll the specified collection, detect a geotag (if available), query that location using Google's geo lookup API, and add that location to the user's Google Maps list. A lot could go wrong during the process, so it's critical the app send an email (via Sendgrid, etc.) to the user indicating error states such as "There was no geotag detected in this picture" or "Google couldn't find the location of this geotag", or, if successful: "This geotag was successfully added to your Google Maps list". 

I'm pretty bummed about the lack of access - this would be a really cool project. If anyone figures out a workaround (that is reasonable in scope), feel free to drop a line!