# community.lexicon.media.book.searchEditions

> Search a provider's catalog using text and structured hints. Fuzzy matching, field interpretation, and ranking are provider-specific. This operation does not write user records.

- Kind: procedure
- Authority: book.media.lexicon.community
- Lexicon: 1
- Published by [biblio.livtet.olamaelcu.net](https://lexicon.garden/identity/did:plc:e2x3ihw2ntxt7pcgzmtu3abi), not the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:e2x3ihw2ntxt7pcgzmtu3abi/community.lexicon.media.book.searchEditions)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:e2x3ihw2ntxt7pcgzmtu3abi/community.lexicon.media.book.searchEditions/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:e2x3ihw2ntxt7pcgzmtu3abi/community.lexicon.media.book.searchEditions/analytics)

## Procedure (`community.lexicon.media.book.searchEditions`)

Type: procedure · POST

### Input (application/json)

- `author` (string): Author relevance hint, interpreted by the provider.
  - Constraints: minLength: 1
- `identifiers` (array): Structured identifier relevance hints; search matching and ranking are provider-defined.
  - Constraints: minLength: 1
  - `items` (ref)
    - Reference: `community.lexicon.media.book.defs#identifier`
- `language` (string): Local extension (not in the upstream books-wg PR): return only editions whose language claim matches this value. Matching is case-insensitive on the primary subtag, so `en` also matches `en-US`. Omit it for no language filter.
  - Constraints: minLength: 2, maxLength: 35
- `limit` (integer): Maximum number of editions to return in this page.
  - Constraints: minimum: 1, maximum: 100, default: 25
- `offset` (integer): Number of matching editions to skip in the provider's ordered result set.
  - Constraints: minimum: 0, default: 0
- `order` (string): Local extension (not in the upstream books-wg PR): direction for a `title` or `publishedYear` sort. Ignored when `sort` is `relevance`, whose ranking is provider-defined.
  - Constraints: default: "asc", knownValues: asc | desc
- `q` (string): Broad search text, which may describe a title, contributor, description, or identifier. Matching and ranking are provider-defined.
  - Constraints: minLength: 1
- `sort` (string): Local extension (not in the upstream books-wg PR): ordering of the result page. `title` is alphabetical by edition title; `publishedYear` orders by the edition's published date, and an edition with no usable year sorts last. `relevance` keeps the provider-defined ranking.
  - Constraints: default: "relevance", knownValues: relevance | title | publishedYear
- `title` (string): Title relevance hint, interpreted by the provider.
  - Constraints: minLength: 1

### Output (application/json)

- `schema` (ref)
  - Reference: `community.lexicon.media.book.defs#editionResults`

### Errors

- `InvalidQuery`: No nonblank q, title, author, or nonempty identifiers array was supplied.

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Search a provider's catalog using text and structured hints. Fuzzy matching, field interpretation, and ranking are provider-specific. This operation does not write user records.",
      "errors": [
        {
          "description": "No nonblank q, title, author, or nonempty identifiers array was supplied.",
          "name": "InvalidQuery"
        }
      ],
      "input": {
        "encoding": "application/json",
        "schema": {
          "description": "Supply at least one nonblank q, title, author, or a nonempty identifiers array. Providers enforce this cross-field requirement.",
          "properties": {
            "author": {
              "description": "Author relevance hint, interpreted by the provider.",
              "minLength": 1,
              "type": "string"
            },
            "identifiers": {
              "description": "Structured identifier relevance hints; search matching and ranking are provider-defined.",
              "items": {
                "ref": "community.lexicon.media.book.defs#identifier",
                "type": "ref"
              },
              "minLength": 1,
              "type": "array"
            },
            "language": {
              "description": "Local extension (not in the upstream books-wg PR): return only editions whose language claim matches this value. Matching is case-insensitive on the primary subtag, so `en` also matches `en-US`. Omit it for no language filter.",
              "maxLength": 35,
              "minLength": 2,
              "type": "string"
            },
            "limit": {
              "default": 25,
              "description": "Maximum number of editions to return in this page.",
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            },
            "offset": {
              "default": 0,
              "description": "Number of matching editions to skip in the provider's ordered result set.",
              "minimum": 0,
              "type": "integer"
            },
            "order": {
              "default": "asc",
              "description": "Local extension (not in the upstream books-wg PR): direction for a `title` or `publishedYear` sort. Ignored when `sort` is `relevance`, whose ranking is provider-defined.",
              "knownValues": [
                "asc",
                "desc"
              ],
              "type": "string"
            },
            "q": {
              "description": "Broad search text, which may describe a title, contributor, description, or identifier. Matching and ranking are provider-defined.",
              "minLength": 1,
              "type": "string"
            },
            "sort": {
              "default": "relevance",
              "description": "Local extension (not in the upstream books-wg PR): ordering of the result page. `title` is alphabetical by edition title; `publishedYear` orders by the edition's published date, and an edition with no usable year sorts last. `relevance` keeps the provider-defined ranking.",
              "knownValues": [
                "relevance",
                "title",
                "publishedYear"
              ],
              "type": "string"
            },
            "title": {
              "description": "Title relevance hint, interpreted by the provider.",
              "minLength": 1,
              "type": "string"
            }
          },
          "required": [],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "ref": "community.lexicon.media.book.defs#editionResults",
          "type": "ref"
        }
      },
      "type": "procedure"
    }
  },
  "description": "Search a provider's catalog using text and structured hints. Fuzzy matching, field interpretation, and ranking are provider-specific. This operation does not write user records.",
  "id": "community.lexicon.media.book.searchEditions",
  "lexicon": 1
}
```
