← Back to all apps

Midpage Legal Research

Productivityby Midpage
Launched Sep 18, 2026 on ChatGPTLaunched Feb 21, 2026 on Claude

Connect Claude to a database of case law. With the Midpage MCP, Claude can conduct complex legal research, review opinions, and craft high quality work product. Everything is hyperlinked to real sources for easy verification.

5ChatGPT Tools
3Claude Tools
MidpageDeveloper
ProductivityCategory

Use Cases

productivitylegal

Available Tools

Analyze a case docket

analyzeCaseDocket
Full Description

Answer questions about docket metadata and recorded activity, including judges, case category, parties, and procedural history. Use analyzeCaseDocument for filing contents.

LINKS: Cite case.url for reader links such as "View docket". Fetch docketReport.downloadUrl to download/process the original report; link it in answers only for an explicit download. Copy URLs exactly. Reports may be unavailable.

REFERENCE: caseId, or docket { court, docketNumber, caseName? }. caseId takes precedence. Courts accept Bluebook abbreviations or full names. forceFetch: omit/false prefers stored data; an uncached docket may still be retrieved from PACER. Use true for the latest official PACER docket. Ignored with a warning where PACER cannot serve the case. A failed refresh does not establish current status.

RETURNS (status "ok"):

  • case: identity and reader url
  • answer: grounded in report metadata and entries; distinguishes recorded events from unverified current status
  • relevantEntries: description, entryNumber, dateFiled, hasDocument, documentReference. Pass documentReference plus your question to analyzeCaseDocument. Main filings have attachmentNumber: null; attachments have their number. References do not guarantee retrieval.
  • coverage: kind (docket_report, stored_entries, opinion_only), analyzed entryCount, truncated (source or selection incomplete; see warnings). At most 40 entries; narrow the question for others.
  • freshness: cached, liveFetchSucceeded, fetchedAt (acquisition time, null if unknown), latestEntryDate. Neither date proves currentness; recently acquired RECAP reports can be stale.
  • doesNotAddress: unanswered parts, empty when answered. warnings: source/retrieval gaps. Metadata-only answers may select no entries.
  • retrievalSource: midpage, recap, pacer; docketReport: downloadUrl, suggestedFileName

Other statuses carry a message: invalid_reference (repair input), not_found, ambiguous (with candidates), pacer_fetch_failed, analysis_failed (may include downloadUrl for manual reading).

Parameters (1 required, 3 optional)
Required
questionstring

The docket-level question to answer.

Optional
caseIdstring

case.caseId (UUID) from a search hit or analyzeCaseDocument.

docketobject

A docket by court and docketNumber, plus caseName to disambiguate. Omit when using caseId.

forceFetchboolean

Set true only when the user explicitly needs the latest/current official PACER docket. For historical research or locating a filing, omit or use false to prefer stored data. Federal courts only.

Analyze a case document

analyzeCaseDocument
Full Description

Read one opinion or filing with verified quotes. REQUIRED before citing a case. Check doesNotAddress and sourceWarnings before citing. Preserve proposition qualifications and opinionSection; never present a concurrence, dissent, party argument, or proposed order as the court's holding.

treatment.history: up to 5 Negative or Caution citers, binding, Negative, court rank, earliest first, with documentIds; negative and caution count distinct binding citers, more those cut. Neutral is not validation. Reconcile filing captions with court metadata.

REFERENCE: documentId from search/docket output, else reporter citation (not WL/LEXIS), else entry {caseId, entryNumber, attachmentNumber}. Leave unused references null. Main filing: attachmentNumber null, empty, "0", or omitted; attachment: positive integer string. Stored copy first, otherwise PACER.

