{"openapi":"3.1.0","info":{"title":"Bills & eCFR Section Lookup API","version":"1.0.0","description":"Look up 119th Congress bill status, UK Parliament bill status, and eCFR section text for titles 16, 17 and 29 from vendored official public bulk data. Paid with x402 exact USDC on Base. No account is required.","contact":{"email":"support@brainiac.software"},"x-guidance":"BRAINIAC.software is a pay-per-call API for software agents. No account or API key is required.\nPayment uses x402 with exact USDC on Base (8453). Each paid resource accepts POST for the call; unpaid GET/HEAD return the same 402 payment challenge for discovery.\nHow to call an operation:\n1. POST JSON matching the requestBody. An unpaid POST (including empty body) returns 402 payment terms before body validation.\n2. Compare 402 payTo, asset, and network with /api/v1/catalog and /.well-known/x402 — not only with the 402 itself.\n3. Pay and retry with payment-signature. Invalid JSON/schema after payment-signature returns 400 and is not charged. Settlement (a charge) only on 2xx. payment-signature attached ≠ charged.\nIdempotency-Key: 64 hex chars from 32 random bytes. Reuse only for the same operation and body (replays stored response, including status=partial). A new key runs a fresh call.\nIdempotency after errors: unpaid 402 does not store the key. Post-signature 402/503 release it (retry same key). Pre-reserve schema 400 does not store it. Other post-signature responses (2xx/4xx/5xx) are stored: same key+body replays; different body → 409. Stored 4xx/5xx replays are not a second charge. Prefer a new key after fixing a 4xx; after 5xx reuse the same key only for the stored error.\nPost-signature 402/503 include prior-payment-attempt (nonce, settled false|unknown). A facilitator 502 is SETTLEMENT_UNKNOWN (stored under the Idempotency-Key; cross-instance replay needs the shared store; may already be charged) — check USDC authorizationState(payer, nonce) on Base before re-signing.\nSettlement signal: settled 2xx include payment-response. 4xx/5xx do not. Do not book a cost from payment-signature alone.\nCoverage billing: HTTP 200 with status complete, partial, or failed is charged at the full listed price. Retrying missing checks needs a new settled call. 4xx/5xx are not charged.\nmissing_items.reason: timeout/rate_limited → one delayed retry (new key); upstream_down → after recovery; not_supported → never.\nInvariants: any missing_items ⇒ not status complete; sources[] is provenance only (source, url, retrievedAt), never success/error keyed by check.\nFree lookup: GET /api/v1/results/{result_id} returns stored coverage JSON (404 RESULT_NOT_FOUND if unknown/expired; not a 402). Prior-Result-Id sets replaces_result_id.\nOutputs are prechecks/drafts for human review — not official determinations, legal advice, or certified filings."},"servers":[{"url":"https://www.brainiac.software"}],"paths":{"/api/v1/legislative-intelligence/congress-bill-status":{"post":{"operationId":"look_up_us_congress_bill_status_119th","summary":"Look up US Congress bill status (119th)","description":"Return status, titles, sponsor, committees, latest action and public law for a bill or resolution of the 119th Congress from the vendored GPO BILLSTATUS extract.","tags":["legislative-intelligence"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"congress":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"billType":{"type":"string","enum":["hr","s","hjres","sjres","hres","sres","hconres","sconres"]},"number":{"type":"integer","minimum":1,"maximum":9007199254740991},"query":{"type":"string","minLength":3,"maxLength":200},"limit":{"default":10,"type":"integer","minimum":1,"maximum":50}},"required":["congress"],"additionalProperties":false},"example":{"congress":119,"billType":"hr","number":1}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Fresh random 32-byte value encoded as 64 hexadecimal characters. Reuse unchanged only for retries of the same operation and request.","schema":{"type":"string","pattern":"^[0-9a-fA-F]{64}$"}}],"responses":{"200":{"description":"Illustrative endpoint-specific JSON response shape. For coverage operations, HTTP 200 is used for status complete, partial, and failed; all three settle and are charged at the full listed price. A settled 2xx includes a payment-response response header (facilitator settlement receipt; may include a transaction reference). Conditional fields depend on the result and data-source availability.","headers":{"payment-response":{"description":"Present on settled 2xx only. Facilitator settlement receipt for the x402 payment (not present on 4xx/5xx, which are not charged).","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"found":{"type":"boolean"},"bill":{"type":"object","properties":{"congress":{"type":"number"},"type":{"type":"string"},"number":{"type":"number"},"introducedDate":{"type":"string"},"originChamber":{"type":"string"},"title":{"type":"string"},"shortTitles":{"type":"array","items":{"type":"string"}},"popularTitle":{"type":"string"},"sponsors":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"bioguideId":{"type":"string"},"party":{"type":"string"},"state":{"type":"string"}},"additionalProperties":true}},"cosponsorCount":{"type":"number"},"policyArea":{"type":"string"},"committees":{"type":"array","items":{"type":"string"}},"latestAction":{"type":"object","properties":{"date":{"type":"string"},"text":{"type":"string"}},"additionalProperties":true},"laws":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"number":{"type":"string"}},"additionalProperties":true}},"updateDate":{"type":"string"},"congressGovUrl":{"type":"string"}},"additionalProperties":true},"sources":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"url":{"type":"string"},"retrievedAt":{"type":"string"},"status":{"type":"string"}},"additionalProperties":true},"description":"Provenance only (source, url, retrievedAt). Not keyed by check id and does not carry success or error. A check in missing_items does not remove its upstream from sources[]; unavailability is only in missing_items (and unavailable findings)."},"limitations":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"example":{"found":true,"bill":{"congress":119,"type":"HR","number":1,"introducedDate":"2025-05-20","originChamber":"House","title":"An act to provide for reconciliation pursuant to title II of H. Con. Res. 14.","shortTitles":["FEHB Protection Act of 2025","One Big Beautiful Bill Act"],"popularTitle":"One Big Beautiful Bill Act","sponsors":[{"name":"Rep. Arrington, Jodey C. [R-TX-19]","bioguideId":"A000375","party":"R","state":"TX"}],"cosponsorCount":0,"policyArea":"Economics and Public Finance","committees":["Budget Committee"],"latestAction":{"date":"2025-07-04","text":"Became Public Law No: 119-21."},"laws":[{"type":"Public Law","number":"119-21"}],"updateDate":"2026-05-08T14:41:30Z","congressGovUrl":"https://www.congress.gov/bill/119th-congress/house-bill/1"},"sources":[{"source":"GPO BILLSTATUS XML, 119th Congress (US Government work)","url":"https://www.govinfo.gov/bulkdata/BILLSTATUS/119","retrievedAt":"2026-11-15","status":"ok"}],"limitations":["Status reflects the vendored BILLSTATUS refresh date, not a live congress.gov request.","Amendments are not separate records.","…"]}}}},"400":{"description":"Invalid JSON or request schema. Not charged (no payment-response). If this 400 is returned before the Idempotency-Key is reserved, the key is not stored — fix the body and you may reuse the key. If an operation-path 400 was stored after a payment-signature was attached, the same key + same body replays it; the same key + a different body returns 409."},"402":{"description":"Payment required. The JSON body is the x402 PaymentRequired object. An unpaid 402 does not store the Idempotency-Key. A 402 after payment-signature releases the key and includes prior-payment-attempt (nonce, settled false|unknown). Not charged; no payment-response. Before re-signing after a post-signature 402, check USDC authorizationState(payer, nonce) on Base."},"409":{"description":"Idempotency conflict, in-progress payment, or expired result cache. Same key with a different body after a stored result returns conflict. Reusing the key cannot trigger a second charge. Not charged when settlement did not occur."},"413":{"description":"Request body exceeds the 24 MB limit. Not charged."},"500":{"description":"Operation failed before settlement, so no payment is taken (no payment-response). The error is stored: reuse the same Idempotency-Key and body to retrieve it without paying again. Use a new key for a fresh attempt with a new payment-signature."},"502":{"description":"Facilitator verify/settle transport failure (often timeout). After payment-signature this is returned as SETTLEMENT_UNKNOWN with prior-payment-attempt; the outcome is stored under the Idempotency-Key. With the shared store configured, other instances replay it instead of settling again; without it, each instance keeps its own memory. The authorization may already be settled on-chain — do not re-sign until USDC authorizationState(payer, nonce) on Base is false."},"503":{"description":"Payment or retry-safe result storage is unavailable; the operation is not run. Not charged; no payment-response. A 503 after payment-signature releases the Idempotency-Key and includes prior-payment-attempt."}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.03"},"protocols":[{"x402":{"facilitator":"https://api.cdp.coinbase.com/platform/v2/x402"}}],"facilitator":"https://api.cdp.coinbase.com/platform/v2/x402"}}},"/api/v1/legislative-intelligence/uk-parliament-bill-status":{"post":{"operationId":"look_up_uk_parliament_bill_status","summary":"Look up UK Parliament bill status","description":"Return the current stage and outcome of a UK Parliament bill from the vendored Bills API export.","tags":["legislative-intelligence"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","anyOf":[{"type":"object","properties":{"billId":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["billId"],"additionalProperties":false},{"type":"object","properties":{"query":{"type":"string","minLength":3,"maxLength":200},"sessionId":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"limit":{"default":10,"type":"integer","minimum":1,"maximum":50}},"required":["query"],"additionalProperties":false}]},"example":{"billId":3737}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Fresh random 32-byte value encoded as 64 hexadecimal characters. Reuse unchanged only for retries of the same operation and request.","schema":{"type":"string","pattern":"^[0-9a-fA-F]{64}$"}}],"responses":{"200":{"description":"Illustrative endpoint-specific JSON response shape. For coverage operations, HTTP 200 is used for status complete, partial, and failed; all three settle and are charged at the full listed price. A settled 2xx includes a payment-response response header (facilitator settlement receipt; may include a transaction reference). Conditional fields depend on the result and data-source availability.","headers":{"payment-response":{"description":"Present on settled 2xx only. Facilitator settlement receipt for the x402 payment (not present on 4xx/5xx, which are not charged).","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"found":{"type":"boolean"},"results":{"type":"array","items":{"type":"object","properties":{"billId":{"type":"number"},"status":{"type":"string"},"shortTitle":{"type":"string"},"formerShortTitle":{"type":"null"},"longTitle":{"type":"string"},"originatingHouse":{"type":"string"},"currentHouse":{"type":"string"},"currentStage":{"type":"object","properties":{"description":{"type":"string"},"house":{"type":"string"},"lastSittingDate":{"type":"string"}},"additionalProperties":true},"isAct":{"type":"boolean"},"isDefeated":{"type":"boolean"},"withdrawnDate":{"type":"null"},"introducedSessionId":{"type":"number"},"includedSessionIds":{"type":"array","items":{"type":"number"}},"sponsors":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"party":{"type":"string"}},"additionalProperties":true}},"lastUpdate":{"type":"string"},"url":{"type":"string"}},"additionalProperties":true}},"exportedAt":{"type":"string"},"sources":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"url":{"type":"string"},"retrievedAt":{"type":"string"},"status":{"type":"string"}},"additionalProperties":true},"description":"Provenance only (source, url, retrievedAt). Not keyed by check id and does not carry success or error. A check in missing_items does not remove its upstream from sources[]; unavailability is only in missing_items (and unavailable findings)."},"limitations":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"example":{"found":true,"results":[{"billId":3737,"status":"Act","shortTitle":"Employment Rights Act 2025","formerShortTitle":null,"longTitle":"A Bill to make provision to amend the law relating to employment rights; to make provision about procedure for handling…","originatingHouse":"Commons","currentHouse":"Unassigned","currentStage":{"description":"Royal Assent","house":"Unassigned","lastSittingDate":"2025-12-18"},"isAct":true,"isDefeated":false,"withdrawnDate":null,"introducedSessionId":39,"includedSessionIds":[39],"sponsors":[{"name":"Jonathan Reynolds","party":"Labour"},{"name":"Baroness Lloyd of Effra"}],"lastUpdate":"2025-12-22T11:02:30.7253228","url":"https://bills.parliament.uk/bills/3737"}],"exportedAt":"2026-11-15","sources":[{"source":"UK Parliament Bills API (Open Parliament Licence v3.0)","url":"https://bills-api.parliament.uk/api/v1/Bills","retrievedAt":"2026-11-15","status":"ok"}],"limitations":["Contains Parliamentary information licensed under the Open Parliament Licence v3.0.","Data current to the export date; the API does not mark lapsed bills, so none are inferred.","…"]}}}},"400":{"description":"Invalid JSON or request schema. Not charged (no payment-response). If this 400 is returned before the Idempotency-Key is reserved, the key is not stored — fix the body and you may reuse the key. If an operation-path 400 was stored after a payment-signature was attached, the same key + same body replays it; the same key + a different body returns 409."},"402":{"description":"Payment required. The JSON body is the x402 PaymentRequired object. An unpaid 402 does not store the Idempotency-Key. A 402 after payment-signature releases the key and includes prior-payment-attempt (nonce, settled false|unknown). Not charged; no payment-response. Before re-signing after a post-signature 402, check USDC authorizationState(payer, nonce) on Base."},"409":{"description":"Idempotency conflict, in-progress payment, or expired result cache. Same key with a different body after a stored result returns conflict. Reusing the key cannot trigger a second charge. Not charged when settlement did not occur."},"413":{"description":"Request body exceeds the 24 MB limit. Not charged."},"500":{"description":"Operation failed before settlement, so no payment is taken (no payment-response). The error is stored: reuse the same Idempotency-Key and body to retrieve it without paying again. Use a new key for a fresh attempt with a new payment-signature."},"502":{"description":"Facilitator verify/settle transport failure (often timeout). After payment-signature this is returned as SETTLEMENT_UNKNOWN with prior-payment-attempt; the outcome is stored under the Idempotency-Key. With the shared store configured, other instances replay it instead of settling again; without it, each instance keeps its own memory. The authorization may already be settled on-chain — do not re-sign until USDC authorizationState(payer, nonce) on Base is false."},"503":{"description":"Payment or retry-safe result storage is unavailable; the operation is not run. Not charged; no payment-response. A 503 after payment-signature releases the Idempotency-Key and includes prior-payment-attempt."}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.03"},"protocols":[{"x402":{"facilitator":"https://api.cdp.coinbase.com/platform/v2/x402"}}],"facilitator":"https://api.cdp.coinbase.com/platform/v2/x402"}}},"/api/v1/legislative-intelligence/ecfr-section-lookup":{"post":{"operationId":"look_up_an_ecfr_section_titles_16_17_29","summary":"Look up an eCFR section (titles 16, 17, 29)","description":"Return the text of one CFR section from the vendored eCFR snapshot of titles 16, 17 and 29.","tags":["legislative-intelligence"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"title":{"anyOf":[{"type":"number","const":16},{"type":"number","const":17},{"type":"number","const":29}]},"section":{"type":"string","pattern":"^\\d+[A-Za-z]?\\.[0-9A-Za-z-]+$"},"format":{"default":"text","type":"string","enum":["text","xml"]}},"required":["title","section"],"additionalProperties":false},"example":{"title":16,"section":"310.4"}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Fresh random 32-byte value encoded as 64 hexadecimal characters. Reuse unchanged only for retries of the same operation and request.","schema":{"type":"string","pattern":"^[0-9a-fA-F]{64}$"}}],"responses":{"200":{"description":"Illustrative endpoint-specific JSON response shape. For coverage operations, HTTP 200 is used for status complete, partial, and failed; all three settle and are charged at the full listed price. A settled 2xx includes a payment-response response header (facilitator settlement receipt; may include a transaction reference). Conditional fields depend on the result and data-source availability.","headers":{"payment-response":{"description":"Present on settled 2xx only. Facilitator settlement receipt for the x402 payment (not present on 4xx/5xx, which are not charged).","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"found":{"type":"boolean"},"title":{"type":"number"},"section":{"type":"string"},"heading":{"type":"string"},"reserved":{"type":"boolean"},"text":{"type":"string"},"citation":{"type":"string"},"hierarchy":{"type":"object","properties":{"chapter":{"type":"string"},"subchapter":{"type":"string"},"part":{"type":"string"}},"additionalProperties":true},"asOf":{"type":"string"},"ecfrUrl":{"type":"string"},"sources":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"url":{"type":"string"},"retrievedAt":{"type":"string"},"status":{"type":"string"}},"additionalProperties":true},"description":"Provenance only (source, url, retrievedAt). Not keyed by check id and does not carry success or error. A check in missing_items does not remove its upstream from sources[]; unavailability is only in missing_items (and unavailable findings)."},"limitations":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"example":{"found":true,"title":16,"section":"310.4","heading":"§ 310.4 Abusive telemarketing acts or practices.","reserved":false,"text":"(a) Abusive conduct generally. It is an abusive telemarketing act or practice and a violation of this part for any sell…","citation":"[75 FR 48516, Aug. 10, 2010, as amended at 76 FR 58716, Sept. 22, 2011; 80 FR 77559, Dec. 14, 2015; 89 FR 26784, 26785,…","hierarchy":{"chapter":"CHAPTER I—FEDERAL TRADE COMMISSION","subchapter":"SUBCHAPTER C—REGULATIONS UNDER SPECIFIC ACTS OF CONGRESS","part":"PART 310—TELEMARKETING SALES RULE"},"asOf":"2026-11-12","ecfrUrl":"https://www.ecfr.gov/current/title-16/section-310.4","sources":[{"source":"eCFR Title 16 point-in-time XML (US Government work; editorial compilation)","url":"https://www.ecfr.gov/api/versioner/v1/full/2026-11-12/title-16.xml","retrievedAt":"2026-11-15","status":"ok"}],"limitations":["eCFR is an editorial compilation, not the official legal edition of the CFR.","Snapshot as of 2026-11-12; only titles 16, 17 and 29 are vendored.","…"]}}}},"400":{"description":"Invalid JSON or request schema. Not charged (no payment-response). If this 400 is returned before the Idempotency-Key is reserved, the key is not stored — fix the body and you may reuse the key. If an operation-path 400 was stored after a payment-signature was attached, the same key + same body replays it; the same key + a different body returns 409."},"402":{"description":"Payment required. The JSON body is the x402 PaymentRequired object. An unpaid 402 does not store the Idempotency-Key. A 402 after payment-signature releases the key and includes prior-payment-attempt (nonce, settled false|unknown). Not charged; no payment-response. Before re-signing after a post-signature 402, check USDC authorizationState(payer, nonce) on Base."},"409":{"description":"Idempotency conflict, in-progress payment, or expired result cache. Same key with a different body after a stored result returns conflict. Reusing the key cannot trigger a second charge. Not charged when settlement did not occur."},"413":{"description":"Request body exceeds the 24 MB limit. Not charged."},"500":{"description":"Operation failed before settlement, so no payment is taken (no payment-response). The error is stored: reuse the same Idempotency-Key and body to retrieve it without paying again. Use a new key for a fresh attempt with a new payment-signature."},"502":{"description":"Facilitator verify/settle transport failure (often timeout). After payment-signature this is returned as SETTLEMENT_UNKNOWN with prior-payment-attempt; the outcome is stored under the Idempotency-Key. With the shared store configured, other instances replay it instead of settling again; without it, each instance keeps its own memory. The authorization may already be settled on-chain — do not re-sign until USDC authorizationState(payer, nonce) on Base is false."},"503":{"description":"Payment or retry-safe result storage is unavailable; the operation is not run. Not charged; no payment-response. A 503 after payment-signature releases the Idempotency-Key and includes prior-payment-attempt."}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.03"},"protocols":[{"x402":{"facilitator":"https://api.cdp.coinbase.com/platform/v2/x402"}}],"facilitator":"https://api.cdp.coinbase.com/platform/v2/x402"}}}},"components":{"schemas":{"ApiError":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}}}}}}}}