Skip to content
clusters: prooflayer · edgemarket · edgefinance · synthforge · mediakit · wordmint · webprobe · locale · comppoint
$ man expand-url

/expand-url(1)

agentutility / web-probe / expand-url
PRICE / CALL
$0.02
USDC · base mainnet · scheme: exact
METHOD
POST
CLUSTER
webprobe
CATEGORY
utilities
STATUS
live
NAME
expand-url url expander / redirect chain tracer / link-shortener resolver
SYNOPSIS
POST https://x402.org/v1/expand-url
     Content-Type: application/json
     X-PAYMENT:    <signed-transferWithAuthorization>

     { ... }
↳ first call → 402 Payment Required. Sign USDCtransferWithAuthorization, retry with theX-PAYMENT header.
DESCRIPTION

URL expander / redirect chain tracer / link-shortener resolver. Follows HTTP redirects step-by-step, returns every hop with status, location, redirect type, response time. Phishing-link analysis, marketing attribution, click-tracking.

INPUTrequest schema
propertytypedescriptionreq?
urlstringStarting URL (typically a shortlink). Must be http(s).required
max_hopsnumber1-50. Default 15.optional
user_agentstringOptional User-Agent header to send (some shorteners gate by UA). Default is a generic browser UA.optional
OUTPUTresponse shape
fieldtypedescription
initial_urlstringOriginal URL submitted for expansion before any redirects were followed.
final_urlstringTerminal URL reached after following the full redirect chain.
final_statusnumberHTTP status code returned at the final hop (200, 404, etc.).
hop_countnumberNumber of redirect hops traversed between the initial and final URL.
total_duration_msnumberTotal wall-clock time in milliseconds to trace the full redirect chain.
hopsarrayOrdered list of each redirect step with URL, status, location header, redirect type, and response time.
truncatedbooleanTrue if the chain hit the max-hop cap before reaching a terminal URL.
errorstringError message if the trace failed (DNS failure, timeout, redirect loop, invalid URL).
EXAMPLEStwo ways to call
EXAMPLE 1 · curl
curl -X POST https://x402.org/v1/expand-url \
  -H 'Content-Type: application/json' \
  -d '{ }'
first response = 402 Payment Required with payment requirements; sign + retry with X-PAYMENT.
EXAMPLE 2 · mcp
# install once
claude mcp add x402 --command "npx x402-deployer-mcp"

# then ask Claude Code:
# "use the expand-url tool to ..."
MCP server handles payment automatically — your coding agent just calls the tool by name.
METADATA
tags
urlredirectshortlinktracephishing
methods
POST
cluster
webprobe
price
$0.02 USDC per call
ADJACENTother endpoints in webprobe
endpointdescriptionprice
archive-snapshotWayback Machine API / archive.org wrapper.$0.02
dmarc-checkDMARC / SPF / DKIM checker.$0.02
dns-lookupDNS lookup / DNS resolver / DoH proxy.$0.02
password-strengthPassword strength meter + breach checker.$0.02
whoisDomain WHOIS / RDAP lookup.$0.02
whois-lookupWHOIS / RDAP domain lookup.$0.02
arxiv-searcharXiv full-text search.$0.03
ssl-certSSL certificate inspector / TLS cert checker / certificate transparency lookup / ssl expiry.$0.03
SEE ALSO
agentutility(7) · webprobe(7) · x402(7) · mcp(7) · llms.txt · registry.json · bazaar.x402.org