Validate URL
Validate URL is an API that checks whether a web address is well-formed and breaks it into protocol, host, port, path and query parameters. It never connects to the URL: there's no risk of it being used to reach your internal network, it only looks at the text.
How it works
You send the URL text and it's parsed with the same engine any browser uses to understand an address, with no network request involved. Useful for validating a form field, cleaning a list of links before processing them, or pulling the domain out of a long URL.
An invalid URL isn't a request error: the response is 200 with "valid": false and the reason in reason.
All you need
- Your API key. Create it in your dashboard with "+ Create key". It's shown only once, so copy and save it.
- In your automation platform, an "HTTP Request" step (n8n, Make, Zapier, Pipedream… all have one).
How to use it in n8n (step by step)
In the HTTP Request node:
- Method:
POST - URL:
https://api.cofferdock.com/validate-url - Send Headers: on → add two:
x-api-key= your key, andContent-Type=application/json - Send Body: on → Body Content Type: JSON →
{ "url": "https://cofferdock.com/pdf-watermark?ref=blog" }
In Make (HTTP → Make a request module): same method and URL, Body type: Raw, Content type: JSON, with the same body.
Options (inside the JSON)
| Option | Default | What it does |
|---|---|---|
url | - | Required. The URL text to validate. |
allowed_protocols | ["http","https"] | List of protocols that count as valid, e.g. add "ftp" if you need it. |
API overview
- Endpoint:
POST https://api.cofferdock.com/validate-url - Auth: header
x-api-key: YOUR_KEY. - Input:
application/jsonONLY. - Engine: Node.js's native
URLparser. No network connection of any kind: zero SSRF risk. - Limits: 30 requests/min per IP. 1 call = 1 credit, whether the URL is valid or not.
Options
| Option | Default | Description |
|---|---|---|
url | - | Required. Non-empty string, up to 4096 characters (400 otherwise). |
allowed_protocols | ["http","https"] | Non-empty array of strings. Compared case-insensitively. |
Examples
curl:
curl -X POST "https://api.cofferdock.com/validate-url" \
-H "x-api-key: YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"url":"https://cofferdock.com/pdf-watermark?ref=blog"}'
JavaScript (Node 18+):
const r = await fetch('https://api.cofferdock.com/validate-url', {
method: 'POST',
headers: { 'x-api-key': 'YOUR_KEY', 'Content-Type': 'application/json' },
body: JSON.stringify({ url: 'https://cofferdock.com/pdf-watermark?ref=blog' }),
});
const { valid, hostname, pathname, query } = await r.json();
Response
{ "success": true, "valid": true, "reason": null, "protocol": "https",
"hostname": "cofferdock.com", "port": null, "pathname": "/pdf-watermark",
"query": { "ref": "blog" }, "meta": { "used": 12, "remaining": 488 } }
What you get back
valid, reason (why it's not valid, or null), and when valid: protocol, hostname, port, pathname and query (the parameters as an object).