Refactoring URL API