Calculating Federal Court Deadlines With the CourtRules API
A rule that says "14 days after service" leaves open whether the days are calendar or business days, what happens when day 14 is a Saturday or a holiday, and whether the judge's standing order sets a different deadline.

Legal software that needs court rules finds them in PDFs rather than in a database, with hundreds of pages of local rules and standing orders per district that judges update whenever they choose.
A language model can draft a motion that reads well, but it may not know that Judge Albright in WDTX allows 13pt font while Judge Caproni in SDNY requires 12pt. It may also miscompute a deadline when a holiday exclusion is on page 4 of a standing order, and a missed deadline can mean a terminated motion.
The CourtRules API returns structured constraints extracted from each judge's standing orders, so your code works from the judge's own text.
What raw rules look like
Open any standing order PDF. You'll find something like this:
"Opposition briefs must be filed within 14 days of service of the moving papers. Reply briefs may be filed within 7 days thereafter."
The rule text is a string and your code needs a data structure, so the API normalizes it into a TemporalConstraint:
{
"type": "TEMPORAL",
"value": 14,
"unit": "DAYS",
"trigger_event": "SERVICE_OF_MOTION",
"direction": "AFTER",
"is_business_days": false
}With the structure you can do date math. The is_business_days flag is important, because some judges specify "10 business days" for the same type of filing where others say "14 days." Your date library needs to handle both, and your code needs to know which one it's dealing with.
Authentication
Grab an API key from the dashboard. Standard Bearer token:
Computing a Deadline
Say you need the response deadline for a Motion for Summary Judgment. Hit /v1/docket/calculate with the judge ID and trigger event:
const calculateDeadline = async (
judgeId: string,
triggerDate: Date
) => {
const response = await courtRules.docket.calculate({
trigger_event: "Service of Motion for Summary Judgment",
judge_id: judgeId, // e.g., "sdny-caproni"
case_type: "CIVIL"
});
return response.deadlines.map(d => ({
action: d.action,
// API returns the offset. You handle calendar logic.
due_date: addDays(triggerDate, d.due_date_offset),
rule_source: d.rule_source,
citation: d.citation
}));
};The API returns an offset (+14 days) rather than an absolute date, because federal and state holiday calendars don't always overlap and the right date depends on the jurisdiction. Your code applies the calendar to the constraint.
Chaining Deadlines
Federal motion practice is sequential: Motion, then Opposition, then Reply. Each deadline triggers from the previous one. When you query for "Summary Judgment," the API returns the full chain:
{
"trigger_event": "Service of Motion",
"jurisdiction": "SDNY (Caproni)",
"deadlines": [
{
"action": "File Opposition Brief",
"due_date_offset": 14,
"unit": "days",
"id": "opp_brief"
},
{
"action": "File Reply Brief",
"due_date_offset": 7,
"unit": "days",
"trigger": "opp_brief" // chains off the previous deadline
}
]
}The trigger field links the reply deadline to the opposition deadline. Your UI can render this as a timeline without any manual wiring.
Compliance Checks
Deadlines aren't the only thing that gets filings rejected. Formatting is worse. Wrong font size, too many pages, missing table of contents. These are mechanical errors, and they happen constantly.
The /v1/compliance/check endpoint validates document metadata against the judge's requirements before you file:
const checkBrief = async (fileMetadata: FileMetadata) => {
const compliance = await courtRules.compliance.check({
judge_id: "wdtx-albright",
document_type: "Claim Construction Brief",
page_count: fileMetadata.pages
});
if (compliance.status === "RISK_DETECTED") {
compliance.violations.forEach(v => {
console.warn(
`${v.severity}: ${v.rule} (Limit: ${v.limit}, Actual: ${v.actual})`
);
});
}
};Always show the rule_source and citation fields to your end users. Lawyers need to see where a constraint comes from. They won't trust a system that just says "your brief is too long" without pointing to the specific standing order paragraph that says so.
Caching
Standing orders don't change every day, but they do change without warning. Cache rules for 24 hours, and check the changes feed to refresh a judge's rules when a document changes, so you don't call the API on every request or serve stale rules.
Get Started
If you're building deadline calculation, docketing, or filing compliance into your product, the hard part isn't the code. It's keeping up with 750+ judges who each have their own rules and change them on their own schedule. That's what the API handles for you.