URL Parsing
The /url endpoint parses a URL into its structural components: scheme, host, port, path, query parameters, and fragment. Duplicate query parameters are grouped into an array.
curl -X GET \ "https://api.moxon.dev/v6/url"Send the request to see the response here.
urlstringrequiredAbsolute URL to parse, including its scheme (e.g.
https://example.com/path?a=1)
When the URL omits the port, the scheme's default port is returned:
| Scheme | Port |
|---|---|
ftp | 21 |
http | 80 |
https | 443 |
ws | 80 |
wss | 443 |
Any other scheme returns null.
urlstringThe original input URL
schemestringURL scheme without the trailing colon (e.g.
https)hoststringHostname
portnumber|nullPort number — the scheme's default port when the URL omits it,
nullif the scheme has no known defaultpathstringPath component
paramsobjectQuery parameters — duplicate keys are grouped into an array
fragmentstringFragment identifier without the leading
#validbooleanAlways
truefor a successfully parsed URL
If parameters are missing or invalid, the API will return an error:
- 400
Please provide a URL (?url={URL})Theurlparameter is missing - 400
URL cannot exceed 2048 charactersTheurlexceeds the maximum length - 400
Invalid URLTheurlvalue cannot be parsed as a URL
Last updated on September 12, 2026