# Read URL

Node type `browser_getUrl`

## What it does

Read the full address, origin, or one query parameter from the current page.

## Desktop client configuration

![Read URL configuration in the desktop client](/assets/get-url-en.f527c94150d497824041e85845bc0753636fd52c399d567df9b7df075e92f21b.0538f3a9.webp)

Captured in the English interface of MoreLogin Desktop V2.73.101.

## Inputs

These fields belong in `data.browserUi.inputs`.

| Field | Type or values | Schema required | Execution default | Description and bounds |
|  --- | --- | --- | --- | --- |
| `type` | `"href"` / `"origin"` / `"search"` (supports variable references) | No | `"href"` | Extraction type. Editor initial value `"href"` |
| `key` | `string` | No | — | Parameter name |


## Mode requirements and limits

**`type` `eq` `"search"`**

- Required `key`
- For href, value is the same as url: both are the full URL of the current page at the moment of reading (including query/hash; after navigation, it can be a redirect address). For origin, value is protocol+host+port. For search, key must be a non-empty string after resolution. For a repeated query key, value takes the first occurrence and the query map keeps the last one. If the key does not exist, an empty string is returned.
- Validation code `RPA_NODE_INPUT_INVALID`
- When type=search, key is required. If the parameter does not exist, value is the empty string "".
- Validation code `RPA_NODE_INPUT_INVALID`


## Input references

| Field | Allowed forms |
|  --- | --- |
| `type` | `literal`, `template` |
| `key` | `literal`, `template` |


## Outputs

**Mode** `type` `eq` `"href"`

| Output field | Type or values |
|  --- | --- |
| `value` | `string` |
| `url` | `string` |
| `origin` | `string` |
| `pathname` | `string` |
| `query` | `object` |


**Mode** `type` `eq` `"origin"`

| Output field | Type or values |
|  --- | --- |
| `value` | `string` |
| `url` | `string` |
| `origin` | `string` |
| `pathname` | `string` |
| `query` | `object` |


**Mode** `type` `eq` `"search"`

| Output field | Type or values |
|  --- | --- |
| `value` | `string` / `null` |
| `url` | `string` |
| `origin` | `string` |
| `pathname` | `string` |
| `query` | `object` |


Reference published fields as `${nodeId.data.field}`.

## JSON example

This example reads the `item` query parameter into `data.value`. Use `type: "href"` for the full URL or `type: "origin"` for the origin only.

```json
{
  "id": "read_url",
  "type": "browser_getUrl",
  "data": {
    "title": "Read the item query parameter",
    "browserAction": "getUrl",
    "browserUi": {
      "inputs": {
        "type": "search",
        "key": "item"
      },
      "exception": {
        "timeout": 30000,
        "policy": "interrupt"
      }
    }
  }
}
```

[Back to the node catalog](/browser-rpa/nodes)