Docs ยท Parsing
Parse URL
Decompose a URL into scheme, host, path, query, fragment plus the public suffix and registrable domain.
POST
/v1/parse/url Stateless URL parsing using Python's standard library plus Mozilla's Public Suffix List. Returns every part of the URL split out, all query parameters as a list of key/value pairs (preserves order and repeats), plus the subdomain, registered domain, and public suffix. No fetch, no network โ pure transformation.
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| url | string | yes | โ | URL to parse. Must include a scheme (http/https) and host. |
Request
curl -X POST https://api.qcrawl.com/v1/parse/url \
-H "Authorization: Bearer osk_..." \
-d '{"url": "https://shop.example.co.uk/products/item?ref=ad&utm_source=fb#reviews"}' Response
{
"status": "success",
"url": "https://shop.example.co.uk/products/item?ref=ad&utm_source=fb#reviews",
"scheme": "https",
"host": "shop.example.co.uk",
"port": null,
"path": "/products/item",
"query": "ref=ad&utm_source=fb",
"query_params": [
{"key": "ref", "value": "ad"},
{"key": "utm_source", "value": "fb"}
],
"fragment": "reviews",
"subdomain": "shop",
"registered_domain": "example.co.uk",
"public_suffix": "co.uk",
"is_ip_host": false
} Errors
| Code | Meaning |
|---|---|
| 400 | URL is empty, malformed, or missing scheme/host. |