---
title: "Search Graph Documents"
method: POST
path: "/v1/graphs/{graph_id}/search"
tags: ["Search"]
---

# Search Graph Documents

`POST /v1/graphs/{graph_id}/search`

## 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/v1/graphs/{graph_id}/search`
- Auth: one of:
  - API key in header `X-API-Key`
  - HTTP bearer

Shared repositories require a subscription; subscription plan determines search rate limits.

## Path parameters

- `graph_id` string, required

## Request body

- SearchRequest: Request model for document search.
  - `query` string, required: Search query
  - `entity` string, nullable: Filter by CIK (exactly one filer), ticker, or entity name. A name, or a ticker that is also a word, is a loose word match that can include other filers
  - `form_type` string, nullable: Filter by SEC form type (10-K, 10-Q)
  - `section` string, nullable: Filter by section ID: an Item (item_1, item_1a, item_7, ...) or, for iXBRL disclosures, the element qname (us-gaap:GoodwillDisclosureTextBlock)
  - `element` string, nullable: Filter by XBRL element qname (e.g., us-gaap:Goodwill)
  - `source_type` string, nullable: Filter by source type (xbrl_textblock, narrative_section, ixbrl_disclosure, uploaded_doc, connection_doc)
  - `fiscal_year` integer, nullable: Filter by fiscal year
  - `date_from` string, nullable: Filter filings on or after date (YYYY-MM-DD)
  - `date_to` string, nullable: Filter filings on or before date (YYYY-MM-DD)
  - `semantic` boolean: Enable hybrid semantic search (BM25 + KNN). Default is BM25-only for speed.
  - `group` boolean: Fold hits from successive filings of the same filer and section into the best-ranked one; also_in_filings counts the others. Ignored when entity is set, where a filer's filing history is the point. A grouped page is drawn from the first 100 hits.
  - `size` integer: Max results to return
  - `offset` integer: Pagination offset
  - `snippet_chars` integer, nullable: Approximate snippet budget per hit in characters; the default is three highlight fragments of about 200

## Response `200`

Successful Response

- SearchResponse: Response model for document search.
  - `total` integer, required: Matching documents before any grouping, as OpenSearch counts them (it stops counting at 10,000). Not the number of distinct results a grouped search can page through.
  - `hits` SearchHit[], required
    - `document_id` string, required
    - `score` number, required
    - `source_type` string, required
    - `parent_document_id` string, nullable
    - `part` integer
    - `part_count` integer
    - `next_document_id` string, nullable
    - `entity_ticker` string, nullable
    - `entity_name` string, nullable
    - `section_label` string, nullable
    - `section_id` string, nullable
    - `element_qname` string, nullable
    - `filing_date` string, nullable
    - `fiscal_year` integer, nullable
    - `form_type` string, nullable
    - `accession_number` string, nullable
    - `xbrl_elements` string[], nullable
    - `snippet` string, required
    - `content_length` integer
    - `content_url` string, nullable
    - `document_title` string, nullable
    - `tags` string[], nullable
    - `folder` string, nullable
    - `also_in_filings` integer, nullable
  - `query` string, required
  - `graph_id` string, required

## Other responses

- `400`: Invalid request
- `401`: Authentication required
- `403`: Access denied
- `404`: Resource not found
- `422`: Validation Error
- `429`: Rate limit exceeded
- `500`: Internal server error
- `503`: Text search not available

---

[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)
