Twitter Trending Places Search (V1) - Data API Endpoint

Trending Places Search (V1) by latitude, longitude and bearer token.


Download Twitter Trending Places Search (V1) data from the Official Twitter API | 👥  Contributors: steve 🚩  Report

✏️ Inputs

Latitude latitude Required

Latitude

Longitude longitude Required

Longitude

Bearer Token access_token Required

Your Twitter app’s Bearer Token for collecting data with. If you don’t have one, see How to Get a Twitter API Key Without Approval or check out Twitter’s docs on Bearer Tokens for more information.

If you get the error client-not-enrolled, then make sure you’re not using a standalone app and try creating a new application with the Add App button under a project and NOT under the standalone section.

📝 Notes

Scrape trending places or geo-locations that Twitter allows users to geo-tag Tweets with using the the Official Twitter API Places Search Endpoint.

You’ll need to provide a latitude and longitude, but that’s it, then this endpoint should return trending places. Unfortunately though, it’s only likely to work with already popular locations like major cities. So you may see an empty response if there is nothing trending going on in the location provided at the current time.

This is also an outdated V1 API endpoint, so it’s subject to stop working at any time in favor of the new Twitter API V2 (which we also support).

Posted by steve on Sept. 30, 2022, 6:30 a.m. 🚩  Report

⚡️ Endpoint

GET https://api.twitter.com/1.1/trends/closest.json?lat={{latitude}}&long={{longitude}}

Body

None

Headers

Authorization
Bearer {{access_token}}