Navigation
POST web

url_parse

1 credit

Parse a URL into its components

Endpoint

POST /api/v1/tools/web/url_parse

Body Parameters

url string required

Example

input Request
{
    "url": "https://example.com:8080/path/to/page?foo=bar&baz=1#section"
}
output Response
{
    "host": "example.com",
    "path": "/path/to/page",
    "port": 8080,
    "query": "foo=bar&baz=1",
    "netloc": "example.com:8080",
    "scheme": "https",
    "fragment": "section",
    "query_params": {
        "baz": [
            "1"
        ],
        "foo": [
            "bar"
        ]
    }
}

Response Format

HTTP/1.1 200 OK SUCCESS
{
  "success": true,
  "data": {
    "host": "example.com",
    "path": "/path/to/page",
    "port": 8080,
    "query": "foo=bar&baz=1",
    "netloc": "example.com:8080",
    "scheme": "https",
    "fragment": "section",
    "query_params": {
        "baz": [
            "1"
        ],
        "foo": [
            "bar"
        ]
    }
},
  "meta": {
    "tool": "url_parse",
    "credits_consumed": 1
  }
}
HTTP/1.1 422 Unprocessable Entity ERROR
{
  "success": false,
  "data": null,
  "error": {
    "code": "validation_error",
    "message": "The given data was invalid."
  }
}

Sign in to try this tool directly from the docs.

Code Examples
Request Example
lightbulb Developer Tip

Credits are deducted before execution. If the upstream tool fails, credits are automatically refunded to your account.