Faelo / IRS Internal Revenue Bulletin API

IRS Internal Revenue Bulletin API

Verbatim IRS Revenue Rulings, Revenue Procedures, Notices, and Treasury Decisions since 2003.

The Internal Revenue Bulletin is the IRS's authoritative weekly publication of official guidance. This API serves every document from the 2003-onward HTML era, verbatim, from a structured database. The IRS publishes these only as 1,200+ separate bulletin pages with no per-document search and no per-document retrieval.

Coverage

6,363 documents across 1,206 bulletin issues. Source: Internal Revenue Service — public-domain US government work.

Routes

MethodPathAccessPrice
GET/search?q=<keywords>&limit=<1-50>free
GET/doc/{id}free
GET/doc/{id}/fullpaid$0.01

Live API root: https://irb-precedent-api.canvas-cart.workers.dev · /llms.txt · /stats

Record ids

a document slug, e.g. "rev-rul-2003-71" or "td-2003-9091"; get it from /search.

Free search: https://irb-precedent-api.canvas-cart.workers.dev/search?q=research+credit&limit=3

How an agent pays

Request /doc/{id}/full. The API answers 402 Payment Required with the price ($0.01 per document), the network (eip155:8453), the USDC asset (0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913), and the payout address. Pay, repeat the request, receive the full record. The 402 also carries x402 Bazaar discovery data.

import { wrapFetchWithPayment, x402HTTPClient } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const signer = privateKeyToAccount(process.env.PRIVATE_KEY); // a funded Base wallet
const client = new x402Client();
client.register("eip155:*", new ExactEvmScheme(signer));

const fetchWithPayment = wrapFetchWithPayment(fetch, client);
const httpClient = new x402HTTPClient(client);

const res = await fetchWithPayment("https://irb-precedent-api.canvas-cart.workers.dev/doc/td-2003-9091/full");
const out = await httpClient.processResponse(res);
console.log(out.paymentStatus, out.body);