v2

latestOpenAPI 3.1.02026-07-2662567.7 KB

Search opinions

Search for opinions using semantic (vector), keyword (full-text), or hybrid search.

Search Modes:

  • semantic - Vector similarity search using AI embeddings. Best for conceptual queries like "cases about breach of fiduciary duty". Returns results ranked by semantic similarity.
  • keyword - Traditional full-text search using Elasticsearch. Supports Lexis/Westlaw-style boolean operators. Best for exact phrase matching and known terms. Returns results ranked by BM25 relevance.
  • hybrid - Combines semantic and keyword search using reciprocal rank fusion (RRF) with deduplication. Best for comprehensive search coverage.

Boolean Operators (keyword mode only):

  • AND - Both terms must appear (e.g., negligence AND damages)
  • OR - Either term may appear (e.g., breach OR default)
  • NOT - Exclude term (e.g., contract NOT employment)
  • "..." - Exact phrase (e.g., "summary judgment")
  • * - Wildcard for any characters (e.g., negligen*)
  • ? - Single character wildcard (e.g., wom?n)
  • W/n - Proximity search within n words (e.g., negligence W/5 damages)
  • () - Grouping (e.g., (contract OR agreement) AND breach)

Note: Boolean operators must be UPPERCASE. They only work in keyword mode.

Pagination:

  • Use page (1-indexed) and page_size for pagination
  • Maximum page_size is 100
  • Semantic search has limited deep pagination (~500 unique results max)
  • Keyword and hybrid support deep pagination via Elasticsearch
post/search

Request body

querystring required

Search query text

mode'semantic' | 'keyword' | 'hybrid'

Search mode:

  • semantic - Vector similarity search (default)
  • keyword - Full-text search
  • hybrid - Combined semantic and keyword results using reciprocal rank fusion (RRF)
pageinteger

Page number (1-indexed)

page_sizeinteger

Results per page (max 100)

include_facetsboolean

Include facet breakdowns in the response showing result counts by court, jurisdiction, state, and year. Defaults to false. Set to true to enable.

Note: Facets are only available in keyword and hybrid modes (not semantic). In hybrid mode, facet counts reflect keyword search results only; semantic results are not included.

Example request

{
  "query": "breach of fiduciary duty",
  "filters": {
    "court_ids": [
      "ca9",
      "ca2"
    ],
    "jurisdictions": [
      "Federal Appellate",
      "State Supreme"
    ],
    "states": [
      "California",
      "New York"
    ],
    "publish_status": "published",
    "date_filed": {
      "start": "2020-01-01",
      "end": "2024-12-31"
    }
  }
}

Response

Search results

Example response

{
  "facets": {
    "note": "Facet counts reflect keyword search results only; semantic (Pinecone) results are not included in these counts."
  }
}
All 6 operations