Is there any way I can get all of the links associated with my j.mp account and arrange them so that the links with the most clicks are at the top?
Note: j.mp is actually bit.ly
You can use the Bitly API (link metrics) to get the number of clicks for each link.
I'm pasting here an answer from WebMasters on this topic:
(I think this question should be migrated)
You'd use bit.ly shortened links for all links in your list.
When a visitor clicks a bit.ly link, bit.ly increments the click count and stores it on their server.
When a user visits your page – but before the list is displayed to them – your script would determine how many clicks each link has received using the /v3/clicks/ method from the bit.ly REST API, which returns click data about multiple bit.ly links you supply.
You would sort this information by the total number of clicks, display the list, and optionally show the number of clicks for each link.
You may also choose to cache the results of this request in your database and only request new data once an hour/day.