# Parse and Clean URL (`url.parse`)

Split a URL into scheme, host, port, path, query parameters and fragment, and return a clean copy without tracking parameters (utm_*, fbclid, gclid...).

- **Route:** `POST /v1/run/url.parse`
- **Price:** $0.0002 per request ($0.20 per 1,000) · `cost_usd` on every response
- **Source:** GetAllAPIs compute (`compute`) · failover: no
- **Measured latency:** p50 1 ms · p95 1 ms · p99 1 ms (1 calls, 30d)
- **Heavy response:** no

## Input

| Field | Type | Required | Default | Notes |
|---|---|---|---|---|
| `url` | string | yes |  | Absolute URL |

## Output (`output` in the run envelope)

| Field | Meaning |
|---|---|
| `scheme` | URL scheme. |
| `host` | Host name (punycode for international names). |
| `port` | Explicit or default port. |
| `path` | Path. |
| `query` | Query parameters in order. |
| `fragment` | Fragment without #. |
| `clean_url` | The URL without tracking parameters and fragment. |
| `tracking_params` | Tracking parameters that were removed. |

## Example

```bash
curl -s -X POST https://getallapis.com/v1/run/url.parse \
  -H "Authorization: Bearer $GETALLAPIS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://shop.example.com:8443/p/widget?utm_source=news&color=blue&fbclid=abc#reviews"}'
```

```python
from getallapis_client import Client
client = Client()  # reads GETALLAPIS_API_KEY
result = client.run('url.parse', {'url': 'https://shop.example.com:8443/p/widget?utm_source=news&color=blue&fbclid=abc#reviews'})
print(result['cost_usd'], result['output'])
```

```bash
getallapis run url.parse '{"url":"https://shop.example.com:8443/p/widget?utm_source=news&color=blue&fbclid=abc#reviews"}'
```

Quote first (free, validates input): `POST /v1/quote/url.parse` with the same body.
