---
title: "Citation Phrase Matches"
method: POST
path: "/authorities/graph/citation-phrase-matches"
tags: ["authorities"]
---

# Citation Phrase Matches

`POST /authorities/graph/citation-phrase-matches`

## Request

- Base URL: `https://api.casenode.ai`
- URL: `https://api.casenode.ai/authorities/graph/citation-phrase-matches`
- Auth: none declared

Return the subgraph edges whose citing paragraph contains ``phrase``.

Two steps, mirroring the extracts UX's phrase semantics:

1. The Meili ``paragraphs`` index (quoted → true phrase match) yields the
   ``(authority_id, paragraph_ref)`` paragraphs that contain the phrase,
   scoped to the citing authorities in the node set. The per-chunk search is
   split adaptively (:func:`_phrase_matched_paragraphs`) so a common phrase
   matching more paragraphs than the index cap is never silently truncated.
2. Those are intersected with each edge's own citing ``paragraph_ref``:
   - a *pinpoint* edge lights only when its exact paragraph carries the
     phrase, so a phrase in some other paragraph never lights it;
   - a *non-pinpoint* edge (``paragraph_ref = "0"`` — the cover/preamble
     sentinel, whose short preamble is often not indexed as its own chunk)
     lights when the phrase appears anywhere in the citing case, which is the
     most we can assert without a real pinpoint.

Known limitation: ``paragraph_ref`` is not unique within a case for
restart-numbered judgments (ET/FTT renumber from 1 in each JUDGMENT/REASONS
section). An edge whose ref collides across sections lights if *either*
same-numbered paragraph carries the phrase — the stored ref alone cannot say
which section the citation is in. Fixing this precisely needs a
section-qualified ref recorded at ingest, not a query-time change.

Returns ``{"pairs": [[citing_id, cited_id], ...]}`` — the same id pairs the
client already keys edges by (``from→to``).

## Request body

- CitationPhraseMatchRequest: A phrase query over the citing paragraphs of an on-screen subgraph. ``ids`` is the node-id set already rendered (the bounded subgraph); the endpoint returns the citing→cited pairs whose *citing paragraph* contains the phrase, so the client can dim every other edge without a refetch.
  - `ids` string[]
  - `phrase` string

## Response `200`

Successful Response

- object

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/casenode/apis/casenode-api.md) · [All operations](https://skmtc.dev/casenode/apis/casenode-api/llms.txt) · [OpenAPI document](https://skmtc.dev/casenode/apis/casenode-api/revisions/5b2883d19661?raw)
