Hey @Henry!
You may be able to use a ParentWindow query (referenced here) for this. I don't know of a way to query the parent document object directly but if you store the page's URL in a DOM element you should be able to access it.
Say you have something like
<div id="page_url" hidden></div>
on your webpage and then set its value to be the page's URL in the same script where you embed Retool using something like
document.getElementById("page_url").innerHTML = document.URL;
You can then run the following query:
Which should return the URL you've stored in that element.
Could that work?