Database |> Language |> Keywords |> 

URL

Contents

Definition

The URL keyword provides a convenient way of obtaining the resolved URL of a page

FROM https://example.com |> SELECT URL

If you’d like the returned value to be provided under a different alias simply use the AS keyword like so:

FROM https://example.com |> SELECT URL AS resolved_url

Examples

Redirect

Going to the link lsd.so/redirect will redirect you to lsd.so so requesting URL from it would yield it as the returned value.

FROM https://lsd.so/redirect
|> SELECT URL

Getting all URLs on a page

When you are interested in obtaining the available links on a page, what you may be interested in is not the URL keyword but simply grabbing the anchor elements from the page:

FROM https://lsd.so
|> GROUP BY a
|> SELECT a@href

Related: