Skip to main content

Squillify development is paused indefinitely. Read why, and discover what this experiment achieved. Read the story

MicroSkills Reference

Normalize URL

web.normalize_url

ProductionBounded custom (Class B)Deterministicverifiableinstantv1.0.0
No network

Overview

You send a URL and we rewrite it the same way every time: resolve it against a base URL when it is relative, lowercase the scheme and host, drop the default port, collapse ".." and "." path segments, sort the query, and strip common tracking parameters such as utm_source, fbclid, gclid, and ref. You get the rewritten URL plus its parts and the list of parameters we dropped. There is no universal canonical form, so compare with the result rather than assuming a server will treat it identically.

Comparing URLs by hand goes wrong quietly, so you get one documented rewrite instead of ad-hoc string surgery scattered across your code.

Reliability

The same URL and the same options always give you the same answer, and nothing leaves the platform. Watch two rewrites in particular: "ref" counts as a tracking parameter, so a link that uses it for routing loses it unless you set removeTrackingParams to false; and the default port disappears only for http on 80 and https on 443, so other ports stay. Bad input comes back as a validation error and retrying will not help — a URL we cannot parse, a relative URL with no usable baseUrl, one with no host, or one longer than 8192 characters.

Context footprint

You get one rewritten URL, its six parts, and a short list of dropped parameter names, so the response stays tiny. A successful call costs 1 execution credit.

When to use it

Before you compare, deduplicate, or store URLs that arrived from different places.

When you need to know the URL actually resolves, or when dropping a tracking parameter would change what the server sends back.

Scope

Note
We rewrite one URL into a stable comparable form and tell you which tracking parameters we dropped.

Non-goals

  • Does not fetch the URL or check that it exists
  • Does not shorten or expand a URL
  • Does not decode or re-encode percent-escapes in the path or query
  • Does not promise the rewritten URL behaves identically at the server

Properties

IdempotentRetry safeStreaming supportedFile input supportedRequires external service

Capabilities

normalizationparsing

Cost & billing

Flat rate per invocation

MetercallsBillable onsuccessCost per call1 credit

File handling

Accepts file_refProduces file_refMax input8 KB

How we handle your data

Sensitive output possible
What this means

This skill may receive sensitive content and may return submitted, transformed, extracted, or reformatted content.

Squillify guarantees
  • Runs inside Squillify
  • This skill runs inside Squillify.
  • Payloads are not sent to an external service by this skill.
  • Squillify does not permanently store submitted payloads.
  • Telemetry records metadata only, not submitted content.
  • Submitted payloads are not used for training.
  • Submitted payloads are not reviewed by humans.
  • This skill does not target sensitive data.
  • The response may contain submitted or transformed content.
Your responsibility

Squillify does not determine whether submitted content is sensitive. Your application is responsible for deciding what data it is allowed to submit. Your application is responsible for securing the response.

Read the Microskill Data Handling Policy

Input schema

FieldTypeRequiredDescription
urlstringYesAbsolute or base-resolvable URL to normalize.
baseUrlstringNoOptional absolute base URL; omit it when url is already absolute.
policystringNoNormalization policy; omit it for comparison.
removeTrackingParamsbooleanNoWhether known tracking parameters are removed; omit it for true.
sortQueryParamsbooleanNoWhether query parameters sort deterministically; omit it for true.
stripFragmentbooleanNoWhether the fragment is removed; omit it for true.
lowercaseHostbooleanNoWhether the host is lower-cased; omit it for true.

Output schema

FieldTypeRequiredDescription
okbooleanYesWhether URL parsing and normalization succeeded.
normalizedUrlstringYesNormalized absolute or relative URL.
componentsobjectYesClosed parsed-component receipt with scheme, host, port, path, query, and fragment properties. Its documented web receipt properties are bounded to 128 entries — unconstrained RFC 8259 JSON items.
removedQueryParamsarrayYesBounded array of removed tracking-parameter names in source order. The item shape is defined by the nested schema and the array contains from 0 through 10000 items.
warningsarrayNoBounded array of non-fatal safe warning strings. The item shape is defined by the nested schema and the array contains from 0 through 20000 items.

