How to get page url from sitetreeid / pageid.
You can use something like this…
SiteTree::get()->byID(1)->Link()