Where Is “El Chapo”?
Some Saturday Morning Twitter API Sleuthing

nat{han} e{.} gri{ffith}
2 min readSep 5, 2015

--

It’s not something I follow very closely, but I have been vaguely aware of the ongoing fugitive status of the drug lord “El Chapo” Guzman. So I had a bit of context when the CNN show that I had put as background noise started talking about a Twitter post that his son made which may give away his location.

It seems El Chapo Mas Pequeno (El Chapito?) had, intentionally or not, placed a geotag on a Tweet of a photo that may show him in the company of his father (the latter’s face being artfully obscured by those now ubiquitous photo app stickers). Right at the bottom of the post you can read off the location “Costa Rica,” although there was some uncertainty about whether or not this indicated Costa Rica the country, or a city located in Mexico.

At this point my natural compulsive curiosity started to take over, because I know the Twitter API, and based on what I saw it could very well be that a full request of that Tweet’s metadata would reveal the precise location where the photo was taken. So after some googling around and discovering Twitter’s web based console, I was able to perform the necessary API call on that Tweet’s unique identifying code. And a quick scan of the returned JSON code revealed: Bupkis. No precise coordinates.

The ‘bounding box’ indicated by the Twitter API. This is probably the same for every photo tagged with the country ‘Costa Rica.’ Thanks to http://boundingbox.klokantech.com/ for helping to create this image.

What I did get, however, was a Twitter ‘place ID’ code. These codes are an alphanumeric hash that indicate a particular region bounded by a box. And the one I got back for that post unambiguously indicated Costa Rica the country, and not a Mexican city. So I at least know that much more than CNN was reporting.

Not a bad morning for Junior Detective Griffith, Zeroth Grade.

Nathan Griffith, PhD (no, really!) is a fan of physics, data science, and Twitter. He’s definitely looking for work in the SF Bay area, and you should definitely get in contact if you have a cool job for him.

--

--

nat{han} e{.} gri{ffith}

Minor league space scientist and last of the Apple ][ programmers. Destined to do something cool but heck if we know what yet. http://nathangriffith.info/