API contract

POST /v1/execute
curl
curl -sS -X POST "$BASE/v1/execute" -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"skillKey":"web.normalize_url","input":{"url":"https://EXAMPLE.com/a/../b"}}'
Integrations
TypeScript SDK
import { Squillify } from "@squillify/sdk";

const sq = new Squillify({ apiKey: process.env.SQUILLIFY_API_KEY });

const { output } = await sq.execute("web.normalize_url", {"url":"https://Example.com:443/blog/../pricing?utm_source=newsletter&plan=team#faq"});

Errors

CodeHTTPRetryableDescription
VALIDATION_ERROR400NoThe request payload failed schema validation.
UNAUTHORIZED401NoMissing or invalid API key.
SKILL_NOT_ACCESSIBLE403NoThe API key is not granted access to this skill.
SKILL_NOT_AVAILABLE_FOR_PLAN403NoThis skill is not included in your current plan.
PLAN_ELIGIBILITY_UNAVAILABLE503YesPlan eligibility could not be decided. Retry after backoff.
SKILL_NOT_FOUND404NoThe requested skill or version does not exist.
TENANT_RATE_LIMITED429YesRequest rate limit exceeded. Retry after backoff.
QUOTA_EXCEEDED429YesPlan quota exhausted. Retryable once the quota period resets.
EXECUTION_TIMEOUT504YesExecution exceeded the allowed time budget.

Other limits

LimitValue
Recommended inline bytes32 KiB

Limitations

  • Does not fetch the URL or check that it exists
  • Does not shorten or expand a URL
  • Does not decode or re-encode percent-escapes in the path or query
  • Does not promise the rewritten URL behaves identically at the server
  • Checking whether a URL is reachable — reach for web.check_url_status
  • Building a request URL where dropping a parameter would change the response

How to call

POST /v1/execute (requires authentication)

Request bodyjson
{
  "skillKey": "web.normalize_url",
  "input": {
    "url": "https://Example.com:443/blog/../pricing?utm_source=newsletter&plan=team#faq"
  }
}

Examples

Clean a shared marketing link for comparison

Inputjson
{
  "url": "https://Example.com:443/blog/../pricing?utm_source=newsletter&plan=team#faq"
}
Expected outputjson
{
  "ok": true,
  "removedQueryParams": [
    "utm_source"
  ],
  "components": {
    "scheme": "https",
    "host": "example.com",
    "port": null,
    "path": "/pricing",
    "query": "plan=team",
    "fragment": "faq"
  },
  "normalizedUrl": "https://example.com/pricing?plan=team#faq"
}

Privacy policy also drops the fragment

Inputjson
{
  "policy": "privacy",
  "url": "https://example.com/pricing?utm_source=newsletter#faq"
}
Expected outputjson
{
  "ok": true,
  "removedQueryParams": [
    "utm_source"
  ],
  "components": {
    "scheme": "https",
    "host": "example.com",
    "port": null,
    "path": "/pricing",
    "query": "",
    "fragment": ""
  },
  "normalizedUrl": "https://example.com/pricing"
}
  • Deduplicate URLs before you store them or count them in analytics
  • Strip tracking parameters so two shared links compare equal
  • Turn the relative links on a page into absolute ones against a base URL

Avoid for

  • Checking whether a URL is reachable — reach for web.check_url_status
  • Building a request URL where dropping a parameter would change the response

Composable with

Safety & privacy

  • Runs without calling any external service.
  • Your payloads are never stored permanently.
  • Telemetry captures metadata only — never your payload contents.
  • We never train models on your payloads.
  • No human reviews your payloads.

Tags

urlwebnormalization