I'm looking for self-hosted URL shortener scripts and projects (e.g. YOURLs) that track traffic sources, locations and other statistics. I need one with a solid API and JSON support. Any suggestions?
if you have to go self hosted take a look at YOURLS http://yourls.org/
Did you know bitly has an api, and allows you to use your own custom domain name FOR FREE?
why not let bitly handle all that traffic? YOURLS has its advantages since you can simply dump table.
But bitly also gets the job done for free
I have recently been researching the same thing.
YOURLS looks like a good option although I'm not entirely sure what reporting level you can access through this.
Bit.ly offer a custom domain setting when shortening links which works great! it requires you to point your site DNS at bitly (very simple step by step instructions).
In my opinion the best option (and the one I'm going to be using) is bit.ly. It's a tried and tested platform with solid reporting and flexibility.
This script is self-hosted and has a stats page. Not sure what kind of functions you're looking for in an API but hope this helps get you started