---
title: "Search Text"
method: POST
path: "/extensions/roboledger/{graph_id}/operations/search-text"
tags: ["RoboLedger: Analytical Views"]
---

# Search Text

`POST /extensions/roboledger/{graph_id}/operations/search-text`

## Request

- Base URL: `https://api.robosystems.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.robosystems.ai/extensions/roboledger/{graph_id}/operations/search-text`
- Auth: one of:
  - API key in header `X-API-Key`
  - HTTP bearer

Every place one filing's whole text says something, in document order, with the surrounding text and the section each match falls in; on no match, how often each word of the query occurs alone. The query is words matched in order across any spacing (`|` between alternative phrases, a trailing `*` for a stem), not a regular expression. On the SEC shared repository the text is the filing's own document — cover page, footnotes and exhibits included — so this finds what no indexed section carries. Same filing selection as `describe-filing`.

**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.

## Path parameters

- `graph_id` string, required

## Headers

- `Idempotency-Key` string, nullable

## Request body

- SearchTextRequest: Request for the search-text view op — words inside one filing.
  - `ticker` string, nullable: Company ticker. On shared-repository graphs (SEC) it resolves the latest matching filing when report_id is not given; ignored on tenant graphs.
  - `report_id` string, nullable: Specific report identifier. Required on tenant graphs; on SEC, optional when ticker is given.
  - `fiscal_year` integer, nullable: Narrow auto-resolution to this fiscal year focus
  - `period_type` string, nullable: Which forms auto-resolution considers: annual (10-K / 20-F / 40-F, the default) or quarterly (10-Q as well)
  - `accession` string, nullable: SEC only, with ticker: one filing by accession number — a report, or an 8-K from resolved_report.recent_releases
  - `form` string, nullable: SEC only, with ticker: '8-K' reads the latest earnings release, or with fiscal_year the latest filed in that calendar year
  - `query` string, required: Words matched in order across any spacing, case-insensitive; `|` between alternative phrases, a trailing `*` for a stem. Not a regular expression.
  - `window` integer, nullable: Characters of context around each match (default 300)
  - `max_hits` integer, nullable: Matches to return (default 10)

## Response `200`

Successful Response

- OperationEnvelopeSearchTextResponse
  - `operation` string, required: Kebab-case operation name
  - `operationId` string, required: op_-prefixed ULID for audit and SSE correlation
  - `status` 'completed' | 'pending' | 'failed', required: Operation lifecycle state
  - `result` SearchTextResponse: The search-text view op's result: matches in document order.
    - `graph_id` string, required
    - `report_id` string, nullable
    - `accession` string, nullable
    - `resolved_report` object, nullable
    - `query` string, required
    - `total` integer, required
    - `hits` object[]
    - `text_chars` integer, required
    - `text` string, nullable
    - `sections` object[], nullable
    - `sections_omitted` integer, nullable
    - `terms` object[], nullable
    - `note` string, nullable
  - `at` string, required: ISO-8601 UTC timestamp
  - `createdBy` string, nullable: User ID that initiated the operation
  - `idempotentReplay` boolean: True when this envelope came from the idempotency cache — the underlying command did not execute again. False on fresh executions.

## Other responses

- `400`: Invalid request
- `401`: Authentication required
- `403`: Access denied
- `404`: Resource not found
- `409`: Idempotency-Key conflict — key reused with different body
- `422`: Validation error
- `429`: Rate limit exceeded
- `500`: Internal server error

---

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