RETURNS status "ok":

  • case and document identify the source; opinions use document.opinion.dateDecided when known. Filings also return entry. Fetched filings may have no documentId; reuse entry.
  • answer: direct answer, including the procedural outcome when relevant and what the source leaves open.
  • supportedPropositions: proposition with its conditions and qualifications, verbatim quote, quoteTruncated (excerpt shortened), and supported deeplinkUrl. Non-majority propositions identify their author and section in opinionSection.
  • doesNotAddress lists unanswered parts of the question; do not cite for these.
  • sourceWarnings flags source-status uncertainty; verify before asserting a ruling.

Other statuses include invalid_reference (repair input), not_found, ambiguous (choose a candidate documentId or resolve via analyzeCaseDocket), text_not_available, pacer_fetch_failed, analysis_failed; read the message.

CITATION FORMAT: markdown links only, exact returned text. A proposition: [document.opinion.citation or case.caseName](deeplinkUrl ?? document.url). The document: [citation](document.url). No short cites (id., supra), invented pin cites, WL or LEXIS.

Parameters (1 required, 3 optional)
Required
questionstring

The legal question to answer about this document.

Optional
citationstring

Reporter citation "<volume> <reporter> <page>", e.g. "556 U.S. 662". Not WL or LEXIS. Omit when using another reference.

documentIdstring

document.documentId (UUID) from a search hit or relevantEntries[].documentReference.documentId from analyzeCaseDocket. Omit when using another reference.

entryobject

A docket entry by case.caseId and entryNumber (plus attachmentNumber for an attachment). Fetches the filing from PACER when Midpage does not have it.

analyzeDocketFiling

analyzeDocketFiling
Full Description

Analyze one docket filing selected from analyzeDocketReport and answer a focused question using passages from that filing.

Use this when the user needs to understand what a specific filing says. This tool answers from the filing text, not from the docket entry description.

INPUT:

  • caseId: The caseId returned by analyzeDocketReport case.caseId.
  • entryNumber: The docket entry number returned by analyzeDocketReport relevantEntries[].entryNumber.
  • attachmentNumber: Optional attachment number returned by analyzeDocketReport relevantEntries[].attachmentNumber. Omit for the main filing on the docket entry.
  • question: The question to answer about this specific filing.

RETURNS:

  • status: "ok" or a specific resolution/analysis error.
  • filing: Resolved filing metadata, including entryNumber, optional attachmentNumber, dateFiled, suggestedFileName, and a downloadable Midpage file URL for the filing.
  • answer: Direct answer based only on the filing text.
  • supportingPassages: Passages from the filing that support the answer, with passage and relevance.
  • doesNotAddress: Specific parts of the question that the filing text does not answer. Check this before relying on the answer.

