a common api for short url