{
  "openapi": "3.0.1",
  "info": {
    "title": "CDIAC California Municipal Debt Scraper",
    "description": "Scrape California municipal bond & debt issuances, disclosure documents, and default events from the California State Treasurer's official CDIAC DebtWatch database.",
    "version": "1.0",
    "x-build-id": "th7GJBYCbapbgUTbd"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/crawlerbros~cdiac-municipal-debt-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-crawlerbros-cdiac-municipal-debt-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/crawlerbros~cdiac-municipal-debt-scraper/runs": {
      "post": {
        "operationId": "runs-sync-crawlerbros-cdiac-municipal-debt-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/crawlerbros~cdiac-municipal-debt-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-crawlerbros-cdiac-municipal-debt-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "search",
              "byCdiacNumber",
              "documents",
              "defaults",
              "elections",
              "melloRoos"
            ],
            "type": "string",
            "description": "What to fetch.",
            "default": "search"
          },
          "searchQuery": {
            "title": "Search query",
            "type": "string",
            "description": "Free-text keyword search across issuer name, issue name, and project/series name (modes=search, documents, defaults, melloRoos), or agency/measure name (mode=elections).",
            "default": "Los Angeles"
          },
          "cdiacNumbers": {
            "title": "CDIAC numbers (mode=byCdiacNumber)",
            "type": "array",
            "description": "Exact CDIAC numbers to look up, e.g. `2020-1234`. Also used to scope mode=documents to a specific issuance.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "dateFrom": {
            "title": "Date from (YYYY-MM-DD)",
            "type": "string",
            "description": "Lower bound. Sale date for modes=search/documents/melloRoos; event date for mode=defaults; election date for mode=elections."
          },
          "dateTo": {
            "title": "Date to (YYYY-MM-DD)",
            "type": "string",
            "description": "Upper bound. Sale date for modes=search/documents/melloRoos; event date for mode=defaults; election date for mode=elections."
          },
          "minAmount": {
            "title": "Min amount (USD)",
            "minimum": 0,
            "maximum": 100000000000,
            "type": "integer",
            "description": "Lower bound. Principal amount for modes=search/documents/melloRoos; event amount for mode=defaults. Not applicable to mode=elections (no amount field)."
          },
          "maxAmount": {
            "title": "Max amount (USD)",
            "minimum": 0,
            "maximum": 100000000000,
            "type": "integer",
            "description": "Upper bound. Principal amount for modes=search/documents/melloRoos; event amount for mode=defaults. Not applicable to mode=elections (no amount field)."
          },
          "debtTypes": {
            "title": "Debt type (mode=search)",
            "uniqueItems": true,
            "type": "array",
            "description": "Restrict to one or more debt instrument types.",
            "items": {
              "type": "string",
              "enum": [
                "Bond Anticipation Note",
                "Capital Lease",
                "Certificate of Participation/Leases",
                "Commercial Paper",
                "Conduit Revenue Bond",
                "Conduit Revenue Note or Loan (Private Obligor)",
                "Drawdown Loan",
                "General Obligation Bond",
                "General Obligation Note",
                "Grant Anticipation Note",
                "Limited Tax Obligation Bond (Special Tax Bonds)",
                "Loan from Bank/Other Institution",
                "Marks-Roos Loan",
                "Other Bond",
                "Other Debt",
                "Other Note",
                "Pension Obligation Bonds",
                "Promissory Note",
                "Public Enterprise Revenue Bond",
                "Public Lease Revenue Bond",
                "Revenue Anticipation Note",
                "Revenue Anticipation Warrant",
                "Revenue Bond (Pool)",
                "Revolving Credit Agreement/Line of Credit",
                "Sales Tax Revenue Bond",
                "Special Assessment Bond",
                "State Agency Loan",
                "Tax Allocation Bond",
                "Tax Allocation Note",
                "Tax Anticipation Note",
                "Tax and Revenue Anticipation Note"
              ],
              "enumTitles": [
                "Bond Anticipation Note",
                "Capital Lease",
                "Certificate of Participation/Leases",
                "Commercial Paper",
                "Conduit Revenue Bond",
                "Conduit Revenue Note or Loan (Private Obligor)",
                "Drawdown Loan",
                "General Obligation Bond",
                "General Obligation Note",
                "Grant Anticipation Note",
                "Limited Tax Obligation Bond (Special Tax Bonds)",
                "Loan from Bank/Other Institution",
                "Marks-Roos Loan",
                "Other Bond",
                "Other Debt",
                "Other Note",
                "Pension Obligation Bonds",
                "Promissory Note",
                "Public Enterprise Revenue Bond",
                "Public Lease Revenue Bond",
                "Revenue Anticipation Note",
                "Revenue Anticipation Warrant",
                "Revenue Bond (Pool)",
                "Revolving Credit Agreement/Line of Credit",
                "Sales Tax Revenue Bond",
                "Special Assessment Bond",
                "State Agency Loan",
                "Tax Allocation Bond",
                "Tax Allocation Note",
                "Tax Anticipation Note",
                "Tax and Revenue Anticipation Note"
              ]
            },
            "default": []
          },
          "issuerTypes": {
            "title": "Issuer type (mode=search)",
            "uniqueItems": true,
            "type": "array",
            "description": "Restrict to one or more issuer entity types.",
            "items": {
              "type": "string",
              "enum": [
                "Air Pollution Control, Quality Management District",
                "Airport District",
                "Cemetery District",
                "City / County Government",
                "City Government",
                "Community College District",
                "Community Facilities District",
                "Community Services District",
                "County Board of Education",
                "County Government",
                "County Sanitation District",
                "County Service Area",
                "County Service Authority for Freeway Emergencies",
                "County Transportation Commission",
                "County Water District",
                "County Waterworks District",
                "Drainage District",
                "Fire Protection District",
                "Flood Control, Water Conservation District",
                "Harbor Port District",
                "Health Care District",
                "Hospital District",
                "Housing Authority",
                "Housing Finance Agency",
                "Industrial Development Authority",
                "Irrigation District",
                "Joint Powers Agency",
                "K-12 School District",
                "Library District",
                "Mosquito Abatement District",
                "Municipal Improvement District",
                "Municipal Utility District",
                "Municipal Water District",
                "Non-Profit Corporation (501(c)(3))",
                "NonProfit Public Benefit Corporation",
                "Park & Recreation District",
                "Parking Authority",
                "Public Utility District",
                "Redevelopment Agency",
                "Resource Conservation District",
                "Sanitation District",
                "Sewer District",
                "Special District",
                "State",
                "State Instrumentalities",
                "State Joint Powers Agency",
                "State Programs & Departments",
                "Successor Agency",
                "Transit Authority",
                "Transit District",
                "UC/CSU Affiliated Nonprofits",
                "UC/CSU System, Campuses",
                "Waste Conservation District",
                "Waste Management Agency / Authority",
                "Waste Storage District",
                "Water Agency, Authority",
                "Water District"
              ],
              "enumTitles": [
                "Air Pollution Control, Quality Management District",
                "Airport District",
                "Cemetery District",
                "City / County Government",
                "City Government",
                "Community College District",
                "Community Facilities District",
                "Community Services District",
                "County Board of Education",
                "County Government",
                "County Sanitation District",
                "County Service Area",
                "County Service Authority for Freeway Emergencies",
                "County Transportation Commission",
                "County Water District",
                "County Waterworks District",
                "Drainage District",
                "Fire Protection District",
                "Flood Control, Water Conservation District",
                "Harbor Port District",
                "Health Care District",
                "Hospital District",
                "Housing Authority",
                "Housing Finance Agency",
                "Industrial Development Authority",
                "Irrigation District",
                "Joint Powers Agency",
                "K-12 School District",
                "Library District",
                "Mosquito Abatement District",
                "Municipal Improvement District",
                "Municipal Utility District",
                "Municipal Water District",
                "Non-Profit Corporation (501(c)(3))",
                "NonProfit Public Benefit Corporation",
                "Park & Recreation District",
                "Parking Authority",
                "Public Utility District",
                "Redevelopment Agency",
                "Resource Conservation District",
                "Sanitation District",
                "Sewer District",
                "Special District",
                "State",
                "State Instrumentalities",
                "State Joint Powers Agency",
                "State Programs & Departments",
                "Successor Agency",
                "Transit Authority",
                "Transit District",
                "UC/CSU Affiliated Nonprofits",
                "UC/CSU System, Campuses",
                "Waste Conservation District",
                "Waste Management Agency / Authority",
                "Waste Storage District",
                "Water Agency, Authority",
                "Water District"
              ]
            },
            "default": []
          },
          "issuerGroups": {
            "title": "Issuer group (mode=search)",
            "uniqueItems": true,
            "type": "array",
            "description": "Restrict to one or more high-level issuer groupings.",
            "items": {
              "type": "string",
              "enum": [
                "City Governments",
                "Community College Districts",
                "Community Facilities Districts (Mello-Roos)",
                "County Governments",
                "Hospital & Health Care District",
                "Housing Agencies/Authorities",
                "JPA & Marks-Roos Authorities",
                "K-12 School Districts",
                "Nonprofit Public Benefit Corporations",
                "Other Districts",
                "Redevelopment Agencies & Successors",
                "Solid Waste & Sanitation Districts",
                "State Departments/Agencies",
                "State Instrumentalities",
                "State of California",
                "Transportation Districts",
                "UC/CSU & Affiliates",
                "Utility Districts",
                "Water/Wastewater/Flood Control Districts"
              ],
              "enumTitles": [
                "City Governments",
                "Community College Districts",
                "Community Facilities Districts (Mello-Roos)",
                "County Governments",
                "Hospital & Health Care District",
                "Housing Agencies/Authorities",
                "JPA & Marks-Roos Authorities",
                "K-12 School Districts",
                "Nonprofit Public Benefit Corporations",
                "Other Districts",
                "Redevelopment Agencies & Successors",
                "Solid Waste & Sanitation Districts",
                "State Departments/Agencies",
                "State Instrumentalities",
                "State of California",
                "Transportation Districts",
                "UC/CSU & Affiliates",
                "Utility Districts",
                "Water/Wastewater/Flood Control Districts"
              ]
            },
            "default": []
          },
          "sourcesOfRepayment": {
            "title": "Source of repayment (mode=search)",
            "uniqueItems": true,
            "type": "array",
            "description": "Restrict to one or more repayment sources.",
            "items": {
              "type": "string",
              "enum": [
                "Bond Proceeds",
                "Bond Proceeds;Bond Proceeds",
                "General Fund of Issuing Jurisdiction",
                "General Fund of Issuing Jurisdiction;Tax Increment;Tax Increment",
                "General Fund of Lessee",
                "Grants",
                "Intergovernmental Transfers (other than grants)",
                "Local Obligations",
                "Other Sources",
                "Private Obligor Payments",
                "Private Obligor Payments;Private Obligor Payments",
                "Private Obligor Payments;Private Obligor Payments;Private Obligor Payments",
                "Property Tax Revenues",
                "Property Tax Revenues;Property Tax Revenues",
                "Public Enterprise Revenues",
                "Sales Tax Revenues",
                "Special Assessments",
                "Special Tax Revenues",
                "Tax Increment",
                "Utility Project Charges"
              ],
              "enumTitles": [
                "Bond Proceeds",
                "Bond Proceeds;Bond Proceeds",
                "General Fund of Issuing Jurisdiction",
                "General Fund of Issuing Jurisdiction;Tax Increment;Tax Increment",
                "General Fund of Lessee",
                "Grants",
                "Intergovernmental Transfers (other than grants)",
                "Local Obligations",
                "Other Sources",
                "Private Obligor Payments",
                "Private Obligor Payments;Private Obligor Payments",
                "Private Obligor Payments;Private Obligor Payments;Private Obligor Payments",
                "Property Tax Revenues",
                "Property Tax Revenues;Property Tax Revenues",
                "Public Enterprise Revenues",
                "Sales Tax Revenues",
                "Special Assessments",
                "Special Tax Revenues",
                "Tax Increment",
                "Utility Project Charges"
              ]
            },
            "default": []
          },
          "taxStatuses": {
            "title": "Tax status (mode=search)",
            "uniqueItems": true,
            "type": "array",
            "description": "Restrict to one or more federal tax statuses.",
            "items": {
              "type": "string",
              "enum": [
                "Alternative Minimum Tax",
                "Both",
                "Federally Taxable",
                "Tax-Exempt"
              ],
              "enumTitles": [
                "Alternative Minimum Tax",
                "Both",
                "Federally Taxable",
                "Tax-Exempt"
              ]
            },
            "default": []
          },
          "soldStatus": {
            "title": "Sold status (mode=search)",
            "enum": [
              "",
              "Proposed",
              "Sold"
            ],
            "type": "string",
            "description": "Only proposed (not-yet-sold) or only completed (sold) issuances.",
            "default": ""
          },
          "saleType": {
            "title": "Sale type (mode=search)",
            "enum": [
              "",
              "Competitive",
              "Negotiated"
            ],
            "type": "string",
            "description": "Competitive vs. negotiated bond sale.",
            "default": ""
          },
          "interestType": {
            "title": "Interest type (mode=search)",
            "enum": [
              "",
              "N/A",
              "Net Interest Cost (NIC)",
              "Other Interest",
              "True Interest Cost (TIC)",
              "Variable Interest"
            ],
            "type": "string",
            "description": "Filter by interest-rate calculation method or variable-rate flag.",
            "default": ""
          },
          "enhancementType": {
            "title": "Credit enhancement type (mode=search)",
            "enum": [
              "",
              "Insurance",
              "Letter of Credit",
              "N/A",
              "None",
              "Other Enhancement Type",
              "State Intercept Program"
            ],
            "type": "string",
            "description": "Filter by type of credit enhancement on the debt.",
            "default": ""
          },
          "primaryPurposes": {
            "title": "Primary purpose (modes=search, melloRoos)",
            "uniqueItems": true,
            "type": "array",
            "description": "Restrict to one or more primary purposes for which the debt was issued (e.g. K-12 School Facility, Water Supply).",
            "items": {
              "type": "string",
              "enum": [
                "Airport",
                "Bridges and Highways",
                "Cash Flow, Interim Financing",
                "College, University Facility",
                "College, University Housing",
                "Commercial Development",
                "Commercial Energy Conservation Improvement",
                "Convention Center",
                "Equipment",
                "Fire, Police Protection/Emergency Medical",
                "Flood Control, Storm Drainage",
                "Health Care Facilities",
                "Hospital",
                "Human Resources",
                "Industrial Development",
                "Insurance and Pension Funds",
                "K-12 School Facility",
                "Medical Research/Institute",
                "Multifamily Housing",
                "Multiple Capital Improvements, Public Works",
                "Other Capital Improvements, Public Works",
                "Other Housing",
                "Other Purpose",
                "Other, Multiple Educational Uses (Equipment, etc.)",
                "Other, Multiple Health Care Purposes (Equipment, etc.)",
                "PACE Seismic Safety Improvements",
                "Parking",
                "Parks, Open Space",
                "Pollution Control",
                "Ports, Marinas",
                "Power Generation/Transmission",
                "Prisons, Jails, Correctional Facilities",
                "Project, Interim Financing",
                "Public Building",
                "Public Safety",
                "Public Transit",
                "Recreation and Sports Facilities",
                "Redevelopment, Multiple Purposes",
                "Residential Energy Conservation, Improvement",
                "Seismic Safety, Improvements, Repairs",
                "Settlement-Judgment Obligation",
                "Single-Family Housing",
                "Solid Waste Recovery Facilities",
                "Street Construction and Improvements",
                "Student Loans",
                "Theatre/Arts/Museums",
                "Wastewater Collection, Treatment",
                "Water Supply, Storage, Distribution"
              ],
              "enumTitles": [
                "Airport",
                "Bridges and Highways",
                "Cash Flow, Interim Financing",
                "College, University Facility",
                "College, University Housing",
                "Commercial Development",
                "Commercial Energy Conservation Improvement",
                "Convention Center",
                "Equipment",
                "Fire, Police Protection/Emergency Medical",
                "Flood Control, Storm Drainage",
                "Health Care Facilities",
                "Hospital",
                "Human Resources",
                "Industrial Development",
                "Insurance and Pension Funds",
                "K-12 School Facility",
                "Medical Research/Institute",
                "Multifamily Housing",
                "Multiple Capital Improvements, Public Works",
                "Other Capital Improvements, Public Works",
                "Other Housing",
                "Other Purpose",
                "Other, Multiple Educational Uses (Equipment, etc.)",
                "Other, Multiple Health Care Purposes (Equipment, etc.)",
                "PACE Seismic Safety Improvements",
                "Parking",
                "Parks, Open Space",
                "Pollution Control",
                "Ports, Marinas",
                "Power Generation/Transmission",
                "Prisons, Jails, Correctional Facilities",
                "Project, Interim Financing",
                "Public Building",
                "Public Safety",
                "Public Transit",
                "Recreation and Sports Facilities",
                "Redevelopment, Multiple Purposes",
                "Residential Energy Conservation, Improvement",
                "Seismic Safety, Improvements, Repairs",
                "Settlement-Judgment Obligation",
                "Single-Family Housing",
                "Solid Waste Recovery Facilities",
                "Street Construction and Improvements",
                "Student Loans",
                "Theatre/Arts/Museums",
                "Wastewater Collection, Treatment",
                "Water Supply, Storage, Distribution"
              ]
            },
            "default": []
          },
          "labeledDebtTypes": {
            "title": "Labeled debt type / ESG label (mode=search)",
            "uniqueItems": true,
            "type": "array",
            "description": "Restrict to one or more sustainability/ESG debt labels (e.g. Green bonds, Social Impact bonds).",
            "items": {
              "type": "string",
              "enum": [
                "Green",
                "Green;Sustainability",
                "None",
                "Social Impact",
                "Sustainability"
              ],
              "enumTitles": [
                "Green",
                "Green + Sustainability",
                "None",
                "Social Impact",
                "Sustainability"
              ]
            },
            "default": []
          },
          "adtrFilingStatuses": {
            "title": "ADTR filing status (mode=search)",
            "uniqueItems": true,
            "type": "array",
            "description": "Restrict to one or more Annual Debt Transparency Report filing statuses.",
            "items": {
              "type": "string",
              "enum": [
                "Ended",
                "Filed",
                "N/A",
                "Past Due",
                "Pending"
              ],
              "enumTitles": [
                "Ended",
                "Filed",
                "Not applicable (N/A)",
                "Past Due",
                "Pending"
              ]
            },
            "default": []
          },
          "localDebtPolicies": {
            "title": "Local debt policy on file (mode=search)",
            "uniqueItems": true,
            "type": "array",
            "description": "Restrict to issuances where the issuer does/doesn't have a local debt policy on file (SB 1029 requirement).",
            "items": {
              "type": "string",
              "enum": [
                "(none)",
                "N/A",
                "No",
                "Yes"
              ],
              "enumTitles": [
                "(none)",
                "Not applicable (N/A)",
                "No",
                "Yes"
              ]
            },
            "default": []
          },
          "agencyTypes": {
            "title": "Agency type (mode=melloRoos)",
            "uniqueItems": true,
            "type": "array",
            "description": "Restrict Mello-Roos CFD annual reports to one or more agency (issuer) types.",
            "items": {
              "type": "string",
              "enum": [
                "City / County Government",
                "City Government",
                "Community Services District",
                "County Government",
                "County Water District",
                "Fire Protection District",
                "Flood Control, Water Conservation District",
                "Joint Powers Agency",
                "K-12 School District",
                "Library District",
                "Municipal Water District",
                "Park & Recreation District",
                "Public Utility District",
                "Redevelopment Agency",
                "Sanitation District",
                "Special District",
                "Successor Agency",
                "Water District"
              ],
              "enumTitles": [
                "City / County Government",
                "City Government",
                "Community Services District",
                "County Government",
                "County Water District",
                "Fire Protection District",
                "Flood Control, Water Conservation District",
                "Joint Powers Agency",
                "K-12 School District",
                "Library District",
                "Municipal Water District",
                "Park & Recreation District",
                "Public Utility District",
                "Redevelopment Agency",
                "Sanitation District",
                "Special District",
                "Successor Agency",
                "Water District"
              ]
            },
            "default": []
          },
          "assessmentTypes": {
            "title": "Assessment type (mode=melloRoos)",
            "uniqueItems": true,
            "type": "array",
            "description": "Restrict Mello-Roos CFD annual reports to one or more property assessment methods.",
            "items": {
              "type": "string",
              "enum": [
                "(none)",
                "Appraisal of Property",
                "Equalized Tax Roll"
              ],
              "enumTitles": [
                "(none)",
                "Appraisal of Property",
                "Equalized Tax Roll"
              ]
            },
            "default": []
          },
          "financePurposes": {
            "title": "Finance purpose (mode=elections)",
            "uniqueItems": true,
            "type": "array",
            "description": "Restrict ballot measure elections to one or more financed purposes.",
            "items": {
              "type": "string",
              "enum": [
                "(none)",
                "Airport",
                "Bridges and Highways",
                "College, University Facility",
                "College, University Housing",
                "Convention Center",
                "Fire, Police Protection/Emergency Medical",
                "Flood Control, Storm Drainage",
                "General Government",
                "Health Care Facilities",
                "Hospital",
                "K-12 School Facility",
                "Medical Research/Institute",
                "Multifamily Housing",
                "Multiple Capital Improvements, Public Works",
                "Other Capital Improvements, Public Works",
                "Other Housing",
                "Other Purpose",
                "Other, Multiple Educational Uses (Equipment, etc.)",
                "Other, Multiple Health Care Purposes (Equipment, etc.)",
                "Parking",
                "Parks, Open Space",
                "Ports, Marinas",
                "Power Generation/Transmission",
                "Prisons, Jails, Correctional Facilities",
                "Public Building",
                "Public Safety",
                "Public Transit",
                "Public transit (OLD)",
                "Recreation and Sports Facilities",
                "Redevelopment, Multiple Purposes",
                "Residential Energy Conservation, Improvement",
                "Seismic Safety, Improvements, Repairs",
                "Single-Family Housing",
                "Solid Waste Recovery Facilities",
                "Special Tax Fees/Levy",
                "Street Construction and Improvements",
                "Theatre/Arts/Museums",
                "Wastewater Collection, Treatment",
                "Water Supply, Storage, Distribution"
              ],
              "enumTitles": [
                "(none)",
                "Airport",
                "Bridges and Highways",
                "College, University Facility",
                "College, University Housing",
                "Convention Center",
                "Fire, Police Protection/Emergency Medical",
                "Flood Control, Storm Drainage",
                "General Government",
                "Health Care Facilities",
                "Hospital",
                "K-12 School Facility",
                "Medical Research/Institute",
                "Multifamily Housing",
                "Multiple Capital Improvements, Public Works",
                "Other Capital Improvements, Public Works",
                "Other Housing",
                "Other Purpose",
                "Other, Multiple Educational Uses (Equipment, etc.)",
                "Other, Multiple Health Care Purposes (Equipment, etc.)",
                "Parking",
                "Parks, Open Space",
                "Ports, Marinas",
                "Power Generation/Transmission",
                "Prisons, Jails, Correctional Facilities",
                "Public Building",
                "Public Safety",
                "Public Transit",
                "Public transit (OLD)",
                "Recreation and Sports Facilities",
                "Redevelopment, Multiple Purposes",
                "Residential Energy Conservation, Improvement",
                "Seismic Safety, Improvements, Repairs",
                "Single-Family Housing",
                "Solid Waste Recovery Facilities",
                "Special Tax Fees/Levy",
                "Street Construction and Improvements",
                "Theatre/Arts/Museums",
                "Wastewater Collection, Treatment",
                "Water Supply, Storage, Distribution"
              ]
            },
            "default": []
          },
          "approvalThresholds": {
            "title": "Approval threshold (mode=elections)",
            "uniqueItems": true,
            "type": "array",
            "description": "Restrict ballot measure elections to one or more required-vote-margin thresholds.",
            "items": {
              "type": "string",
              "enum": [
                "55%",
                "Majority",
                "Two-thirds"
              ],
              "enumTitles": [
                "55%",
                "Majority (50%+1)",
                "Two-thirds (66.7%)"
              ]
            },
            "default": []
          },
          "retiredStatuses": {
            "title": "Retired status (mode=melloRoos)",
            "uniqueItems": true,
            "type": "array",
            "description": "Restrict Mello-Roos CFD annual reports to one or more bond retirement statuses.",
            "items": {
              "type": "string",
              "enum": [
                "(none)",
                "Matured",
                "Redeemed",
                "Other"
              ],
              "enumTitles": [
                "Active (not yet retired)",
                "Matured",
                "Redeemed",
                "Other"
              ]
            },
            "default": []
          },
          "issuerCounties": {
            "title": "Issuer county (modes=search, defaults, melloRoos)",
            "uniqueItems": true,
            "type": "array",
            "description": "Restrict to one or more California counties (based on issuer location).",
            "items": {
              "type": "string",
              "enum": [
                "Alameda",
                "Alpine",
                "Amador",
                "Butte",
                "Calaveras",
                "Colusa",
                "Contra Costa",
                "Del Norte",
                "El Dorado",
                "Fresno",
                "Glenn",
                "Humboldt",
                "Imperial",
                "Inyo",
                "Kern",
                "Kings",
                "Lake",
                "Lassen",
                "Los Angeles",
                "Madera",
                "Marin",
                "Mariposa",
                "Mendocino",
                "Merced",
                "Modoc",
                "Mono",
                "Monterey",
                "Napa",
                "Nevada",
                "Orange",
                "Placer",
                "Plumas",
                "Riverside",
                "Sacramento",
                "San Benito",
                "San Bernardino",
                "San Diego",
                "San Francisco",
                "San Joaquin",
                "San Luis Obispo",
                "San Mateo",
                "Santa Barbara",
                "Santa Clara",
                "Santa Cruz",
                "Shasta",
                "Sierra",
                "Siskiyou",
                "Solano",
                "Sonoma",
                "Stanislaus",
                "State of California",
                "Sutter",
                "Tehama",
                "Trinity",
                "Tulare",
                "Tuolumne",
                "Ventura",
                "Yolo",
                "Yuba"
              ],
              "enumTitles": [
                "Alameda",
                "Alpine",
                "Amador",
                "Butte",
                "Calaveras",
                "Colusa",
                "Contra Costa",
                "Del Norte",
                "El Dorado",
                "Fresno",
                "Glenn",
                "Humboldt",
                "Imperial",
                "Inyo",
                "Kern",
                "Kings",
                "Lake",
                "Lassen",
                "Los Angeles",
                "Madera",
                "Marin",
                "Mariposa",
                "Mendocino",
                "Merced",
                "Modoc",
                "Mono",
                "Monterey",
                "Napa",
                "Nevada",
                "Orange",
                "Placer",
                "Plumas",
                "Riverside",
                "Sacramento",
                "San Benito",
                "San Bernardino",
                "San Diego",
                "San Francisco",
                "San Joaquin",
                "San Luis Obispo",
                "San Mateo",
                "Santa Barbara",
                "Santa Clara",
                "Santa Cruz",
                "Shasta",
                "Sierra",
                "Siskiyou",
                "Solano",
                "Sonoma",
                "Stanislaus",
                "State of California",
                "Sutter",
                "Tehama",
                "Trinity",
                "Tulare",
                "Tuolumne",
                "Ventura",
                "Yolo",
                "Yuba"
              ]
            },
            "default": []
          },
          "documentTypes": {
            "title": "Document type (mode=documents)",
            "uniqueItems": true,
            "type": "array",
            "description": "Restrict to one or more disclosure document types.",
            "items": {
              "type": "string",
              "enum": [
                "Assignment Agreement",
                "Bond Counsel Opinion",
                "Bond Issuance Agreement",
                "Bond Purchase Contract",
                "Bond Specimen",
                "Borrower Agreement",
                "Debt Service Schedule",
                "Defeasance Notice",
                "Delinquent Parcel Detail Report",
                "Escrow Agreement",
                "Event Disclosure Notice",
                "Fiscal Agent Agreement",
                "Indenture",
                "Installment Purchase Agreement",
                "Installment Sales Agreement",
                "Issuance Certificate",
                "Issuance Document Portfolio",
                "Lease Agreement",
                "Lease Purchase Agreement",
                "Letter of Credit",
                "Loan Agreement",
                "Master Agency Agreement",
                "Master Agreement",
                "Master Loan Agreement",
                "Master Pledge and Assignment Agreement",
                "Maturity Schedule",
                "Maturity-Debt Service Schedule",
                "Offering Memorandum",
                "Offering Private Placement Memorandum",
                "Official Statement",
                "Other",
                "Other Agreements",
                "Other Leases",
                "Other Notes",
                "Paying Agent Agreement",
                "Placement Agent Agreement",
                "Promissory Note",
                "Redemption Notice",
                "Regulatory Agreement and Declaration of Restrictive Covenants",
                "Resolution",
                "Revolving Credit Agreement",
                "Supplement to Loan Agreement",
                "Supplement to OS",
                "Supplemental Indenture",
                "Tax Certificate",
                "Trust Agreement"
              ],
              "enumTitles": [
                "Assignment Agreement",
                "Bond Counsel Opinion",
                "Bond Issuance Agreement",
                "Bond Purchase Contract",
                "Bond Specimen",
                "Borrower Agreement",
                "Debt Service Schedule",
                "Defeasance Notice",
                "Delinquent Parcel Detail Report",
                "Escrow Agreement",
                "Event Disclosure Notice",
                "Fiscal Agent Agreement",
                "Indenture",
                "Installment Purchase Agreement",
                "Installment Sales Agreement",
                "Issuance Certificate",
                "Issuance Document Portfolio",
                "Lease Agreement",
                "Lease Purchase Agreement",
                "Letter of Credit",
                "Loan Agreement",
                "Master Agency Agreement",
                "Master Agreement",
                "Master Loan Agreement",
                "Master Pledge and Assignment Agreement",
                "Maturity Schedule",
                "Maturity-Debt Service Schedule",
                "Offering Memorandum",
                "Offering Private Placement Memorandum",
                "Official Statement",
                "Other",
                "Other Agreements",
                "Other Leases",
                "Other Notes",
                "Paying Agent Agreement",
                "Placement Agent Agreement",
                "Promissory Note",
                "Redemption Notice",
                "Regulatory Agreement and Declaration of Restrictive Covenants",
                "Resolution",
                "Revolving Credit Agreement",
                "Supplement to Loan Agreement",
                "Supplement to OS",
                "Supplemental Indenture",
                "Tax Certificate",
                "Trust Agreement"
              ]
            },
            "default": []
          },
          "typeOfEvent": {
            "title": "Event type (mode=defaults)",
            "enum": [
              "",
              "Default",
              "Draw on Reserve",
              "Replenishment of Reserve"
            ],
            "type": "string",
            "description": "Filter default/distress events by type.",
            "default": ""
          },
          "electionTypes": {
            "title": "Election type (mode=elections)",
            "uniqueItems": true,
            "type": "array",
            "description": "Restrict to one or more election types.",
            "items": {
              "type": "string",
              "enum": [
                "General",
                "Local",
                "Primary"
              ],
              "enumTitles": [
                "General",
                "Local",
                "Primary"
              ]
            },
            "default": []
          },
          "electionResults": {
            "title": "Election result (mode=elections)",
            "uniqueItems": true,
            "type": "array",
            "description": "Restrict to one or more vote outcomes.",
            "items": {
              "type": "string",
              "enum": [
                "Pass",
                "Fail"
              ],
              "enumTitles": [
                "Pass",
                "Fail"
              ]
            },
            "default": []
          },
          "typeOfTaxOrDebt": {
            "title": "Type of tax/debt on ballot (mode=elections)",
            "uniqueItems": true,
            "type": "array",
            "description": "Restrict to one or more measure types (tax or debt instrument the ballot measure authorizes).",
            "items": {
              "type": "string",
              "enum": [
                "Certificate of Participation/Leases",
                "Conduit Revenue Bond",
                "General Obligation Bond",
                "Limited Tax Obligation Bond (Special Tax Bonds)",
                "Other Bond",
                "Other Debt",
                "Public Enterprise Revenue Bond",
                "Public Lease Revenue Bond",
                "Revenue Bond (Pool)",
                "Sales Tax Election",
                "Sales Tax Revenue Bond",
                "Special Assessment Bond",
                "Tax (Levy, Parcel, Sales, Fee)",
                "Tax Allocation Bond"
              ],
              "enumTitles": [
                "Certificate of Participation/Leases",
                "Conduit Revenue Bond",
                "General Obligation Bond",
                "Limited Tax Obligation Bond (Special Tax Bonds)",
                "Other Bond",
                "Other Debt",
                "Public Enterprise Revenue Bond",
                "Public Lease Revenue Bond",
                "Revenue Bond (Pool)",
                "Sales Tax Election",
                "Sales Tax Revenue Bond",
                "Special Assessment Bond",
                "Tax (Levy, Parcel, Sales, Fee)",
                "Tax Allocation Bond"
              ]
            },
            "default": []
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "date",
              "amount",
              "issuer"
            ],
            "type": "string",
            "description": "Sort field (mapped per mode: date=SaleDate/EventDate/ElectionDate, amount=PrincipalAmount/EventAmount (falls back to ElectionDate for mode=elections, which has no amount field), issuer=Issuer/Agency name).",
            "default": "date"
          },
          "sortDirection": {
            "title": "Sort direction",
            "enum": [
              "desc",
              "asc"
            ],
            "type": "string",
            "description": "Ascending or descending sort order.",
            "default": "desc"
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Hard cap on emitted records.",
            "default": 50
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}