# com.livtet.listBookHighlights

> The passages most readers highlighted in one catalog edition, ranked by how many distinct readers quoted them. A passage is a `readingProgress` record's `annotation.quote`, normalised (whitespace collapsed, case folded) before it is counted, so two readers who highlighted the same sentence with different spacing and capitalisation land on one entry. A passage needs at least two distinct readers and at least 16 characters of text; nothing else decides membership.

- Kind: query
- Authority: livtet.com
- Lexicon: 1
- Published by [biblio.livtet.com](https://lexicon.garden/identity/did:plc:e2x3ihw2ntxt7pcgzmtu3abi), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:e2x3ihw2ntxt7pcgzmtu3abi/com.livtet.listBookHighlights)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:e2x3ihw2ntxt7pcgzmtu3abi/com.livtet.listBookHighlights/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:e2x3ihw2ntxt7pcgzmtu3abi/com.livtet.listBookHighlights/analytics)

## Query (`com.livtet.listBookHighlights`)

Type: query · GET

### Parameters (query string)

- `book` (string · at-uri, required): AT-URI of the catalog edition whose highlighted passages to rank.
- `limit` (integer): Maximum number of passages to return, most-highlighted first.
  - Constraints: minimum: 1, maximum: 25, default: 5

### Output (application/json)

- `passages` (array, required)
  - `items` (ref)
    - Reference: `#passage`

## #passage (`com.livtet.listBookHighlights#passage`)

Type: object

One passage, as the most recent reader to highlight it wrote it.

### Properties

- `createdAt` (string · datetime, required): When that newest record was first published.
- `locator` (string): That record's anchor, when it has one. A locator from another reader's format may not resolve in a local copy of the edition.
- `quote` (string, required): The passage, on the scale of the newest record that quotes it.
- `readers` (integer, required): How many distinct readers highlighted this passage.
  - Constraints: minimum: 2
- `uri` (string · at-uri, required): AT-URI of the newest `readingProgress` record quoting the passage.

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "passages": {
              "items": {
                "ref": "#passage",
                "type": "ref"
              },
              "type": "array"
            }
          },
          "required": [
            "passages"
          ],
          "type": "object"
        }
      },
      "parameters": {
        "properties": {
          "book": {
            "description": "AT-URI of the catalog edition whose highlighted passages to rank.",
            "format": "at-uri",
            "type": "string"
          },
          "limit": {
            "default": 5,
            "description": "Maximum number of passages to return, most-highlighted first.",
            "maximum": 25,
            "minimum": 1,
            "type": "integer"
          }
        },
        "required": [
          "book"
        ],
        "type": "params"
      },
      "type": "query"
    },
    "passage": {
      "description": "One passage, as the most recent reader to highlight it wrote it.",
      "properties": {
        "createdAt": {
          "description": "When that newest record was first published.",
          "format": "datetime",
          "type": "string"
        },
        "locator": {
          "description": "That record's anchor, when it has one. A locator from another reader's format may not resolve in a local copy of the edition.",
          "type": "string"
        },
        "quote": {
          "description": "The passage, on the scale of the newest record that quotes it.",
          "type": "string"
        },
        "readers": {
          "description": "How many distinct readers highlighted this passage.",
          "minimum": 2,
          "type": "integer"
        },
        "uri": {
          "description": "AT-URI of the newest `readingProgress` record quoting the passage.",
          "format": "at-uri",
          "type": "string"
        }
      },
      "required": [
        "quote",
        "readers",
        "uri",
        "createdAt"
      ],
      "type": "object"
    }
  },
  "description": "The passages most readers highlighted in one catalog edition, ranked by how many distinct readers quoted them. A passage is a `readingProgress` record's `annotation.quote`, normalised (whitespace collapsed, case folded) before it is counted, so two readers who highlighted the same sentence with different spacing and capitalisation land on one entry. A passage needs at least two distinct readers and at least 16 characters of text; nothing else decides membership.",
  "id": "com.livtet.listBookHighlights",
  "lexicon": 1
}
```
