law

Fetch the full text of a US court opinion by CourtListener...

Fetch the full text of a US court opinion by CourtListener opinion ID OR by citation. Returns plain text (preferred), HTML fallback, case metadata (case name, court, year, docket, citation), opinion type (lead/concurrence/dissent), author, and a list of alternate opinions in the same cluster. POST { opinionId?: number, citation?: string } — exactly one required. Anti-hallucination follow-up to case-verify: once you confirm the citation exists, fetch the text. Backed by CourtListener (public-domain underlying corpus).

post/api/law/opinion

Request

  • Base URL: https://2s.io
  • URL: https://2s.io/api/law/opinion
  • Auth: API key in header PAYMENT-SIGNATURE

Query parameters

trial1

Try before you buy. Set to 1 for one free real call per endpoint per hour — no wallet or payment needed — to verify the endpoint before paying. Equivalent to sending the "X-2s-Trial: 1" request header. Listed only on operations that offer a trial; the others always answer 402.

Request body

opinionIdinteger

Opinion ID.

citationstring

Citation.

Response

(unresolved $ref)

Changes

No recorded changes to this operation across all 1 revision of this API.