# WritersLogic URL Canonicalization & Security Flagging

> WritersLogic URL Canonicalization & Security Flagging is a paid API for AI agents from agents.writerslogic.com, paid per call via x402, $0.005/call, status unknown (last checked 2026-11-19).

Normalizes and security-audits up to 50 absolute HTTP(S) URLs — stripping tracking parameters, normalizing encoding, and flagging obfuscation tricks like punycode abuse, open redirects, and userinfo spoofing.

## Facts

- Endpoint: POST https://agents.writerslogic.com/api/v1/url-canonicalize?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-19
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/writerslogic-url-canonicalization-security-flagging-4138d6d7
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_jatfKppff_RshmSDSicTQ

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability writerslogic-url-canonicalization-security-flagging-4138d6d7 -d '<json body>'
```

Example prompt: Can you canonicalize these 10 URLs I scraped — strip any UTM params, fbclid, and gclid, normalize percent-encoding, and flag any that look suspicious (open redirects, punycode tricks, or userinfo@ spoofing)?

## When to prefer this

Use this endpoint when an agent needs to safely process, deduplicate, or click a batch of URLs and wants both normalization and security red-flags in one call. Prefer it over ad-hoc regex stripping when you need WHATWG-compliant parsing, punycode safety checks, homograph detection, or open-redirect flagging. It is not a substitute for DNS-based phishing detection or full redirect chain following.

## Known failure modes

- Non-absolute or non-HTTP(S) URLs rejected with an error (e.g. ftp://, data:, relative paths)
- URLs exceeding 2048 characters rejected
- Batch exceeding 50 URLs rejected
- Malformed JSON input returns 400
- DNS resolution failures are not reported — this endpoint does not resolve DNS
- Public suffix detection may miss obscure TLDs not in the built-in subset unless supplied via publicSuffixes

## How this service works

Pay-per-call agents settled in USDC on Base via x402. Every response carries a signed provenance envelope.

## Output

For each submitted URL, the agent receives: the WHATWG-normalized canonical URL with tracking params stripped, host lowercased, default ports removed, dot segments resolved, and unreserved percent-escapes normalized. Also returned are security flags per URL indicating detected issues such as userinfo@host tricks, backslash authorities, multiple-@ ambiguities, obfuscated IPv4 hosts, invalid or ASCII-only punycode labels, mixed-script IDN hostnames, and open-redirect-shaped parameters (next=, redirect=, url=) pointing off-site or to javascript: URIs.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "urls": {
   "type": "array",
   "items": {
    "type": "string",
    "maxLength": 2048
   },
   "maxItems": 50,
   "minItems": 1,
   "description": "Absolute URLs including the scheme."
  },
  "sortQuery": {
   "type": "boolean",
   "description": "Sort remaining query segments for a dedupe key. Off by default: order can matter to servers."
  },
  "publicSuffixes": {
   "type": "array",
   "items": {
    "type": "string",
    "maxLength": 100
   },
   "maxItems": 200,
   "description": "Extra public suffixes (e.g. \"co.xx\") used for registrable-domain decisions."
  },
  "extraTrackingParams": {
   "type": "array",
   "items": {
    "type": "string",
    "maxLength": 64
   },
   "maxItems": 50,
   "description": "Extra query parameter names to strip (case-insensitive)."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json"
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/writerslogic-url-canonicalization-security-flagging-4138d6d7/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agents.writerslogic.com](https://www.zero.xyz/host/agents.writerslogic.com/llms.txt)
