{
  "openapi": "3.1.0",
  "info": {
    "title": "ToolMint IRS Nonprofit",
    "version": "0.1.0",
    "description": "IRS exempt-organization status as agent JSON. Pay per call with USDC on Base via x402. From the IRS's own public bulk files (EO Business Master File, Publication 78 data, Automatic Revocation list), which the IRS refreshes about monthly; dataAsOf says which build answered. Not an IRS product and not legal or tax advice. Before relying on a deductibility or exemption answer, confirm on IRS Tax Exempt Organization Search (links.irsTeos). ToolMint is not affiliated with the IRS.",
    "x-guidance": "GET /ein?ein=NN-NNNNNNN returns verdict (deductible_501c3, deductible_other, deductible_pub78, exempt_not_deductible, revoked, no_irs_exempt_record), deductible and exempt booleans, warnings, BMF details (subsection, foundation type, ruling date, latest filing revenue/assets, NTEE), Pub 78 listing and revocation history. GET /batch?eins= does up to 25. GET /search?name=&state= finds EINs by name in one state. Unpaid calls get 402 (USDC on Base). Bad input is 400 before payment. Confirm high-stakes answers on IRS TEOS (links.irsTeos).",
    "contact": {
      "email": "toolmint.dev@gmail.com",
      "name": "ToolMint"
    }
  },
  "paths": {
    "/health": {
      "get": {
        "operationId": "health",
        "summary": "Liveness",
        "security": [],
        "responses": {
          "200": {
            "description": "ok"
          }
        }
      }
    },
    "/ein": {
      "get": {
        "operationId": "irs_nonprofit_ein",
        "summary": "Exempt status + deductibility for one EIN",
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.005000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ],
          "network": "eip155:8453",
          "payTo": "0xfbF7413bcB3a604936775C96FDbe0b0C9c9E37F5",
          "asset": "USDC",
          "scheme": "exact",
          "amountAtomic": "5000"
        },
        "parameters": [
          {
            "name": "ein",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^\\d{2}-?\\d{7}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Verdict JSON"
          },
          "400": {
            "description": "Bad input (no charge; rejected before payment)"
          },
          "402": {
            "description": "Payment Required"
          },
          "500": {
            "description": "Data error (not charged)"
          }
        }
      }
    },
    "/batch": {
      "get": {
        "operationId": "irs_nonprofit_batch",
        "summary": "Up to 25 EINs",
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.030000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ],
          "network": "eip155:8453",
          "payTo": "0xfbF7413bcB3a604936775C96FDbe0b0C9c9E37F5",
          "asset": "USDC",
          "scheme": "exact",
          "amountAtomic": "30000"
        },
        "parameters": [
          {
            "name": "eins",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Verdicts JSON"
          },
          "400": {
            "description": "Bad input (no charge; rejected before payment)"
          },
          "402": {
            "description": "Payment Required"
          },
          "500": {
            "description": "Data error (not charged)"
          }
        }
      }
    },
    "/search": {
      "get": {
        "operationId": "irs_nonprofit_search",
        "summary": "Find EINs by name within a state",
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.005000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ],
          "network": "eip155:8453",
          "payTo": "0xfbF7413bcB3a604936775C96FDbe0b0C9c9E37F5",
          "asset": "USDC",
          "scheme": "exact",
          "amountAtomic": "5000"
        },
        "parameters": [
          {
            "name": "name",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 3,
              "maxLength": 100
            }
          },
          {
            "name": "state",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z]{2}$"
            }
          },
          {
            "name": "city",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 60
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 25,
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Matches JSON"
          },
          "400": {
            "description": "Bad input (no charge; rejected before payment)"
          },
          "402": {
            "description": "Payment Required"
          },
          "500": {
            "description": "Data error (not charged)"
          }
        }
      }
    }
  }
}