Twitter has 2 APIs for general usage. The first is REST, and the second is Search. REST requires authentication because it has to do with sending data to the server. The Search API is solely for, well, searching through the database!
In this example, I use cURL to access the JSON encoded current trends. I use CURLOPT_RETURNTRANSFER set to True, so it is returned as a string. Then, I decode the JSON and go through what I'm given. The information comes with a timestamp, which I pass by calling array_values twice. From there, the one thing I access is the name of each and every popular goings-on.
The Search API is not heavily rated--which means you can make a lot of requests, but they don't say exactly how it is rated. Therefore, you should not call this every second for a week, but you don't have to check the trends only once a year, either.
Use the Twitter API reference at your will: