Trends/Closest not returning the closest


I am calling trends/closest.json and passing in the following for the lat/long -74.213226318359375,11.249007225036621

Give or take, this is roughly Santa Marta in Columbia. However, it’s returning the trend location for Maracaibo in Venezuela.

This is an issue that one of the user’s of my app has reported, but it’s echoed by other users that are reporting similarly placed close to other countries.

In this instance, the user sees Columbia on the Twitter website, so that part is correct, however the 1.1 API seems to return a different country :slight_smile:

I’ve managed to re-create it by forging the lat/long in my development environment so I am pretty confident it’s something with the API, OR is there another parameter I need to pass in?


Anyone from Twitter able to respond? This looks like a bug in the 1.1 API to me.



I’ve confirmed that this is a bug in the API’s response. I’m assuming that it’s due to the proximity of Santa Marta to Venezuela, and this probably explains what you’re hearing from other users. I’ve opened a ticket internally to see if we can update the region’s lat/long -> woeid -> trends mappings.

Thanks for bringing this to our attention. Until the issue is resolved, you may want to explicitly check if your users are in Colombia and adjust the call to /1.1/trends.json to include the proper woeid (currently 23424787).



We’ve taken another look at this issue, and unfortunately, distance math is to blame here. While experientially the “closest” location may seem like Santa Marta for you, the distance between Santa Marta and Maracaibo is 257.2km while the distance between Santa Marta and Bogota (the only city in Columbia we have trends data for) is 715.8km.


Hi… Another of my users has just reported the same issue (again with 1.1) but this time they live in Germany, and are receiving trends for Strasbourg (France). Is this a similar problem? Obviously Strasbourg is on the border with Germany…

edit: They are in Karlsruhe.