---
title: "Document Search Within"
method: GET
path: "/api/document/{doc_id}/search"
---

# Document Search Within

`GET /api/document/{doc_id}/search`

## Request

- Base URL: `https://www.conceptio.app` (the document declares no server; this is the origin it was published from)
- URL: `https://www.conceptio.app/api/document/{doc_id}/search`
- Auth: none declared

Search inside a single document's extracted full text (snippets + offsets).

Additive Phase 7 query-to-section extraction: alongside the flat
`snippets` list, `sections` returns the WHOLE section (title + text) for
every section that contains a hit, bounded by `max_sections` and
`max_chars`. Access-aware like everything else here: extraction derives
from the served full text only, so metadata-only / license-restricted
rows return empty `sections` and `full_text_available: false`.

## Path parameters

- `doc_id` integer, required

## Query parameters

- `q` string, required
- `max_sections` integer
- `max_chars` integer

## Headers

- `authorization` string, nullable
- `x-api-key` string, nullable
- `x-license-key` string, nullable
- `x-principal` string, nullable

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/conceptio/apis/conceptio-open-knowledge-api.md) · [All operations](https://skmtc.dev/conceptio/apis/conceptio-open-knowledge-api/llms.txt) · [OpenAPI document](https://skmtc.dev/conceptio/apis/conceptio-open-knowledge-api/revisions/eb73efec13b4?raw)
