← All tool references

Travel & Auto · not_available

Hotel Night Calculator

Count hotel nights and calendar days between check-in and checkout.

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/hotel-night-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/hotel-night-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.

check_in · string · required
Enter check-in date.
check_out · string · required
Enter checkout date.
nightly_rate · number · required
Enter nightly rate.
tax_rate · number · required
Enter estimated lodging tax.
{
    "type": "object",
    "properties": {
        "check_in": {
            "type": "string",
            "description": "Enter check-in date."
        },
        "check_out": {
            "type": "string",
            "description": "Enter checkout date."
        },
        "nightly_rate": {
            "type": "number",
            "description": "Enter nightly rate.",
            "minimum": 0
        },
        "tax_rate": {
            "type": "number",
            "description": "Enter estimated lodging tax."
        }
    },
    "required": [
        "check_in",
        "check_out",
        "nightly_rate",
        "tax_rate"
    ],
    "additionalProperties": false
}

Output schema

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

nights · number
Hotel nights produced by the tool.
calendar_days · number
Calendar days produced by the tool.
room_subtotal · number
Room subtotal produced by the tool.
estimated_total · number
Estimated total produced by the tool.
{
    "type": "object",
    "properties": {
        "nights": {
            "type": "number",
            "description": "Hotel nights produced by the tool."
        },
        "calendar_days": {
            "type": "number",
            "description": "Calendar days produced by the tool."
        },
        "room_subtotal": {
            "type": "number",
            "description": "Room subtotal produced by the tool."
        },
        "estimated_total": {
            "type": "number",
            "description": "Estimated total produced by the tool."
        }
    },
    "additionalProperties": false
}

Hotel Night 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/hotel-night-calculator/execute" \
  -H "Content-Type: application/json" \
  -d '{
    "check_in": "2026-08-10",
    "check_out": "2026-08-15",
    "nightly_rate": 169,
    "tax_rate": 12
}'
{
    "ok": true,
    "data": {
        "slug": "hotel-night-calculator",
        "result": {
            "values": {
                "nights": 5,
                "calendar_days": 6,
                "room_subtotal": 845,
                "estimated_total": 946.3999999999999772626324556767940521240234375
            },
            "display": {
                "display": "5"
            },
            "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.