CITATION RULES:

  • When using filing content in an answer, cite the filing with the format below.
  • Every citation must be a markdown hyperlink to filing.url.
  • The ECF No. suffix is important and should be included in filing citations.
  • Use a descriptive filing name, then any real page/pin/paragraph if available, followed by this suffix: ECF No. {filing.entryNumber} ({filing.dateFiled formatted as "Mar. 3, 2020"}).
  • Example: [Pl.'s Mot. for Summ. J. 5, ECF No. 30 (Mar. 3, 2020)]({filing.url})
  • If filing.dateFiled is unavailable, omit the parenthetical date rather than inventing one.
  • Never use short cites such as "id." or "supra"; repeat the full linked filing citation.

DOWNLOAD GUIDELINES:

  • If the user asks to download or save the filing, use filing.suggestedFileName as the filename.
Parameters (3 required, 1 optional)
Required
caseIdstring

Case id returned by analyzeDocketReport case.caseId.

entryNumberstring

Docket entry number returned by analyzeDocketReport relevantEntries[].entryNumber.

questionstring

The question to answer about this specific filing.

Optional
attachmentNumberstring/null

Attachment number returned by analyzeDocketReport relevantEntries[].attachmentNumber, when the filing is an attachment. Omit or set null for the main filing on the docket entry.

analyzeDocketReport

analyzeDocketReport
Full Description

Analyze a federal docket report and answer a docket-level question.

Use this for case snapshots, recent activity, procedural posture, service, complaint history, motion history, deadlines, and identifying relevant filings. This tool answers from the docket sheet only; use analyzeDocketFiling when the text of a specific filing is needed.

INPUT:

  • court: Federal court. Prefer Bluebook-style abbreviations such as "N.D. Cal.", "S.D.N.Y.", "D. Del.", "Bankr. D. Del.", "9th Cir.", or "Fed. Cir."; full federal court names are also accepted.
  • docketNumber: Federal case docket number. Prefer full district/bankruptcy numbers with office or division prefix when known, such as "4:24-cv-04722"; appellate numbers look like "24-1234".
  • caseName: Optional case caption/name, such as "Musk v. Altman". Include it when available, especially if the docket number is incomplete.
  • forceFetch: Optional. Set true only when the user explicitly needs the latest official PACER docket instead of available cached or RECAP data.
  • question: The docket-level question to answer.

RETURNS:

  • status: "ok" or a specific resolution/analysis error.
  • case: Resolved case metadata, including caseId for analyzeDocketFiling.
  • docketReport: Docket report metadata, including suggested filename and a downloadable Midpage file URL when one is available.
  • answer: Direct answer based only on the docket sheet.
  • relevantEntries: Docket entries or attachments supporting or relevant to the answer. Use case.caseId plus relevantEntries[].entryNumber and optional relevantEntries[].attachmentNumber with analyzeDocketFiling when the filing text is needed.
  • doesNotAddress: Specific parts of the question that the docket entries do not answer. Check this before relying on the answer.
  • warnings: Important source or parsing limitations, when present.

DOWNLOAD GUIDELINES:

  • If the user asks to download or save the docket report, use docketReport.suggestedFileName as the filename.
Parameters (1 required, 4 optional)
Required
questionstring

The docket-level question to answer about the case.

Optional
caseNamestring

Optional case caption/name, such as Musk v. Altman. Include it when available, especially if the docket number is incomplete.

courtstring

Federal court for the case. Prefer Bluebook-style abbreviations such as "N.D. Cal.", "S.D.N.Y.", "D. Del.", "Bankr. D. Del.", "9th Cir.", or "Fed. Cir."; full federal court names are also accepted.

docketNumberstring

Federal case docket number, preferably the full district/bankruptcy docket number with office or division prefix when known, such as "4:24-cv-04722", or an appellate docket number such as "24-1234".

forceFetchboolean

Set true only when the user explicitly needs the latest official PACER docket instead of available cached or RECAP data.

Analyze statute or regulation

analyzeLaw
Full Description

Analyze a statute, regulation, constitutional provision, or agency guidance document against a legal question. Returns verified passages with deep links. REQUIRED before citing or quoting any statute or regulation.

AUTO-USE: whenever an answer depends on the wording, requirements, exceptions, scope, procedures, or current status of a primary-law provision. Never answer from memory or web snippets instead.

LINK RULE: every statute/regulation citation or subsection relied on in the final answer must be a Markdown link: a passage-specific proposition or quote to its deeplinkUrl, a general reference to url. Never invent path segments.

LOOKUP: exactly ONE of citation, path, registerCitation, or id, plus question. Subsection pinpoints ("18 U.S.C. § 924(c)(1)(C)") and popular names ("First Step Act of 2018") are not citation keys: searchLaws with the user's wording, then analyze the chosen result by id, keeping the pinpoint in question. Never guess or silently truncate a citation. Raw text is never returned.

RETURNS: citation, title, number, state, collectionType; analysis {summary, passages [{point, quote, deeplinkUrl}], doesNotAddress: CHECK BEFORE CITING}; isCurrent (in force today), isHistorical (superseded; both false = not yet effective), effectiveDate, publicationDate; url (this exact version), sourceUrl (official source); children: for containers, up to 250 of childrenTotal child provisions (no text; analyze a child by id, or searchLaws for the section when the list is capped), parentId; versions (analyze another by id with includeHistorical: true); ambiguousMatches (retry by id); error (unresolvable or unsafe to analyze; source-file-only leaves return metadata and url to open, never quote them).

HOW TO USE: quote only returned passages; for a container (nodeType PARENT) drill into the relevant child; check isCurrent before asserting current law; for state comparisons, analyze each provision with the same question and compare propositions, qualifiers, and doesNotAddress.

Parameters (1 required, 6 optional)
Required
questionstring

The legal question you want answered about this document. The document text is analyzed internally and the tool returns only verified relevant passages, not the raw text.

Optional
citationstring

Canonical citation for a document (e.g. "42 U.S.C. § 1983", "Cal. Code Regs. tit. 22, § 51451"). Matching ignores punctuation, spacing, and §/sec./section style ("42 USC 1983" works), but NOT abbreviation differences. Do not guess a citation from a popular/source-law name or append a subsection pinpoint to a section-level citation; searchLaws first, then analyze the selected result by id.

collectionstring

Optional collection to disambiguate path/citation/registerCitation lookups — an id (e.g. "cfr", "uscode") or a human-readable name (e.g. "Code of Federal Regulations"). Resolved server-side; unresolvable values return did-you-mean suggestions.

idstring

Document UUID from a previous search or lookup.

includeHistoricalboolean

Set true to allow superseded/future versions in citation/path/registerCitation lookups (default: only the current version resolves). Lookups by id always return that exact version.

pathstring

Full ltree path of the document (e.g. "cfr.t21.cI.scH.p820"). Pair with collection when known.

registerCitationstring

Register citation — Federal Register (e.g. "89 FR 12345") or a state register.

analyzeOpinion

analyzeOpinion
Full Description

Reviews and annotates a legal opinion, returns key takeaways, holdings, details, excerpts, and tells you how you can use this case in your response. REQUIRED before citing a case.

This tool returns what the case ACTUALLY supports (not necessarily what you asked about). Use this to: 1. Find out what propositions this case actually supports 2. Extract verified quotes 3. Understand the scope/limitations of each proposition 4. Know what the case does NOT address (to avoid misattribution)

DOCUMENT IDENTIFICATION (provide exactly ONE — omit the others):

  • opinionId: Midpage document ID from search results (e.g., "7228818", "c4efd75e-22e7-471f-8bda-95e10a13e588"). OMIT this field if you don't have a Midpage ID.
  • reporterCitation: Bluebook citation (e.g., "556 U.S. 662", "123 F.3d 456") — NOT WL/LEXIS
  • docket: For cases without reporter citations:
    • courtAbbreviation: e.g., "S.D.N.Y.", "9th Cir."
    • docketNumber: e.g., "12-cv-20100" (omit "No." prefix)

HOW TO CHOOSE: 1. If you have an opinionId from search results, use ONLY opinionId (fastest) 2. If you have a reporter citation like "556 U.S. 662", use ONLY reporterCitation (omit opinionId) 3. If you only have a docket number (e.g., "No. 20-16900 (9th Cir.)"), use ONLY docket tuple 4. NEVER use WL or LEXIS citations — use docket tuple instead 5. NEVER pass "0" or placeholder values — omit fields you don't have

INPUT:

  • question: The legal question you want answered. Be specific about the legal element.

RETURNS:

  • citation: Exact bluebook citation string for the case
  • url: General Midpage link for the case as a whole
  • supportedPropositions: Array of propositions this case supports, each with:
    • proposition: Cite-ready statement of what the case holds (USE THIS TEXT when citing)
    • quote: Verbatim quote supporting the proposition
    • scope: Limitations, conditions, what it does NOT apply to
    • centrality: "core_holding" (strongest), "supporting_analysis" (strong), "secondary_matter" (medium), or "background" (weakest)
    • opinionSection (optional): the non-majority opinion that this proposition comes from (e.g., "Jackson, Concurring", "Smith, Dissenting").
    • deeplinkURL: Shareable Midpage deep link that auto-scrolls to that sentence range
    • doesNotAddress: Topics from your question the case does NOT address. CHECK THIS BEFORE CITING.
    • summary: Brief summary of what the case is actually about
    • disposition: Short procedural outcome phrase describing what this court did in this opinion, when available
    • jurisdiction: Court and jurisdiction
    • treatment: Citator status and citation count

HOW TO USE THE OUTPUT: 1. Check doesNotAddress first - if your intended use is listed, DO NOT cite this case for that purpose 2. Find a supported proposition that matches your intended use 3. Use the proposition text (or close paraphrase) when citing - it's verified to match the quote 4. Include scope limitations when relevant (especially qualifiers) 5. Prefer "core_holding" and "supporting_analysis" over "secondary_matter" or "background" for stronger authority 6. Never characterize non-majority propositions as the court's controlling holding; clearly signal when they come from concurrence/dissent text 7. If a proposition is from any non-majority opinion, it must include opinionSection (e.g., "Jackson, Concurring") 8. When citing a specific supported proposition or quote, prefer that proposition's deeplinkURL over the top-level url 9. Use the top-level url only when referring to the case generally rather than a specific proposition or quote

EXAMPLE: If you ask "Is expert testimony required to prove truth as a defense to a defamation claim?" and the case mentions that an expert testified in such a case in passing:

  • supportedPropositions will contain "An expert testified in order to prove truth of the matter asserted" as background
  • doesNotAddress will contain "Whether expert testimony is REQUIRED" (what you asked about)
  • You should NOT cite this case to say that such testimony is REQUIRED just because the testimony was provided in this one case.

WRITING RULES: 1. FAVOR paragraph-driven writing: Write like an attorney with clear topic sentences, crisp rule statements with hyperlinked citations, and thoughtful analysis. 2. FAVOR direct, concise answers: Keep answers short. Answer the question asked, not an expanded version. 3. FAVOR embedded-quotes in prose: Weave quotes into paragraphs (modify with brackets [] or ellipsis ... while keeping verbatim). 4. LIMIT lists and bullet points: Use sparingly or unless asked. 5. AVOID block quotes: Don't dump quotes in block format. 6. AVOID repetition/summaries. 7. AVOID emojis.

CITATION RULES:

  • ALWAYS include a citation after each quoted passage
  • ALWAYS mention relevant scope limitations when citing if relevant
  • OFTEN add parentheticals after citations beginning with "ing" words or quotes.

CITATION FORMAT: Every citation must be a markdown hyperlink using the returned fields. When citing a specific supported proposition or quote, use: [{citation}]({deeplinkURL})

When referring to the case generally, use: [{citation}]({url})

Example proposition citation: [International Shoe Co. v. Washington, 326 U.S. 310 (1945)](https://app.midpage.ai/document/1234567?lines=10-12)

Example general case citation: [International Shoe Co. v. Washington, 326 U.S. 310 (1945)](https://app.midpage.ai/document/1234567)

  • Use the exact citation string returned by the tool—never abbreviate or modify
  • NEVER use short cites (id., supra)—always full citation with link
  • Prefer deeplinkURL whenever the citation is tied to a specific supported proposition or quote
  • NEVER invent reporter pin cites. If you want a Midpage line-specific link, use the returned deeplinkURL
  • NEVER cite to LEXIS or WL citations; always cite to the exact bluebook citation provided (which may be a docket-number citation in liue of a reporter for unpublished cases)
  • Include a citation after every legal proposition or quote
Parameters (1 required, 3 optional)
Required
questionstring

The legal question you want answered about this opinion.

Optional
docketobject

Docket tuple for cases without reporter citations

opinionIdstring

Midpage opinion ID from prior tool results (e.g., "7228818" or "c4efd75e-22e7-471f-8bda-95e10a13e588")

reporterCitationstring

Canonical reporter citation in the form '<volume> <reporter> <page>' (e.g., '556 U.S. 662', '123 F.3d 456'). Do NOT use WL/LEXIS citations.

findInOpinion

findInOpinion
Full Description

Find quotable passages within a single opinion using keyword search. Fast, free, no AI.

WHEN AND HOW TO USE THIS TOOL:

  • This tool is optional but recommended.
  • Use this tool after a search, or directly if the user gives you a citation.
  • Check if a search result is actually relevant (sort of like double clicking into a result)
  • To decide which cases are worth the AI cost of analyzeOpinion (only the most relevant!)

HOW NOT TO USE THIS TOOL:

  • Do not use this tool alone. If you intend to cite a case, you must use analyzeOpinion.
  • Do not use this tool unless the user has specifically provided a citation to a case. Default to the search tool.

DOCUMENT IDENTIFICATION (provide exactly ONE — omit the others):

  • opinionId: Midpage document ID from search results (e.g., "7228818", "c4efd75e-22e7-471f-8bda-95e10a13e588"). OMIT this field if you don't have a Midpage ID.
  • reporterCitation: Bluebook citation (e.g., "556 U.S. 662", "123 F.3d 456") — NOT WL/LEXIS
  • docket: For cases without reporter citations:
    • courtAbbreviation: e.g., "S.D.N.Y.", "9th Cir."
    • docketNumber: e.g., "12-cv-20100" (omit "No." prefix)

HOW TO CHOOSE: 1. If you have an opinionId from search results, use ONLY opinionId (fastest) 2. If you have a reporter citation like "556 U.S. 662", use ONLY reporterCitation (omit opinionId) 3. If you only have a docket number (e.g., "No. 20-16900 (9th Cir.)"), use ONLY docket tuple 4. NEVER use WL or LEXIS citations — use docket tuple instead 5. NEVER pass "0" or placeholder values — omit fields you don't have

QUERY INPUT:

  • query: Key terms to match, NOT a full question
  • GOOD: "personal jurisdiction minimum contacts purposeful availment"
  • BAD: "Does this case establish personal jurisdiction?" (questions don't work well)

RETURNS:

  • snippets: Verbatim passages from the opinion (can be quoted directly)

LIMITATIONS:

  • Keyword-based only—may miss relevant passages with different wording
  • Easy to take things out of context because you only see a snippet
  • Does NOT tell you if the case supports or contradicts your proposition
  • Does NOT identify qualifiers/exceptions

NEXT STEP: Use analyzeOpinion() on promising cases to get analysis, qualifiers, and verified quotes before citing.

Parameters (1 required, 3 optional)
Required
querystring

Key terms for matching relevant passages (keyword search, not semantic).

Optional
docketobject

Docket tuple for cases without reporter citations

opinionIdstring

Midpage opinion ID from prior tool results (e.g., "7228818" or "c4efd75e-22e7-471f-8bda-95e10a13e588")

reporterCitationstring

Canonical reporter citation in the form '<volume> <reporter> <page>' (e.g., '556 U.S. 662', '123 F.3d 456'). Do NOT use WL/LEXIS citations.

Search US case law and dockets

search
Full Description

Search US case law and state trial filings. Read cases with analyzeCaseDocument before citing. Use analyzeCaseDocket for known court+docket numbers, federal filings, or current docket activity; search does not establish docket identity.

Send up to 4 queries: ways of asking one question. Results merge; a hit found by more queries ranks higher. Filters are AND-ed; courts are OR-ed. State trial and appellate courts may be combined. Trial searches need one state, given or implied by named courts.

Each query: query (required), jurisdiction (federal | state | state_and_federal | trial), courts, states, documentTypes, publishStatus, startDate/endDate. Courts: Bluebook abbreviations, full names, or circuit regions ("9th Cir. region"). For Florida case law use jurisdiction "state" and states ["Florida"], not "Fla. region". states narrows state courts only. Exact documentTypes are OR-ed; omit for opinion/order/judgment; ["all"] removes the type filter. Non-opinion types need state trial courts; all adds no federal filings.

publishStatus: any (default) | published | unpublished | unknown. Restrict only on explicit request. unknown means missing status. Opinions only; trial dockets are unchanged.

Results: case.caseId for analyzeCaseDocket, document.documentId for analyzeCaseDocument, URL, court, citation/treatment/dateDecided for opinions, entry for filings, snippet. Snippets are not analysis. Neutral treatment does not establish validity; if copies disagree, research later history.

status: ok, partial (a query was skipped or a backend failed; keep the results), or error (nothing ran). skipped names each query that did not run and why; retry only retryable ones and follow any nextAction. warnings explain empty or narrowed coverage.

If a named-court trial search is empty, retry once statewide without courts, same state and subject. A filtered miss does not prove absence.

Continue with { queries: [{ cursor: nextCursor }] }, sent alone. No cursor means the end or the 100-result cap; refine. Cursors last 30 minutes.

Parameters (1 required)
Required
queriesarray

Up to 4 ways of asking one question, each with its own filters; results are merged. Or one cursor to continue the previous search.

Search US statutes and regulations

searchLaws
Full Description

Search Midpage's US primary-law corpus: statutes, regulations, constitutions, and agency guidance for federal law, all 50 states, and DC. BM25 keyword search (not semantic) over text, headings, and citations.

Find provisions by legal issue, citation, or keywords. Pass a result's id to analyzeLaw for verified text before citing.

RESOLUTION: subsection pinpoints ("18 U.S.C. § 924(c)(1)(C)") and popular/source-law names ("First Step Act of 2018", "ERISA § 514") go through search first: search the user's full wording, choose the intended provision, analyzeLaw by id. Never guess a codified citation or silently truncate a pinpoint.

Results are the law in force TODAY unless currentOnly is false (not superseded, not future-effective, no in-force successor).

RETURNS:

  • results: id (pass to analyzeLaw), citation, title, number, state, collectionId/collectionType, path, nodeType, effectiveDate, snippets (matched fragments, <em> marks the hit), isCurrent/isHistorical (both false = not yet effective), url (Midpage page for that exact version)
  • total: estimate; the authoritative currency check may drop index-stale rows, so a page can hold fewer than pageSize results (continue normally)
  • stateCounts: estimated per-state hits for the WHOLE query, not this page: scope surveys with them, verify each state with a filtered search; not proof of coverage
  • error: replaces results when a filter could not be resolved (did-you-mean suggestions included) or the page window was exceeded; says how to fix the call

HOW TO USE: search broad, then narrow with the filter fields. NEVER cite from snippets; quote from analyzeLaw. N-state surveys: one unfiltered query, read stateCounts, per-state filtered queries, then analyzeLaw the top provisions.

Parameters (1 required, 7 optional)
Required
querystring

Full-text query matched against document text, headings, and citations. Use legal concepts and key terms. Also use the user's full wording to resolve subsection pinpoints or popular/source-law names (e.g. "18 U.S.C. § 924(c)(1)(C)", "First Step Act of 2018", "ERISA § 514"), then pass the selected result id to analyzeLaw.

Optional
collectionsarray

Restrict to specific codes, by id (e.g. "cfr", "wa-rcw") or human-readable name (e.g. "Code of Federal Regulations", "Texas Administrative Code"). Resolved server-side; unresolvable values return did-you-mean suggestions.

collectionTypesarray

Restrict to statute / regulation / constitution / guidance / executive_order / notice.

currentOnlyboolean

Default true: only documents that are the law in force today. Set false to include historical/superseded versions.

pageinteger

1-indexed page (default 1).

pageSizeinteger

Results per page (default 10, max 50).

pathPrefixstring

Restrict to a subtree of a code via dot-separated ltree path prefix (e.g. "cfr.t21" = all of 21 CFR) — take it from a previous result's path. Pair with collections.

statesarray

State names or USPS abbreviations; federal law is "Federal" (e.g. ["California", "TX", "Federal"]). Validated server-side — unrecognized values return did-you-mean suggestions.