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

# Search an entity: filter to matching IDs (+ optional preview rows)



## OpenAPI

````yaml /api-reference/openapi.json post /api/v1/query/{entity}
openapi: 3.0.0
info:
  title: Tempo API
  description: >-
    The Tempo API gives you programmatic access to Deal Brain over HTTP.


    Authenticate with an API key passed as a Bearer token in the `Authorization`
    header.


    If you are building an AI agent rather than a traditional integration, the
    [MCP server](/integrations/mcp) exposes a richer surface and handles auth
    over OAuth.
  version: '1.0'
  contact: {}
servers:
  - url: https://findtempo.co
    description: Production
security: []
tags: []
paths:
  /api/v1/query/{entity}:
    post:
      tags:
        - Query
      summary: 'Search an entity: filter to matching IDs (+ optional preview rows)'
      operationId: querySearch
      parameters:
        - name: entity
          required: true
          in: path
          description: >-
            Curated entity name — see GET /query/describe for the set the host
            exposes.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/QuerySearchRequestDto'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QuerySearchResultDto'
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseDto'
        '401':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseDto'
        '404':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseDto'
      security:
        - api-key: []
components:
  schemas:
    QuerySearchRequestDto:
      type: object
      properties:
        filter:
          oneOf:
            - type: object
              properties:
                'on':
                  type: string
                  minLength: 1
                  description: >-
                    Column key or dotted relation path (e.g. "stage",
                    "account.name", "opportunityContacts.contact.last_name").
                    EAV fields resolve as columns.
                op:
                  type: string
                  enum:
                    - eq
                    - neq
                    - in
                    - nin
                    - gt
                    - gte
                    - lt
                    - lte
                    - between
                    - contains
                    - startswith
                    - endswith
                    - is_null
                    - is_not_null
                value: {}
              required:
                - 'on'
                - op
            - type: object
              properties:
                and:
                  type: array
                  items:
                    oneOf:
                      - type: object
                        properties:
                          'on':
                            type: string
                            minLength: 1
                            description: >-
                              Column key or dotted relation path (e.g. "stage",
                              "account.name",
                              "opportunityContacts.contact.last_name"). EAV
                              fields resolve as columns.
                          op:
                            type: string
                            enum:
                              - eq
                              - neq
                              - in
                              - nin
                              - gt
                              - gte
                              - lt
                              - lte
                              - between
                              - contains
                              - startswith
                              - endswith
                              - is_null
                              - is_not_null
                          value: {}
                        required:
                          - 'on'
                          - op
                      - type: object
                        properties:
                          and:
                            type: array
                            items:
                              type: object
                              properties:
                                'on':
                                  type: string
                                  minLength: 1
                                  description: >-
                                    Column key or dotted relation path (e.g.
                                    "stage", "account.name",
                                    "opportunityContacts.contact.last_name").
                                    EAV fields resolve as columns.
                                op:
                                  type: string
                                  enum:
                                    - eq
                                    - neq
                                    - in
                                    - nin
                                    - gt
                                    - gte
                                    - lt
                                    - lte
                                    - between
                                    - contains
                                    - startswith
                                    - endswith
                                    - is_null
                                    - is_not_null
                                value: {}
                              required:
                                - 'on'
                                - op
                        required:
                          - and
                      - type: object
                        properties:
                          or:
                            type: array
                            items:
                              type: object
                              properties:
                                'on':
                                  type: string
                                  minLength: 1
                                  description: >-
                                    Column key or dotted relation path (e.g.
                                    "stage", "account.name",
                                    "opportunityContacts.contact.last_name").
                                    EAV fields resolve as columns.
                                op:
                                  type: string
                                  enum:
                                    - eq
                                    - neq
                                    - in
                                    - nin
                                    - gt
                                    - gte
                                    - lt
                                    - lte
                                    - between
                                    - contains
                                    - startswith
                                    - endswith
                                    - is_null
                                    - is_not_null
                                value: {}
                              required:
                                - 'on'
                                - op
                        required:
                          - or
                      - type: object
                        properties:
                          not:
                            type: object
                            properties:
                              'on':
                                type: string
                                minLength: 1
                                description: >-
                                  Column key or dotted relation path (e.g.
                                  "stage", "account.name",
                                  "opportunityContacts.contact.last_name"). EAV
                                  fields resolve as columns.
                              op:
                                type: string
                                enum:
                                  - eq
                                  - neq
                                  - in
                                  - nin
                                  - gt
                                  - gte
                                  - lt
                                  - lte
                                  - between
                                  - contains
                                  - startswith
                                  - endswith
                                  - is_null
                                  - is_not_null
                              value: {}
                            required:
                              - 'on'
                              - op
                        required:
                          - not
              required:
                - and
            - type: object
              properties:
                or:
                  type: array
                  items:
                    oneOf:
                      - type: object
                        properties:
                          'on':
                            type: string
                            minLength: 1
                            description: >-
                              Column key or dotted relation path (e.g. "stage",
                              "account.name",
                              "opportunityContacts.contact.last_name"). EAV
                              fields resolve as columns.
                          op:
                            type: string
                            enum:
                              - eq
                              - neq
                              - in
                              - nin
                              - gt
                              - gte
                              - lt
                              - lte
                              - between
                              - contains
                              - startswith
                              - endswith
                              - is_null
                              - is_not_null
                          value: {}
                        required:
                          - 'on'
                          - op
                      - type: object
                        properties:
                          and:
                            type: array
                            items:
                              type: object
                              properties:
                                'on':
                                  type: string
                                  minLength: 1
                                  description: >-
                                    Column key or dotted relation path (e.g.
                                    "stage", "account.name",
                                    "opportunityContacts.contact.last_name").
                                    EAV fields resolve as columns.
                                op:
                                  type: string
                                  enum:
                                    - eq
                                    - neq
                                    - in
                                    - nin
                                    - gt
                                    - gte
                                    - lt
                                    - lte
                                    - between
                                    - contains
                                    - startswith
                                    - endswith
                                    - is_null
                                    - is_not_null
                                value: {}
                              required:
                                - 'on'
                                - op
                        required:
                          - and
                      - type: object
                        properties:
                          or:
                            type: array
                            items:
                              type: object
                              properties:
                                'on':
                                  type: string
                                  minLength: 1
                                  description: >-
                                    Column key or dotted relation path (e.g.
                                    "stage", "account.name",
                                    "opportunityContacts.contact.last_name").
                                    EAV fields resolve as columns.
                                op:
                                  type: string
                                  enum:
                                    - eq
                                    - neq
                                    - in
                                    - nin
                                    - gt
                                    - gte
                                    - lt
                                    - lte
                                    - between
                                    - contains
                                    - startswith
                                    - endswith
                                    - is_null
                                    - is_not_null
                                value: {}
                              required:
                                - 'on'
                                - op
                        required:
                          - or
                      - type: object
                        properties:
                          not:
                            type: object
                            properties:
                              'on':
                                type: string
                                minLength: 1
                                description: >-
                                  Column key or dotted relation path (e.g.
                                  "stage", "account.name",
                                  "opportunityContacts.contact.last_name"). EAV
                                  fields resolve as columns.
                              op:
                                type: string
                                enum:
                                  - eq
                                  - neq
                                  - in
                                  - nin
                                  - gt
                                  - gte
                                  - lt
                                  - lte
                                  - between
                                  - contains
                                  - startswith
                                  - endswith
                                  - is_null
                                  - is_not_null
                              value: {}
                            required:
                              - 'on'
                              - op
                        required:
                          - not
              required:
                - or
            - type: object
              properties:
                not:
                  oneOf:
                    - type: object
                      properties:
                        'on':
                          type: string
                          minLength: 1
                          description: >-
                            Column key or dotted relation path (e.g. "stage",
                            "account.name",
                            "opportunityContacts.contact.last_name"). EAV fields
                            resolve as columns.
                        op:
                          type: string
                          enum:
                            - eq
                            - neq
                            - in
                            - nin
                            - gt
                            - gte
                            - lt
                            - lte
                            - between
                            - contains
                            - startswith
                            - endswith
                            - is_null
                            - is_not_null
                        value: {}
                      required:
                        - 'on'
                        - op
                    - type: object
                      properties:
                        and:
                          type: array
                          items:
                            type: object
                            properties:
                              'on':
                                type: string
                                minLength: 1
                                description: >-
                                  Column key or dotted relation path (e.g.
                                  "stage", "account.name",
                                  "opportunityContacts.contact.last_name"). EAV
                                  fields resolve as columns.
                              op:
                                type: string
                                enum:
                                  - eq
                                  - neq
                                  - in
                                  - nin
                                  - gt
                                  - gte
                                  - lt
                                  - lte
                                  - between
                                  - contains
                                  - startswith
                                  - endswith
                                  - is_null
                                  - is_not_null
                              value: {}
                            required:
                              - 'on'
                              - op
                      required:
                        - and
                    - type: object
                      properties:
                        or:
                          type: array
                          items:
                            type: object
                            properties:
                              'on':
                                type: string
                                minLength: 1
                                description: >-
                                  Column key or dotted relation path (e.g.
                                  "stage", "account.name",
                                  "opportunityContacts.contact.last_name"). EAV
                                  fields resolve as columns.
                              op:
                                type: string
                                enum:
                                  - eq
                                  - neq
                                  - in
                                  - nin
                                  - gt
                                  - gte
                                  - lt
                                  - lte
                                  - between
                                  - contains
                                  - startswith
                                  - endswith
                                  - is_null
                                  - is_not_null
                              value: {}
                            required:
                              - 'on'
                              - op
                      required:
                        - or
                    - type: object
                      properties:
                        not:
                          type: object
                          properties:
                            'on':
                              type: string
                              minLength: 1
                              description: >-
                                Column key or dotted relation path (e.g.
                                "stage", "account.name",
                                "opportunityContacts.contact.last_name"). EAV
                                fields resolve as columns.
                            op:
                              type: string
                              enum:
                                - eq
                                - neq
                                - in
                                - nin
                                - gt
                                - gte
                                - lt
                                - lte
                                - between
                                - contains
                                - startswith
                                - endswith
                                - is_null
                                - is_not_null
                            value: {}
                          required:
                            - 'on'
                            - op
                      required:
                        - not
              required:
                - not
          description: >-
            Recursive filter expression: a leaf {on, op, value} or an and/or/not
            combinator of nested filter expressions. Nesting depth is unlimited
            at runtime; this doc schema shows two levels.
        sort:
          type: array
          items:
            type: object
            properties:
              field:
                type: string
                minLength: 1
              dir:
                type: string
                enum:
                  - asc
                  - desc
            required:
              - field
              - dir
        page:
          type: object
          properties:
            limit:
              type: integer
              minimum: 1
              maximum: 500
            offset:
              type: integer
              minimum: 0
        columns:
          type: array
          items:
            type: string
        preview:
          type: boolean
        include_sql:
          type: boolean
        scope:
          type: object
          properties:
            as:
              default: org
              type: string
              enum:
                - org
                - user
            user:
              type: string
              minLength: 1
              description: 'When as=user: a user id (uuid) or email.'
    QuerySearchResultDto:
      type: object
      properties:
        ids:
          type: array
          items:
            type: string
            format: uuid
        total:
          type: integer
        has_more:
          type: boolean
        preview:
          type: array
          items:
            type: object
            additionalProperties: {}
          description: >-
            Preview rows (when preview=true). Text-op matches add a _snippets
            entry per matched column.
        sql:
          type: string
        params:
          type: array
          items: {}
      required:
        - ids
        - total
        - has_more
    ErrorResponseDto:
      type: object
      properties:
        statusCode:
          type: integer
        message:
          oneOf:
            - type: string
            - type: array
              items:
                type: string
        error:
          type: string
        errors:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
      required:
        - statusCode
        - message
  securitySchemes:
    api-key:
      type: apiKey
      in: header
      name: Authorization
      description: API key passed as Bearer token (e.g. "Bearer your-api-key")

````