Navigation
POST web

url_build

1 credit

Build a URL from individual components

Endpoint

POST /api/v1/tools/web/url_build

Body Parameters

host string required
path string optional default: ""
port integer | null optional default: null
scheme string optional default: "https"
fragment string optional default: ""
query_params object | null optional default: null

Example

input Request
{
    "host": "example.com",
    "path": "/search",
    "port": 8080,
    "scheme": "https",
    "fragment": "results",
    "query_params": {
        "q": "hello world"
    }
}
output Response
{
    "url": "https://example.com:8080/search?q=hello+world#results"
}

Response Format

HTTP/1.1 200 OK SUCCESS
{
  "success": true,
  "data": {
    "url": "https://example.com:8080/search?q=hello+world#results"
},
  "meta": {
    "tool": "url_build",
    "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.