The regulation library, in your software.

The same verbatim library our MCP server gives AI assistants, over plain HTTPS with an API key. Federal regulations and statutes, the FHA, VA and USDA handbooks, the Fannie Mae, Freddie Mac and Ginnie Mae guides and SBA lending rules, each answer quoting the regulator’s exact words with the section citation, the source and whether a newer or optional version applies.

Request an API key · OpenAPI 3.1 file · API terms

Building for a person in a chat, not a program? Use the MCP server instead: it is free, needs no key, and connects to Claude, ChatGPT, Copilot, Cursor and other assistants in a minute.

Who it’s for

Quickstart

  1. Request a key. We send it once; keep it secret, and store it as an environment variable such as C4C_API_KEY.
  2. Send every request with Authorization: Bearer <your key>.
  3. Call a tool: POST https://mcp.claudeforcompliance.com/v1/tools/<tool name> with the tool’s arguments as a JSON object.

curl

curl -s https://mcp.claudeforcompliance.com/v1/tools/search_regs \
  -H "Authorization: Bearer $C4C_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query": "FHA debt-to-income ratio", "limit": 3}'

Python

import os, requests

BASE = "https://mcp.claudeforcompliance.com/v1/tools"
HEADERS = {"Authorization": f"Bearer {os.environ['C4C_API_KEY']}"}

def call(tool, **args):
    r = requests.post(f"{BASE}/{tool}", json=args, headers=HEADERS, timeout=30)
    r.raise_for_status()
    body = r.json()
    if body["is_error"]:
        raise RuntimeError(body["result"].get("text"))
    return body["result"]

hits = call("search_regs", query="FHA debt-to-income ratio", limit=3)
top = hits["results"][0]
print(top["canonical_citation"], top["page_url"])

section = call("get_obligation", obligation_id=top["obligation_id"])
print(section["notice"])

JavaScript (Node 18+)

const BASE = "https://mcp.claudeforcompliance.com/v1/tools";

async function call(tool, args = {}) {
  const r = await fetch(`${BASE}/${tool}`, {
    method: "POST",
    headers: {
      Authorization: `Bearer ${process.env.C4C_API_KEY}`,
      "Content-Type": "application/json",
    },
    body: JSON.stringify(args),
  });
  const body = await r.json();
  if (!r.ok) throw new Error(`${body.error.code}: ${body.error.message}`);
  if (body.is_error) throw new Error(body.result.text);
  return body.result;
}

const hits = await call("search_regs", { query: "FHA debt-to-income ratio", limit: 3 });
console.log(hits.results[0].canonical_citation);

Responses

Every successful call returns HTTP 200 with tool, is_error and result. result holds the tool’s structured answer, described for each tool in the OpenAPI file.

When the tool finds nothing for what you asked (for example, no section has that ID), the call still succeeds: result.error names the reason, such as "not_found", and result.hint says what to try instead. Check for result.error before reading other fields. is_error is true only when the tool itself failed; then result.text explains why.

A search result, trimmed:

{
  "tool": "search_regs",
  "is_error": false,
  "result": {
    "results": [
      {
        "section": "FHA Single Family Housing Policy Handbook 4000.1, Part II — d. Final Underwriting Decision (Manual) (08/19/2024)",
        "register_id": "hud-4000-1-ii-d-final-underwriting-decision-manual",
        "obligation_id": "hud-4000-1-ii-d-final-underwriting-decision-manual::hud-4000-1-ii-d-final-underwriting-decision-manual-full",
        "canonical_citation": "4000.1 II.A.5.d",
        "operative_text": "For all transactions, except non-credit qualifying Streamline Refinances, the underwriter must calculate the Borrower’s Total Mortgage Payment to Effective Income Ratio (PTI) and the Total Fixed Payment to Effective Income ratio, or DTI, ...",
        "version": "in-force",
        "other_version": "hud-4000-1-ii-d-final-underwriting-decision-manual::hud-4000-1-ii-d-final-underwriting-decision-manual-full::update-18",
        "currency": {
          "kind": "dual-version",
          "headline": "Two versions apply: in force by default since 2024-08-19; the Update 18 revision is optional now and mandatory 2026-11-10; both are served"
        },
        "page_url": "https://claudeforcompliance.com/regs/hud-4000-1-ii-d-final-underwriting-decision-manual/#hud-4000-1-ii-d-final-underwriting-decision-manual-full",
        "source_url": "https://www.hud.gov/hud-partners/single-family-handbook-4000-1",
        "family": "hud",
        "chars_total": 23826
      }
    ],
    "notice": "For research purposes only. Information provided as-is; not legal advice. Verify against the primary source. Terms: https://claudeforcompliance.com/terms/"
  }
}

Fields worth knowing: operative_text is the regulator’s verbatim text ([...] marks omitted passages); canonical_citation is the citation in the regulator’s own style; currency says whether the text is superseded, pending, or has a newer optional version, with other_version pointing to it; page_url links to the section on our site and source_url to the regulator.

Tools

ToolRequiredOptionalWhat it does
search_regsqueryfamily, limit, currency_kindFinds sections by topic, plain-language question or regulator wording. Returns ranked sections with the verbatim text of the matching passages.
get_obligationobligation_idoffset, limit, compare_versionsReturns one section’s full verbatim text with its citation, source and currency status. Long sections page in 24,000-character steps.
find_in_sectionobligation_id, termsmax_passagesReturns only the paragraphs of a section that contain your terms, with the heading path above each one.
get_regregister_id–Returns a whole regulation or guide chapter: its sections, effective date and status.
lookup_citationcitation–Resolves a citation such as “12 CFR 1026.43(c)”, “B3-6-02” or “4000.1 II.A.5.d” to the section that holds it.
verify_quotetextregister_idChecks whether a passage is the regulator’s exact wording, and reports if it comes from a superseded or optional version.
list_playbooks––Lists the compliance playbooks (Fannie Mae LL-2026-04 policy review; FHA, VA and USDA loan-file QC).
start_playbookid–Returns a playbook’s instructions for an AI agent to follow. Your documents never go to the API.
get_playbook_referenceid, name–Returns one reference file a playbook calls for.
get_playbook_kitidoffsetReturns a playbook’s full kit in pages.

GET /v1/tools returns the same list with each tool’s full JSON Schema. GET /v1/openapi.json needs no key and works with code generators, Postman, Copilot connectors and custom GPT actions.

Errors

Errors use one shape: {"error": {"code": "...", "message": "..."}}

StatusCodeMeaning
400invalid_json, invalid_argumentsThe body is not JSON, not an object, or the tool rejected the arguments (the message names the field).
401missing_key, invalid_keyNo Authorization header, or the key is not recognized.
403revoked_keyThe key was revoked. Ask us for a new one.
404unknown_tool, not_foundNo such tool or path.
405method_not_allowedUse POST for tools, GET for /v1/tools and /v1/openapi.json.
413payload_too_largeRequest bodies are limited to 64 KB.
429daily_limitThe key reached its daily limit. Retry-After gives the seconds until 00:00 UTC.
503unavailableTemporary problem checking keys. Retry after the seconds in Retry-After.

Keys, limits and data

Plans and support

Trial keys are available for evaluation. For pricing, higher limits, or running the library inside your own network, email [email protected]. Use of the API is subject to the API terms and our terms of use.