Tools API Blog
Sign in Create account

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, and Content-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)

OptionDefaultWhat 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.

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).