Files
bookhoard/docs/developer/api/media-items/search_media_items.md
T
john-okeefe b44e4e4709 docs: remove Phase X placeholders from API documentation
Clean up API documentation files by removing Phase X references:

Remove 'API Explorer will be inserted here in Phase X' placeholders from:
- 70+ API endpoint documentation files
- Authentication endpoints (login, logout, register, refresh)
- User endpoints (profile, settings, password)
- Device endpoints (registration, sync, shelves)
- Library endpoints (CRUD, folders, visibility)
- Media endpoints (items, progress, highlights, notes)
- Admin endpoints (users, analytics)
- Sync endpoints (Kobo, KOReader)
- OPDS endpoints
- Scanner endpoints
- Queue endpoints

These placeholders were from planning documents and have no meaning
to API consumers. The documentation is now clean and ready for use.
2026-02-13 21:50:44 -05:00

1.5 KiB

Search Media Items

Search for media items by title, author, series, tags, or contributors.

Note: Search is case-insensitive and punctuation-agnostic. The search query is matched against normalized tags_search and contributors_search fields, allowing users to find matches regardless of casing or punctuation.

Examples:

  • Search "acme corp" finds items with "ACME CORP." or "Acme Corp"
  • Search "oreilly" finds items with "O'Reilly Media" or "OReilly Media"
  • Search "science fiction" finds items with "Science-Fiction" or "science-fiction"

Endpoint: GET /api/media-items/search Auth: Required

Query Parameters

Parameter Type Required Description
q string Yes Search query (minimum 2 characters)
limit integer No Number of results (default 20)
offset integer No Number to skip

Request Headers

Header Type Required Description
Authorization string Yes Bearer token

Example Request

GET /api/media-items/search?q=Harry+Potter&limit=20&offset=0
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...

Response (200 OK)

{
  "results": [
    {
      "id": "uuid",
      "title": "Book Title",
      "author": "Author Name",
      "match_score": 0.95
    }
  ],
  "total": 15
}

Error Responses

Code Description
400 Invalid search query (too short)
401 Invalid or expired token