Skip to content
Fourohtwo

agents.writerslogic.com/api/v1/url-canonicalize

Canonicalizes up to 50 absolute http(s) URLs for an agent about to fetch, dedupe or click them: WHATWG-parsed lowercase host, default port and fragment and userinfo removed, dot segments and unreserved percent-escapes normalized, tracking parameters (utm_*, gclid, fbclid and the Mozilla strip list plus yours) removed, and flags userinfo@host tricks, backslash and multiple-@ authorities, obfuscated

BaseAnswering
POSThttps://agents.writerslogic.com/api/v1/url-canonicalize

Uptime100% of 2 checks in 30 days

30 days agoToday

Try it

Pays from your browser wallet in USDC on Base or USDG on Robinhood Chain, whichever the endpoint takes. The provider is paid directly; failed calls aren't refunded by Fourohtwo.

The response shows up here.

Call it from an agent

// npm install fourohtwo
import { createPayer } from "fourohtwo";

// One agent key pays USDC on Base or USDG on Robinhood Chain, inside your spending rules.
const pay = createPayer({ privateKey: process.env.AGENT_KEY, maxPerCallUsd: "0.05" });
const res = await pay("https://agents.writerslogic.com/api/v1/url-canonicalize", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"urls":["HTTPS://Example.COM:443/a/./b/%7Efoo?utm_source=x&id=7&gclid=abc#top","https://paypal.com@evil.example/login","https://xn--pple-43d.com/","https://shop.example/login?next=https://evil.example/steal"]}),
});
console.log(await res.json());

Example input

{
  "urls": [
    "HTTPS://Example.COM:443/a/./b/%7Efoo?utm_source=x&id=7&gclid=abc#top",
    "https://paypal.com@evil.example/login",
    "https://xn--pple-43d.com/",
    "https://shop.example/login?next=https://evil.example/steal"
  ]
}