{
  "openapi": "3.1.0",
  "info": {
    "title": "Crown Fund API",
    "version": "1.0.0",
    "description": "Founder tools as an API: calculators, UK/US filings and compliance calendars, tax rules, investor readiness and legal help (SRA register, guideline rates, legal aid). Public and read-only. Also available as an MCP server at /mcp.",
    "contact": {
      "url": "https://docs.crownfund.co/developers/api/"
    },
    "license": {
      "name": "Terms of Use",
      "url": "https://legal.crownfund.co/terms-and-conditions"
    }
  },
  "servers": [
    {
      "url": "https://mcp.crownfund.co"
    }
  ],
  "paths": {
    "/v1/calculators": {
      "get": {
        "operationId": "list_calculators",
        "summary": "List founder calculators",
        "description": "List the 61 Counting House calculators (fundraising, growth, cash, UK and US tax, pay) with their inputs. Filter by region (uk or us) and group.",
        "tags": [
          "calculators"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "calculators": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "description": "id, title, group, region, blurb, inputs[] (id, label, unit, default, options)",
                        "additionalProperties": true
                      }
                    }
                  },
                  "required": [],
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "region",
            "in": "query",
            "required": false,
            "description": "uk or us. Shared calculators appear in both.",
            "schema": {
              "type": "string",
              "description": "uk or us. Shared calculators appear in both.",
              "enum": [
                "uk",
                "us"
              ]
            }
          },
          {
            "name": "group",
            "in": "query",
            "required": false,
            "description": "Group",
            "schema": {
              "type": "string",
              "description": "Group",
              "enum": [
                "Fundraising & equity",
                "Growth & unit economics",
                "Cash & operations",
                "UK company & tax",
                "US company & tax",
                "Pay & living"
              ]
            }
          }
        ]
      }
    },
    "/v1/calculators/run": {
      "post": {
        "operationId": "run_calculator",
        "summary": "Run a calculator",
        "description": "Run any Counting House calculator. Pass its id and any inputs to override (others use defaults). Money is in GBP for region uk, USD for us (shared calculators follow the region). Percentages are whole numbers (20 = 20%).",
        "tags": [
          "calculators"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Calculator id"
                    },
                    "title": {
                      "type": "string",
                      "description": "Title"
                    },
                    "region": {
                      "type": "string",
                      "description": "Region used"
                    },
                    "inputs": {
                      "type": "object",
                      "description": "Inputs used",
                      "additionalProperties": true
                    },
                    "primary": {
                      "type": "object",
                      "description": "Headline result: label, value, sub",
                      "additionalProperties": true
                    },
                    "rows": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "description": "label, value",
                        "additionalProperties": true
                      }
                    },
                    "bars": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "description": "label, share, value",
                        "additionalProperties": true
                      }
                    },
                    "notes": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "description": "Note"
                      }
                    },
                    "url": {
                      "type": "string",
                      "description": "Open it on crownfund.co"
                    }
                  },
                  "required": [],
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "Calculator id (see list_calculators)",
                    "enum": [
                      "india-uk-salary",
                      "uk-take-home",
                      "india-in-hand",
                      "uk-employee-cost",
                      "india-uk-hire",
                      "salary-vs-dividends",
                      "corporation-tax",
                      "vat-threshold",
                      "seis-eis",
                      "rd-relief",
                      "round-dilution",
                      "safe-conversion",
                      "multi-round",
                      "exit-waterfall",
                      "valuation",
                      "ltv-cac",
                      "runway",
                      "break-even",
                      "burn-multiple",
                      "rule-of-40",
                      "mrr-projector",
                      "nrr",
                      "margin-markup",
                      "loan",
                      "raise-size",
                      "investor-returns",
                      "convertible-note",
                      "down-round",
                      "pro-rata",
                      "vesting",
                      "price-increase",
                      "discount-breakeven",
                      "magic-number",
                      "sales-capacity",
                      "funnel",
                      "annual-prepay",
                      "hire-impact",
                      "contractor-vs-employee",
                      "rbf-cost",
                      "raise-timing",
                      "cash-cycle",
                      "fx-exposure",
                      "exit-cgt",
                      "emi-options",
                      "company-pension",
                      "india-us-salary",
                      "us-take-home",
                      "us-employee-cost",
                      "india-us-hire",
                      "scorp-salary",
                      "us-corp-tax",
                      "sales-tax-nexus",
                      "qsbs",
                      "us-rd-credit",
                      "delaware-franchise",
                      "us-exit-tax",
                      "iso-nso",
                      "election-83b",
                      "solo-401k",
                      "us-hire-impact",
                      "us-contractor"
                    ]
                  },
                  "region": {
                    "type": "string",
                    "description": "uk or us (default: the calculator’s own region, else uk)",
                    "enum": [
                      "uk",
                      "us"
                    ]
                  },
                  "inputs": {
                    "type": "object",
                    "description": "Input values keyed by input id",
                    "additionalProperties": true
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/v1/filings": {
      "get": {
        "operationId": "search_filings",
        "summary": "Search UK and US filings",
        "description": "Search the Filing Almanac: 77 HMRC, Companies House, IRS, SSA, SEC, FinCEN and state (DE, CA, NY, TX, FL, WA) filings with who files, when, how, penalties and the official source (checked 2026-11-30).",
        "tags": [
          "filings"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "filings": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "description": "id, country, authority, scope, form, name, category, who, when, next, how, penalty, link, verified",
                        "additionalProperties": true
                      }
                    },
                    "checked": {
                      "type": "string",
                      "description": "Date sources were checked"
                    }
                  },
                  "required": [],
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "country",
            "in": "query",
            "required": false,
            "description": "UK or US",
            "schema": {
              "type": "string",
              "description": "UK or US",
              "enum": [
                "UK",
                "US"
              ]
            }
          },
          {
            "name": "scope",
            "in": "query",
            "required": false,
            "description": "UK, Federal, Delaware, California, New York, Texas, Florida or Washington",
            "schema": {
              "type": "string",
              "description": "UK, Federal, Delaware, California, New York, Texas, Florida or Washington"
            }
          },
          {
            "name": "category",
            "in": "query",
            "required": false,
            "description": "Topic",
            "schema": {
              "type": "string",
              "description": "Topic",
              "enum": [
                "Registration",
                "Company tax",
                "Company admin",
                "Payroll",
                "Sales tax & VAT",
                "Equity & investment",
                "R&D",
                "Personal tax"
              ]
            }
          },
          {
            "name": "query",
            "in": "query",
            "required": false,
            "description": "Free text, e.g. \"CT600\", \"1099\", \"franchise\", \"EMI\"",
            "schema": {
              "type": "string",
              "description": "Free text, e.g. \"CT600\", \"1099\", \"franchise\", \"EMI\""
            }
          }
        ]
      }
    },
    "/v1/calendar": {
      "post": {
        "operationId": "compliance_calendar",
        "summary": "Compliance calendar for a company",
        "description": "Dated filing and payment deadlines for a UK or US company from its year end and facts (employer, VAT, EMI, R&D, entity type, states...). Each event links to the official page. Add ?format=ics (or GET /v1/calendar.ics) to subscribe in Google, Apple or Outlook Calendar.",
        "tags": [
          "calendar"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "events": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "date": {
                            "type": "string",
                            "description": "YYYY-MM-DD"
                          },
                          "title": {
                            "type": "string",
                            "description": "What is due"
                          },
                          "form": {
                            "type": "string",
                            "description": "Form"
                          },
                          "authority": {
                            "type": "string",
                            "description": "Who it goes to"
                          },
                          "filing_id": {
                            "type": "string",
                            "description": "Filing Almanac id"
                          },
                          "link": {
                            "type": "string",
                            "description": "Official page"
                          },
                          "note": {
                            "type": "string",
                            "description": "Notes"
                          }
                        },
                        "required": [],
                        "additionalProperties": true
                      }
                    },
                    "ics_url": {
                      "type": "string",
                      "description": "Calendar subscription URL"
                    },
                    "notes": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "description": "Note"
                      }
                    }
                  },
                  "required": [],
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "country": {
                    "type": "string",
                    "description": "UK or US",
                    "enum": [
                      "UK",
                      "US"
                    ]
                  },
                  "year_end": {
                    "type": "string",
                    "description": "Accounting / tax year end as MM-DD, e.g. 03-31 or 12-31"
                  },
                  "incorporated": {
                    "type": "string",
                    "description": "Incorporation date YYYY-MM-DD (UK: first accounts and confirmation statements)"
                  },
                  "from": {
                    "type": "string",
                    "description": "Start date YYYY-MM-DD (default today)"
                  },
                  "months": {
                    "type": "number",
                    "description": "How many months ahead (1-36, default 12)"
                  },
                  "employer": {
                    "type": "boolean",
                    "description": "Runs a payroll"
                  },
                  "vat_registered": {
                    "type": "boolean",
                    "description": "UK: VAT registered"
                  },
                  "vat_stagger": {
                    "type": "number",
                    "description": "UK VAT stagger 1, 2 or 3 (quarter ends Mar/Jun/Sep/Dec, Apr/Jul/Oct/Jan, May/Aug/Nov/Feb)"
                  },
                  "emi": {
                    "type": "boolean",
                    "description": "UK: has EMI options"
                  },
                  "rd_claim": {
                    "type": "boolean",
                    "description": "UK: will claim R&D relief"
                  },
                  "director_self_assessment": {
                    "type": "boolean",
                    "description": "UK: include directors’ Self Assessment dates"
                  },
                  "entity": {
                    "type": "string",
                    "description": "US entity",
                    "enum": [
                      "c-corp",
                      "s-corp",
                      "partnership",
                      "sole"
                    ]
                  },
                  "states": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "State code: DE, CA, NY, TX, FL, WA"
                    }
                  },
                  "contractors": {
                    "type": "boolean",
                    "description": "US: pays contractors (1099-NEC)"
                  },
                  "iso_exercises": {
                    "type": "boolean",
                    "description": "US: employees exercised ISOs"
                  },
                  "foreign_owned": {
                    "type": "boolean",
                    "description": "US: 25%+ foreign-owned (Form 5472)"
                  },
                  "foreign_accounts": {
                    "type": "boolean",
                    "description": "US: foreign bank accounts over $10,000 (FBAR)"
                  },
                  "founder_individual": {
                    "type": "boolean",
                    "description": "US: include founders’ 1040 and estimated tax dates"
                  }
                },
                "required": [
                  "country",
                  "year_end"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/v1/tax": {
      "get": {
        "operationId": "tax_rules",
        "summary": "Tax rules and rates",
        "description": "The rates, thresholds and allowances behind the calculators: UK 2026/27, US federal 2026 (with state summaries) or India new regime, with the official sources they were checked against.",
        "tags": [
          "tax"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "country": {
                      "type": "string",
                      "description": "Country"
                    },
                    "rules": {
                      "type": "object",
                      "description": "Rates and thresholds",
                      "additionalProperties": true
                    },
                    "sources": {
                      "type": "string",
                      "description": "Where each rule comes from"
                    }
                  },
                  "required": [],
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "country",
            "in": "query",
            "required": true,
            "description": "uk, us or india",
            "schema": {
              "type": "string",
              "description": "uk, us or india",
              "enum": [
                "uk",
                "us",
                "india"
              ]
            }
          }
        ]
      }
    },
    "/v1/readiness/questions": {
      "get": {
        "operationId": "readiness_questions",
        "summary": "Investor readiness questions",
        "description": "The 14 questions of the Crown Fund Investor Readiness Diagnostic (traction, team, market, readiness, narrative) with their answer options.",
        "tags": [
          "readiness"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "questions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "description": "id, category, text, options[]",
                        "additionalProperties": true
                      }
                    }
                  },
                  "required": [],
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": []
      }
    },
    "/v1/readiness/score": {
      "post": {
        "operationId": "readiness_score",
        "summary": "Score investor readiness",
        "description": "Score a venture on the Investor Readiness Diagnostic. Pass 14 answer indexes (0-based, in question order). Returns the score out of 100, tier, category scores and the gaps to fix first.",
        "tags": [
          "readiness"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "total": {
                      "type": "number",
                      "description": "Score out of 100"
                    },
                    "tier": {
                      "type": "string",
                      "description": "Tier"
                    },
                    "rank": {
                      "type": "string",
                      "description": "Position"
                    },
                    "categories": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "description": "name, score, weight",
                        "additionalProperties": true
                      }
                    },
                    "gaps": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "description": "name, score, rec",
                        "additionalProperties": true
                      }
                    }
                  },
                  "required": [],
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "answers": {
                    "type": "array",
                    "items": {
                      "type": "number",
                      "description": "Option index for each question, in order"
                    },
                    "description": "14 answer indexes"
                  }
                },
                "required": [
                  "answers"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/v1/legal/solicitors": {
      "get": {
        "operationId": "find_solicitors",
        "summary": "Find SRA-authorised solicitor firms",
        "description": "Find currently SRA-authorised solicitor firms in England and Wales for a founder need, near a town or postcode, with each office’s guideline hourly-rate band and SRA register link.",
        "tags": [
          "legal"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "need": {
                      "type": "string",
                      "description": "Need"
                    },
                    "total": {
                      "type": "number",
                      "description": "Matches"
                    },
                    "firms": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "description": "Firm name"
                          },
                          "sra_number": {
                            "type": "number",
                            "description": "SRA number"
                          },
                          "town": {
                            "type": "string",
                            "description": "Head office town"
                          },
                          "postcode": {
                            "type": "string",
                            "description": "Head office postcode"
                          },
                          "county": {
                            "type": "string",
                            "description": "County"
                          },
                          "phone": {
                            "type": "string",
                            "description": "Phone"
                          },
                          "website": {
                            "type": "string",
                            "description": "Website"
                          },
                          "offices": {
                            "type": "number",
                            "description": "Number of offices"
                          },
                          "rate_band": {
                            "type": "string",
                            "description": "Guideline hourly-rate band for the office"
                          },
                          "register_url": {
                            "type": "string",
                            "description": "SRA register page"
                          }
                        },
                        "required": [],
                        "additionalProperties": true
                      }
                    },
                    "updated": {
                      "type": "string",
                      "description": "Register snapshot date"
                    }
                  },
                  "required": [],
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "need",
            "in": "query",
            "required": true,
            "description": "What you need",
            "schema": {
              "type": "string",
              "description": "What you need",
              "enum": [
                "company",
                "employment",
                "ip",
                "commercial",
                "property",
                "disputes",
                "immigration",
                "tax",
                "regulatory",
                "personal",
                "criminal"
              ]
            }
          },
          {
            "name": "where",
            "in": "query",
            "required": false,
            "description": "Town or postcode (prefix), e.g. Manchester or EC2",
            "schema": {
              "type": "string",
              "description": "Town or postcode (prefix), e.g. Manchester or EC2"
            }
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "description": "Firm name filter",
            "schema": {
              "type": "string",
              "description": "Firm name filter"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Max results (default 20, max 100)",
            "schema": {
              "type": "number",
              "description": "Max results (default 20, max 100)"
            }
          }
        ]
      }
    },
    "/v1/legal/verify": {
      "get": {
        "operationId": "verify_law_firm",
        "summary": "Verify a law firm on the SRA register (live)",
        "description": "Check a firm name or SRA number live against the SRA register before you instruct it or pay it: authorisation status (authorised, conditions, ceased, revoked, SRA intervened), whether it is safe to instruct, trading and previous names, work areas and head office details.",
        "tags": [
          "legal"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "query": {
                      "type": "string",
                      "description": "What was searched"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "description": "Firm on the SRA register: status, safe_to_instruct, advice, trading and previous names, work areas, head office, register_url",
                        "additionalProperties": true
                      }
                    }
                  },
                  "required": [],
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "required": true,
            "description": "Firm name or SRA number",
            "schema": {
              "type": "string",
              "description": "Firm name or SRA number"
            }
          }
        ]
      }
    },
    "/v1/legal/check-document": {
      "post": {
        "operationId": "check_document_for_law_firms",
        "summary": "Check a letter or email for law firms",
        "description": "Paste a letter, email, invoice or term sheet: finds SRA numbers and law-firm names in it and verifies each live on the SRA register. Useful against impersonation scams and to confirm the firm on the other side is regulated.",
        "tags": [
          "legal"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "found": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "description": "what was found and its register results",
                        "additionalProperties": true
                      }
                    },
                    "warnings": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "description": "Warnings"
                      }
                    }
                  },
                  "required": [],
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string",
                    "description": "The text of the document (max 20,000 characters)"
                  }
                },
                "required": [
                  "text"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/v1/legal/rates": {
      "get": {
        "operationId": "legal_rates",
        "summary": "Official hourly-rate benchmarks",
        "description": "UK: the GOV.UK solicitors’ guideline hourly rates (from 1 January 2026) for a postcode or town, by grade, with an estimate for a number of hours. US: the DOJ Fitzpatrick Matrix 2026.",
        "tags": [
          "legal"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "band, grades with hourly rates, estimate, source",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "country",
            "in": "query",
            "required": false,
            "description": "uk or us",
            "schema": {
              "type": "string",
              "description": "uk or us",
              "enum": [
                "uk",
                "us"
              ]
            }
          },
          {
            "name": "postcode",
            "in": "query",
            "required": false,
            "description": "UK postcode or outward code",
            "schema": {
              "type": "string",
              "description": "UK postcode or outward code"
            }
          },
          {
            "name": "town",
            "in": "query",
            "required": false,
            "description": "UK town",
            "schema": {
              "type": "string",
              "description": "UK town"
            }
          },
          {
            "name": "hours",
            "in": "query",
            "required": false,
            "description": "Hours to estimate (default 5)",
            "schema": {
              "type": "number",
              "description": "Hours to estimate (default 5)"
            }
          }
        ]
      }
    },
    "/v1/legal/aid": {
      "get": {
        "operationId": "legal_aid_check",
        "summary": "Can legal aid apply?",
        "description": "Whether legal aid can apply to a need in England and Wales (GOV.UK scope and means test) or the US (LSC-funded programmes, 125% of poverty guidelines), with where to check.",
        "tags": [
          "legal"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "status, explanation, links",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "need",
            "in": "query",
            "required": true,
            "description": "Need",
            "schema": {
              "type": "string",
              "description": "Need",
              "enum": [
                "company",
                "employment",
                "ip",
                "commercial",
                "property",
                "disputes",
                "immigration",
                "tax",
                "regulatory",
                "personal",
                "criminal"
              ]
            }
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "description": "uk or us",
            "schema": {
              "type": "string",
              "description": "uk or us",
              "enum": [
                "uk",
                "us"
              ]
            }
          }
        ]
      }
    },
    "/v1/legal/market": {
      "get": {
        "operationId": "legal_market",
        "summary": "Where the firms are",
        "description": "For a founder need, the towns with the most SRA-authorised firms and the share of firms in each guideline-rate band: useful to pick where to look or to compare London with regional firms.",
        "tags": [
          "legal"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "need": {
                      "type": "string",
                      "description": "Need"
                    },
                    "total": {
                      "type": "number",
                      "description": "Firms"
                    },
                    "towns": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "description": "town, firms",
                        "additionalProperties": true
                      }
                    },
                    "bands": {
                      "type": "object",
                      "description": "firms per rate band",
                      "additionalProperties": true
                    }
                  },
                  "required": [],
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "need",
            "in": "query",
            "required": true,
            "description": "Need",
            "schema": {
              "type": "string",
              "description": "Need",
              "enum": [
                "company",
                "employment",
                "ip",
                "commercial",
                "property",
                "disputes",
                "immigration",
                "tax",
                "regulatory",
                "personal",
                "criminal"
              ]
            }
          },
          {
            "name": "top",
            "in": "query",
            "required": false,
            "description": "How many towns (default 15)",
            "schema": {
              "type": "number",
              "description": "How many towns (default 15)"
            }
          }
        ]
      }
    },
    "/v1/legal/us": {
      "get": {
        "operationId": "us_legal_help",
        "summary": "US lawyer finders by state",
        "description": "Official state bar lawyer-referral services and licence lookups (CA, NY, TX, FL, DE, WA), the federal legal-aid rule and the DOJ rate benchmark.",
        "tags": [
          "legal"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "states, legal_aid, matrix",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "state",
            "in": "query",
            "required": false,
            "description": "State code",
            "schema": {
              "type": "string",
              "description": "State code",
              "enum": [
                "CA",
                "NY",
                "TX",
                "FL",
                "DE",
                "WA"
              ]
            }
          }
        ]
      }
    },
    "/v1/legal/us/ny-attorneys": {
      "get": {
        "operationId": "find_ny_attorneys",
        "summary": "Search New York registered attorneys (live)",
        "description": "Live search of New York’s attorney registrations (NY court system open data): currently registered attorneys by last name or firm, optionally by city.",
        "tags": [
          "legal"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "attorneys": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "description": "name, firm, city, phone, year_admitted, registration_number",
                        "additionalProperties": true
                      }
                    }
                  },
                  "required": [],
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "required": true,
            "description": "Last name or firm (prefix)",
            "schema": {
              "type": "string",
              "description": "Last name or firm (prefix)"
            }
          },
          {
            "name": "city",
            "in": "query",
            "required": false,
            "description": "City (prefix)",
            "schema": {
              "type": "string",
              "description": "City (prefix)"
            }
          }
        ]
      }
    },
    "/v1/crownfund": {
      "get": {
        "operationId": "crown_fund_services",
        "summary": "Crown Fund services and links",
        "description": "What Crown Fund offers founders (integration tiers and prices, diagnostic, Funding School, QRaaS) and where each tool lives.",
        "tags": [
          "crownfund"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "tiers, tools, docs",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": []
      }
    },
    "/v1/calendar.ics": {
      "get": {
        "operationId": "compliance_calendar_ics",
        "summary": "Compliance calendar as iCalendar (subscribe in Google, Apple or Outlook)",
        "description": "Same query parameters as POST /v1/calendar (arrays comma-separated).",
        "responses": {
          "200": {
            "description": "text/calendar"
          }
        }
      }
    }
  }
}