# URL-parser

> Opdel en URL i protokol, host, port, sti, fragment og en tabel med dens afkodede forespørgselsparametre. Ideel til at læse sporingslinks. Gratis.

Free tool by Orkosi. Page: https://orkosi.com/tools/url-parser?lang=da

Lange links skjuler, hvad de indeholder. Indsæt et for at se, hvor det fører hen, og alle parametre, det sender, afkodet: kampagnetags, omdirigeringsmål og ID'er.

1. Indsæt URL'en.
2. Tryk på Parse.
3. Læs delene og tabellen med parametre.

## Input

| Field | Type | Required | What it is |
| --- | --- | --- | --- |
| `url` | text | yes | URL. |

## Example

Input:

```json
{
  "url": "https://shop.example.com/products/desk-lamp?utm_source=newsletter&utm_campaign=spring%20sale&ref=42#reviews"
}
```

Result:

```json
{
  "normalized": "https://shop.example.com/products/desk-lamp?utm_source=newsletter&utm_campaign=spring%20sale&ref=42#reviews",
  "protocol": "https",
  "host": "shop.example.com",
  "port": "443",
  "path": "/products/desk-lamp",
  "query": "utm_source=newsletter&utm_campaign=spring%20sale&ref=42",
  "fragment": "reviews",
  "params": [
    {
      "key": "utm_source",
      "value": "newsletter"
    },
    {
      "key": "utm_campaign",
      "value": "spring sale"
    },
    {
      "key": "ref",
      "value": "42"
    }
  ]
}
```

## Run it

It needs a free Orkosi account, nothing else. No credits are used.

- **A person**: open the page, enter an e-mail once, use the tool.
- **Claude or ChatGPT**: add the Orkosi connector `https://orkosi.com/api/v1/public/mcp` and sign in, or create the free account on the sign-in page. Then call `orkosi_run_free_tool` with `{ "tool": "url-parser", "input": { … } }`.
- **Any agent or program that can make an HTTP request**:

  1. Once, create the account: `POST https://orkosi.com/api/v1/public/signup` with `{ "name": "…", "email": "…", "terms_accepted": true }` and no key. Ask the person for the e-mail and their agreement to the terms first. The answer carries `data.api_key`, shown once.
  2. Run the tool:

```bash
curl -X POST https://orkosi.com/api/v1/public/tools/url-parser/run \
  -H "Authorization: Bearer $ORKOSI_API_KEY" -H "Content-Type: application/json" \
  -d '{"input":{"url":"https://shop.example.com/products/desk-lamp?utm_source=newsletter&utm_campaign=spring%20sale&ref=42#reviews"}}'
```

The answer is `{ "data": { "tool": "…", "result": { … } } }`. A call without a key is answered 401 with the signup steps as data.

## Questions

**Åbner den linket?**

Nej. Adressen læses kun som tekst, der sendes ingen forespørgsel til den.

**Hvad er fragmentet?**

Delen efter #. Browsere holder det for sig selv og sender det aldrig til serveren, det peger normalt på en sektion på siden.

**Hvorfor vises en port, når URL'en ikke har en?**

Standardporten udfyldes: 443 for https og 80 for http.

All free tools: https://orkosi.com/tools.md
