← All tool references

Travel & Auto · not_available

Rideshare Fare Estimator

Rideshare Fare Estimator with transparent inputs and reviewable results.

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/rideshare-fare-estimator

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/rideshare-fare-estimator/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.

distance · number · required
Enter trip distance.
duration · number · required
Enter trip duration.
base_fare · number · required
Enter base fare.
per_mile · number · required
Enter per-mile rate.
per_minute · number · required
Enter per-minute rate.
surge_multiplier · number · required
Enter surge multiplier.
fees · number · required
Enter fixed fees.
minimum_fare · number · required
Enter minimum fare.
{
    "type": "object",
    "properties": {
        "distance": {
            "type": "number",
            "description": "Enter trip distance."
        },
        "duration": {
            "type": "number",
            "description": "Enter trip duration."
        },
        "base_fare": {
            "type": "number",
            "description": "Enter base fare."
        },
        "per_mile": {
            "type": "number",
            "description": "Enter per-mile rate."
        },
        "per_minute": {
            "type": "number",
            "description": "Enter per-minute rate."
        },
        "surge_multiplier": {
            "type": "number",
            "description": "Enter surge multiplier."
        },
        "fees": {
            "type": "number",
            "description": "Enter fixed fees."
        },
        "minimum_fare": {
            "type": "number",
            "description": "Enter minimum fare."
        }
    },
    "required": [
        "distance",
        "duration",
        "base_fare",
        "per_mile",
        "per_minute",
        "surge_multiplier",
        "fees",
        "minimum_fare"
    ],
    "additionalProperties": false
}

Output schema

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

estimated_fare · number
Estimated fare produced by the tool.
distance_charge · number
Distance charge produced by the tool.
time_charge · number
Time charge produced by the tool.
fare_range · string
Planning range produced by the tool.
{
    "type": "object",
    "properties": {
        "estimated_fare": {
            "type": "number",
            "description": "Estimated fare produced by the tool."
        },
        "distance_charge": {
            "type": "number",
            "description": "Distance charge produced by the tool."
        },
        "time_charge": {
            "type": "number",
            "description": "Time charge produced by the tool."
        },
        "fare_range": {
            "type": "string",
            "description": "Planning range produced by the tool."
        }
    },
    "additionalProperties": false
}

Rideshare Fare Estimator 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/rideshare-fare-estimator/execute" \
  -H "Content-Type: application/json" \
  -d '{
    "distance": 12,
    "duration": 28,
    "base_fare": 2.5,
    "per_mile": 1.4499999999999999555910790149937383830547332763671875,
    "per_minute": 0.320000000000000006661338147750939242541790008544921875,
    "surge_multiplier": 1.1999999999999999555910790149937383830547332763671875,
    "fees": 3.5,
    "minimum_fare": 8
}'
{
    "ok": true,
    "data": {
        "slug": "rideshare-fare-estimator",
        "result": {
            "values": {
                "estimated_fare": 38.13000000000000255795384873636066913604736328125,
                "distance_charge": 17.39999999999999857891452847979962825775146484375,
                "time_charge": 8.96000000000000085265128291212022304534912109375,
                "fare_range": "34.32–45.76"
            },
            "display": {
                "display": "38.13"
            },
            "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.