# Get url parameters

**URL:** <https://community.make.com/t/get-url-parameters/33496>\
**Category:** Questions\
**Tags:** mapping, filters, functions\
**Created:** [April 11, 2024, 1:46pm UTC](https://community.make.com/t/get-url-parameters/33496 "2024-04-11T13:46:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![GSS\_Innovations](https://avatars.discourse-cdn.com/v4/letter/g/c37758/32.png) [@GSS\_Innovations](https://community.make.com/u/GSS_Innovations)\
**Post date:** [April 11, 2024, 1:46pm UTC](https://community.make.com/t/get-url-parameters/33496/1 "2024-04-11T13:46:33Z")

</div>

Hello everyone, I want to get parameters from my url.

Exemple:

www.teste.com.br/mensagem?idref=134&cid=654fas3&utml=g4h24g

Then I want to get this data for each field, like this

IDREF = 134  
CID = 654fas3  
UTML = g4h24g

to find out where else people are coming from.

Thanks

---

<div class="post-metadata">

**Author:** ![ManishMandot](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/manishmandot/32/25887_2.png) [@ManishMandot](https://community.make.com/u/ManishMandot)\
**Post date:** [April 11, 2024, 3:03pm UTC](https://community.make.com/t/get-url-parameters/33496/2 "2024-04-11T15:03:10Z")

</div>

Hey @GSS_Innovations

Welcome to the make community

you can use Text parser here:

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/7/c/7c0a27181b678653f0291fa62a8bb73aa53e043d.png)

Output:  
 ![image](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/0/6/06413f7838a57eb3f7cb56cc10c01d52c85f2522.png)

---

<div class="post-metadata">

**Author:** ![samliew](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/samliew/32/13327_2.png) [@samliew](https://community.make.com/u/samliew)\
**Post date:** [April 11, 2024, 4:03pm UTC](https://community.make.com/t/get-url-parameters/33496/3 "2024-04-11T16:03:44Z")

</div>

Welcome to the Make community!

 ![Screenshot_2024-02-20_151445](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/3/a/3a0c58927f26b0aa42ae058e92d98af878686a3a.png)

You can use a Text Parser “[Match Pattern](https://www.make.com/en/help/tools/text-parser)” module with this Pattern (regular expression):

```plaintext
\?idref=(?<idref>[^&]+)&cid=(?<cid>[^&]+)&utml=(?<utml>[^&]+)

```

### Proof

[https://regex101.com/r/zQjzHw](https://regex101.com/r/zQjzHw)

### Important Info

- ⚠ **Global match** must be set to **NO**!

# Output

 ![Screenshot_2024-04-12_000406](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/b/c/bc59ba9fc8bf13159a8a941fe282e1b394370971.png)

* * *

For more information, see [Text Parser](https://www.make.com/en/help/tools/text-parser) in the Make Help Center:

> **Match Pattern**  
> The **Match pattern** module enables you to find and extract string elements matching a search pattern from a given text. The search pattern is a [regular expression](https://en.wikipedia.org/wiki/Regular_expression) (aka regex or regexp), which is a sequence of characters in which each character is either a metacharacter, having a special meaning, or a regular character that has a literal meaning.
> 
> - The complete list of metacharacters can be found on the [MDN web docs website](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions).
> - For a tutorial on how to create regular expressions, we recommend the [RegexOne website](https://regexone.com/).
> - For an easy, quick regex generator, try the [Regular Expressions generator](https://regex-generator.olafneumann.org/).
> - For experimenting with regular expressions, we recommend the [regular expressions 101 website](https://regex101.com/). Just make sure to tick the ECMAScript (JavaScript) FLAVOR in the left panel.

Hope this helps!

You can copy and paste this module export into your scenario. This will paste the modules shown in my screenshots above.

1. Copy the code below by clicking the copy button when you mouseover the **top-right** of the code block  
 ![Screenshot_2024-01-17_200117](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/2/b/2b1b692880388420db5045bf51ef344e6698a816.png)

2. Enter your scenario editor. Press ESC to close any dialogs. Press CTRLV to paste in the canvas.

3. Click on each imported module and save it. You may need to remap some variables.

### Modules JSON Export

```json
{
    "subflows": [
        {
            "flow": [
                {
                    "id": 93,
                    "module": "regexp:Parser",
                    "version": 1,
                    "parameters": {
                        "pattern": "\\?idref=(?<idref>[^&]+)&cid=(?<cid>[^&]+)&utml=(?<utml>[^&]+)",
                        "global": false,
                        "sensitive": true,
                        "multiline": false,
                        "singleline": false,
                        "continueWhenNoRes": false
                    },
                    "mapper": {
                        "text": "www.teste.com.br/mensagem?idref=134&cid=654fas3&utml=g4h24g"
                    },
                    "metadata": {
                        "designer": {
                            "x": -811,
                            "y": -1714,
                            "messages": [
                                {
                                    "category": "last",
                                    "severity": "warning",
                                    "message": "A transformer should not be the last module in the route."
                                }
                            ]
                        },
                        "restore": {},
                        "parameters": [
                            {
                                "name": "pattern",
                                "type": "text",
                                "label": "Pattern",
                                "required": true
                            },
                            {
                                "name": "global",
                                "type": "boolean",
                                "label": "Global match",
                                "required": true
                            },
                            {
                                "name": "sensitive",
                                "type": "boolean",
                                "label": "Case sensitive",
                                "required": true
                            },
                            {
                                "name": "multiline",
                                "type": "boolean",
                                "label": "Multiline",
                                "required": true
                            },
                            {
                                "name": "singleline",
                                "type": "boolean",
                                "label": "Singleline",
                                "required": true
                            },
                            {
                                "name": "continueWhenNoRes",
                                "type": "boolean",
                                "label": "Continue the execution of the route even if the module finds no matches",
                                "required": true
                            }
                        ],
                        "expect": [
                            {
                                "name": "text",
                                "type": "text",
                                "label": "Text"
                            }
                        ],
                        "interface": [
                            {
                                "type": "text",
                                "name": "idref",
                                "label": "idref"
                            },
                            {
                                "type": "text",
                                "name": "cid",
                                "label": "cid"
                            },
                            {
                                "type": "text",
                                "name": "utml",
                                "label": "utml"
                            }
                        ]
                    }
                }
            ]
        }
    ],
    "metadata": {
        "version": 1
    }
}

```

---

<div class="post-metadata">

**Author:** ![Make\_Bot](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/make_bot/32/14661_2.png) [@Make\_Bot](https://community.make.com/u/Make_Bot)\
**Post date:** [April 25, 2024, 5:19pm UTC](https://community.make.com/t/get-url-parameters/33496/4 "2024-04-25T17:19:03Z")

</div>

This topic was automatically closed because it's resolved or inactive. Please, start a new topic.


