{
    "openapi": "3.1.0",
    "info": {
        "title": "Paycheck Math API",
        "version": "1.0.0",
        "description": "Free, keyless API for the Paycheck Math money calculators: paycheck/take-home pay (US states and cities, UK, Canada, Australia, Germany), income tax, sales tax/VAT, mortgage, loans, retirement, Gulf end-of-service gratuity, zakat, gold prices and currency conversion. Results are estimates, not advice."
    },
    "servers": [
        {
            "url": "https://paycheck-math.com"
        }
    ],
    "paths": {
        "/api/v1/calculate": {
            "get": {
                "operationId": "calculate",
                "summary": "Run the calculator on any page with your inputs",
                "description": "Pass the page path plus any input fields of that calculator as query parameters. Unknown fields are ignored; missing fields use the page defaults. Each response lists `inputs_accepted` for that calculator. Common fields: gross (annual salary), filing (single|married|head), state (US code), province (CA code), region (ruk|scotland), klasse (1-4), basic + start + end + reason (gratuity), amount, rate, price, down, years, months.",
                "parameters": [
                    {
                        "name": "path",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "example": "/us/paycheck-calculator/texas/"
                    },
                    {
                        "name": "gross",
                        "in": "query",
                        "schema": {
                            "type": "number"
                        },
                        "example": 85000
                    },
                    {
                        "name": "filing",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "single",
                                "married",
                                "head"
                            ]
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Result with every line of the calculation"
                    }
                }
            }
        },
        "/api/v1/rules": {
            "get": {
                "operationId": "getRules",
                "summary": "Tax and labour-law rules with official sources",
                "parameters": [
                    {
                        "name": "market",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "enum": [
                                "us",
                                "uk",
                                "ca",
                                "au",
                                "de",
                                "gulf"
                            ]
                        }
                    },
                    {
                        "name": "region",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        },
                        "example": "TX"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Rules JSON"
                    }
                }
            }
        },
        "/api/v1/pages": {
            "get": {
                "operationId": "listPages",
                "summary": "Every calculator and reference page",
                "parameters": [
                    {
                        "name": "market",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "tool",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "List of pages"
                    }
                }
            }
        },
        "/api/v1/rates": {
            "get": {
                "operationId": "getRates",
                "summary": "Live gold, silver and currency rates",
                "responses": {
                    "200": {
                        "description": "Rates"
                    }
                }
            }
        }
    }
}