← All tool references

Travel & Auto · not_available

Commute Cost Calculator

Estimate recurring commute cost across fuel, tolls, parking, and workdays.

Open public tool

Overview

Category
Travel & Auto
API mode
not_available
Processing
client-side
Privacy
no-data-stored

Public descriptor

The descriptor is available without an API key and supplies this tool’s metadata, schemas, modes, and examples.

GET /api/v1/tools/commute-cost-calculator

View this descriptor as JSON

Execute availability

This tool is documented as a browser capability. Its execute route does not produce a server-side result; when execution is enabled, it responds with browser_interaction_required and points callers to the public tool page.

POST /api/v1/tools/commute-cost-calculator/execute

Authentication is not issued during the preview. A bearer API key is planned for execution after launch.

Input schema

object object; additional properties are not accepted.

round_trip_distance · number · required
Enter round-trip distance.
workdays_per_month · number · required
Enter workdays per month.
fuel_economy · number · required
Enter fuel economy.
fuel_price · number · required
Enter fuel price per gallon.
daily_tolls · number · required
Enter daily tolls.
daily_parking · number · required
Enter daily parking.
{
    "type": "object",
    "properties": {
        "round_trip_distance": {
            "type": "number",
            "description": "Enter round-trip distance."
        },
        "workdays_per_month": {
            "type": "number",
            "description": "Enter workdays per month."
        },
        "fuel_economy": {
            "type": "number",
            "description": "Enter fuel economy."
        },
        "fuel_price": {
            "type": "number",
            "description": "Enter fuel price per gallon.",
            "minimum": 0
        },
        "daily_tolls": {
            "type": "number",
            "description": "Enter daily tolls.",
            "minimum": 0
        },
        "daily_parking": {
            "type": "number",
            "description": "Enter daily parking.",
            "minimum": 0
        }
    },
    "required": [
        "round_trip_distance",
        "workdays_per_month",
        "fuel_economy",
        "fuel_price",
        "daily_tolls",
        "daily_parking"
    ],
    "additionalProperties": false
}

Output schema

On a successful execution, schema values appear in data.result.values.

monthly_cost · number
Monthly commute cost produced by the tool.
annual_cost · number
Annual commute cost produced by the tool.
monthly_distance · number
Monthly distance produced by the tool.
monthly_fuel · number
Monthly fuel produced by the tool.
{
    "type": "object",
    "properties": {
        "monthly_cost": {
            "type": "number",
            "description": "Monthly commute cost produced by the tool."
        },
        "annual_cost": {
            "type": "number",
            "description": "Annual commute cost produced by the tool."
        },
        "monthly_distance": {
            "type": "number",
            "description": "Monthly distance produced by the tool."
        },
        "monthly_fuel": {
            "type": "number",
            "description": "Monthly fuel produced by the tool."
        }
    },
    "additionalProperties": false
}

Commute Cost Calculator worked example

The request body follows the published input schema. The response below shows the success-envelope shape returned after execution is available.

curl -X POST "https://utilitypages.org/api/v1/tools/commute-cost-calculator/execute" \
  -H "Content-Type: application/json" \
  -d '{
    "round_trip_distance": 34,
    "workdays_per_month": 21,
    "fuel_economy": 30,
    "fuel_price": 3.45000000000000017763568394002504646778106689453125,
    "daily_tolls": 4.5,
    "daily_parking": 8
}'
{
    "ok": true,
    "data": {
        "slug": "commute-cost-calculator",
        "result": {
            "values": {
                "monthly_cost": 344.6100000000000136424205265939235687255859375,
                "annual_cost": 4135.3199999999997089616954326629638671875,
                "monthly_distance": 714,
                "monthly_fuel": 23.800000000000000710542735760100185871124267578125
            },
            "display": {
                "display": "344.61"
            },
            "warnings": [],
            "assumptions": [],
            "steps": []
        }
    },
    "meta": [],
    "request_id": "req_example_123"
}

Errors

api_not_launched · 503
Returned by the current launch gate for every execute request.
invalid_json · 400
Returned when an enabled execute request does not contain valid JSON.
validation_failed · 422
Returned when a request does not satisfy the input schema.
browser_interaction_required · 422
Returned for browser capability tools instead of inventing a server-side result.
tool_not_found · 404
Returned when a requested descriptor slug does not exist.
execution_failed · 503
Returned when an enabled server-side execution cannot complete.