> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pnbr.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Search graph

> Search the project graph for nodes and edges.

**Operation ID:** `http.graph.search`

```http theme={null}
POST /v1/orgs/{org}/projects/{project}/graph/search
```


## OpenAPI

````yaml openapi.json POST /v1/orgs/{org}/projects/{project}/graph/search
openapi: 3.1.0
info:
  title: Penumbra API
  version: v1
  description: >-
    HTTP reference for Files, search, extraction, reviews, Graph, Shapes and
    sharing.
servers:
  - url: https://api.pnbr.io
    description: Penumbra API
security: []
paths:
  /v1/orgs/{org}/projects/{project}/graph/search:
    post:
      tags:
        - Search and citations
      summary: Search graph
      description: >-
        Search the project graph for nodes and edges.


        Product guidance: [Search](/concepts/search), [Passage and
        citation](/concepts/passage), [Context](/concepts/context).
      operationId: http.graph.search
      parameters:
        - name: org
          in: path
          required: true
          schema:
            type: string
        - name: project
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/http_graph_search_request'
      responses:
        2XX:
          description: Success.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/http_graph_search_response'
      security:
        - bearerAuth: []
components:
  schemas:
    http_graph_search_request:
      type: object
      properties:
        query:
          type: string
          minLength: 1
          maxLength: 512
        mode:
          default: lexical
          type: string
          enum:
            - lexical
            - semantic
            - hybrid
        resource_kinds:
          default:
            - node
            - edge
          minItems: 1
          maxItems: 2
          type: array
          items:
            type: string
            enum:
              - node
              - edge
        types:
          minItems: 1
          maxItems: 50
          type: array
          items:
            type: string
            minLength: 1
            maxLength: 256
        resource_ids:
          minItems: 1
          maxItems: 100
          type: array
          items:
            type: string
            format: uuid
            pattern: >-
              ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
        property_filters:
          default: []
          maxItems: 8
          type: array
          items:
            oneOf:
              - type: object
                properties:
                  key:
                    type: string
                  op:
                    type: string
                    const: eq
                  value:
                    anyOf:
                      - type: string
                      - type: number
                      - type: boolean
                      - type: 'null'
                required:
                  - key
                  - op
                  - value
                additionalProperties: false
              - type: object
                properties:
                  key:
                    type: string
                  op:
                    type: string
                    const: in
                  values:
                    minItems: 1
                    maxItems: 50
                    type: array
                    items:
                      anyOf:
                        - type: string
                        - type: number
                        - type: boolean
                        - type: 'null'
                required:
                  - key
                  - op
                  - values
                additionalProperties: false
              - type: object
                properties:
                  key:
                    type: string
                  op:
                    type: string
                    const: exists
                  value:
                    type: boolean
                required:
                  - key
                  - op
                  - value
                additionalProperties: false
              - type: object
                properties:
                  key:
                    type: string
                  op:
                    type: string
                    const: contains
                  value:
                    anyOf:
                      - type: string
                      - type: number
                      - type: boolean
                      - type: 'null'
                required:
                  - key
                  - op
                  - value
                additionalProperties: false
              - type: object
                properties:
                  key:
                    type: string
                  op:
                    type: string
                    enum:
                      - gt
                      - gte
                      - lt
                      - lte
                  value:
                    type: number
                required:
                  - key
                  - op
                  - value
                additionalProperties: false
        limit:
          default: 20
          type: integer
          minimum: 1
          maximum: 100
        rerank:
          default: auto
          type: string
          enum:
            - auto
            - 'off'
            - required
      required:
        - query
      additionalProperties: false
    http_graph_search_response:
      type: object
      properties:
        data:
          type: object
          properties:
            mode:
              type: string
              enum:
                - lexical
                - semantic
                - hybrid
            effective_mode:
              type: string
              enum:
                - lexical
                - semantic
                - hybrid
            lexical:
              type: object
              properties:
                readiness:
                  type: string
                  enum:
                    - ready
                    - partial
                    - unavailable
                coverage:
                  type: string
                  enum:
                    - full
                    - partial
                    - none
                eligible_resources:
                  type: integer
                  minimum: 0
                  maximum: 9007199254740991
                ready_resources:
                  type: integer
                  minimum: 0
                  maximum: 9007199254740991
                excluded_resources:
                  type: integer
                  minimum: 0
                  maximum: 9007199254740991
                degradation:
                  type: string
                  enum:
                    - none
                    - lexical_coverage_partial
                    - lexical_coverage_none
              required:
                - readiness
                - coverage
                - eligible_resources
                - ready_resources
                - excluded_resources
                - degradation
              additionalProperties: false
            semantic:
              type: object
              properties:
                profile:
                  anyOf:
                    - type: object
                      properties:
                        key:
                          type: string
                          minLength: 1
                          maxLength: 128
                        digest:
                          type: string
                          pattern: ^[0-9a-f]{64}$
                        provider:
                          type: string
                          minLength: 1
                          maxLength: 128
                        model:
                          type: string
                          minLength: 1
                          maxLength: 256
                        dimensions:
                          type: number
                          const: 1536
                      required:
                        - key
                        - digest
                        - provider
                        - model
                        - dimensions
                      additionalProperties: false
                    - type: 'null'
                readiness:
                  type: string
                  enum:
                    - ready
                    - partial
                    - unavailable
                coverage:
                  type: string
                  enum:
                    - full
                    - partial
                    - none
                eligible_resources:
                  type: integer
                  minimum: 0
                  maximum: 9007199254740991
                ready_resources:
                  type: integer
                  minimum: 0
                  maximum: 9007199254740991
                excluded_resources:
                  type: integer
                  minimum: 0
                  maximum: 9007199254740991
                query_embedding:
                  type: string
                  enum:
                    - not_requested
                    - available
                    - unavailable
                degradation:
                  type: string
                  enum:
                    - none
                    - semantic_unavailable
                    - semantic_coverage_partial
                    - semantic_coverage_none
              required:
                - profile
                - readiness
                - coverage
                - eligible_resources
                - ready_resources
                - excluded_resources
                - query_embedding
                - degradation
              additionalProperties: false
            warnings:
              maxItems: 10
              type: array
              items:
                type: string
                enum:
                  - lexical_coverage_partial
                  - lexical_coverage_none
                  - semantic_unavailable
                  - semantic_coverage_partial
                  - semantic_coverage_none
                  - reranker_disabled
                  - reranker_bypassed
                  - reranker_unavailable
                  - reranker_invalid_response
                  - reranker_partial_response
            reranker:
              type: object
              properties:
                requested:
                  type: string
                  enum:
                    - auto
                    - 'off'
                    - required
                profile_revision:
                  type: string
                  pattern: ^sha256:[0-9a-f]{64}$
                applied:
                  type: boolean
                partial:
                  type: boolean
                provider:
                  anyOf:
                    - type: string
                    - type: 'null'
                model:
                  anyOf:
                    - type: string
                    - type: 'null'
                submitted_count:
                  type: integer
                  minimum: 0
                  maximum: 9007199254740991
                returned_count:
                  type: integer
                  minimum: 0
                  maximum: 9007199254740991
                fallback_reason:
                  anyOf:
                    - type: string
                      enum:
                        - reranker_disabled
                        - reranker_bypassed
                        - reranker_unavailable
                        - reranker_invalid_response
                        - reranker_partial_response
                    - type: 'null'
                fallback_cause:
                  anyOf:
                    - type: string
                      enum:
                        - rate_limited
                        - timeout
                        - auth
                        - invalid_request
                        - server
                        - transport
                        - invalid_response
                        - circuit_open
                        - unknown
                    - type: 'null'
              required:
                - requested
                - profile_revision
                - applied
                - partial
                - provider
                - model
                - submitted_count
                - returned_count
                - fallback_reason
                - fallback_cause
              additionalProperties: false
            hits:
              maxItems: 100
              type: array
              items:
                type: object
                properties:
                  resource_kind:
                    type: string
                    enum:
                      - node
                      - edge
                  id:
                    type: string
                    format: uuid
                    pattern: >-
                      ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                  revision:
                    type: integer
                    exclusiveMinimum: 0
                    maximum: 9007199254740991
                  type:
                    type: string
                    minLength: 1
                    maxLength: 256
                  display:
                    anyOf:
                      - type: string
                        maxLength: 1024
                      - type: 'null'
                  snippet:
                    type: string
                    maxLength: 8192
                  rank:
                    type: integer
                    exclusiveMinimum: 0
                    maximum: 9007199254740991
                  lexical_rank:
                    anyOf:
                      - type: integer
                        exclusiveMinimum: 0
                        maximum: 9007199254740991
                      - type: 'null'
                  lexical_score:
                    anyOf:
                      - type: number
                        minimum: 0
                      - type: 'null'
                  semantic_rank:
                    anyOf:
                      - type: integer
                        exclusiveMinimum: 0
                        maximum: 9007199254740991
                      - type: 'null'
                  semantic_score:
                    anyOf:
                      - type: number
                      - type: 'null'
                  rrf_score:
                    anyOf:
                      - type: number
                        exclusiveMinimum: 0
                      - type: 'null'
                  fallback_provenance:
                    type: string
                    const: deterministic_source_text
                  resource_url:
                    type: string
                    pattern: ^\/v1\/(nodes|edges)\/[0-9a-f-]{36}$
                  base_rank:
                    type: integer
                    exclusiveMinimum: 0
                    maximum: 9007199254740991
                  rerank_score:
                    anyOf:
                      - type: number
                      - type: 'null'
                required:
                  - resource_kind
                  - id
                  - revision
                  - type
                  - display
                  - snippet
                  - rank
                  - lexical_rank
                  - lexical_score
                  - semantic_rank
                  - semantic_score
                  - rrf_score
                  - fallback_provenance
                  - resource_url
                  - base_rank
                  - rerank_score
                additionalProperties: false
          required:
            - mode
            - effective_mode
            - lexical
            - semantic
            - warnings
            - reranker
            - hits
          additionalProperties: false
      required:
        - data
      additionalProperties: false
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.