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

# Query a dataset

> Select, filter, sort, and paginate rows from one dataset.



## OpenAPI

````yaml https://api.soriaanalytics.com/v1/openapi.json POST /datasets/{dataset}/query
openapi: 3.1.0
info:
  title: Soria Data API
  description: >-
    Governed data query API. `GET /catalog` is the canonical dataset
    documentation: its schemas, grain, methodology, refresh cadence, and source
    provenance are generated from dbt on every relevant change. `POST
    /search/documents` searches the public source-document corpus behind those
    datasets. For larger result sets, create a private CSV (default) or Parquet
    export, poll its status URL, and use the short-lived download URL once it is
    ready.
  version: 1.0.0
servers:
  - url: /v1
security: []
paths:
  /datasets/{dataset}/query:
    post:
      tags:
        - data
      summary: Dataset Query
      description: Filter, sort, select, and paginate one dataset without accepting SQL.
      operationId: dataset_query_datasets__dataset__query_post
      parameters:
        - name: dataset
          in: path
          required: true
          schema:
            type: string
            title: Dataset
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DatasetQueryRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DatasetQueryResult'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    DatasetQueryRequest:
      properties:
        columns:
          items:
            type: string
          type: array
          title: Columns
          description: Columns to return. Empty means every customer-visible column.
        filters:
          items:
            $ref: '#/components/schemas/DatasetFilter'
          type: array
          maxItems: 20
          title: Filters
          description: Structured filters combined with AND.
        order_by:
          items:
            $ref: '#/components/schemas/DatasetSort'
          type: array
          maxItems: 10
          title: Order By
          description: Sort keys. The dbt grain is appended for deterministic pagination.
        limit:
          type: integer
          maximum: 1000
          minimum: 1
          title: Limit
          description: Maximum rows per page.
          default: 100
        offset:
          type: integer
          maximum: 100000
          minimum: 0
          title: Offset
          description: Zero-based row offset.
          default: 0
      type: object
      title: DatasetQueryRequest
    DatasetQueryResult:
      properties:
        columns:
          items:
            type: string
          type: array
          title: Columns
          description: Returned column names in row order.
        rows:
          items:
            items: {}
            type: array
          type: array
          title: Rows
          description: JSON-compatible result rows.
        row_count:
          type: integer
          title: Row Count
          description: Rows returned in this page.
        limit:
          type: integer
          title: Limit
          description: Requested page size.
        offset:
          type: integer
          title: Offset
          description: Requested zero-based offset.
        has_more:
          type: boolean
          title: Has More
          description: Whether another page is available.
        next_offset:
          anyOf:
            - type: integer
            - type: 'null'
          title: Next Offset
          description: Offset for the next page, when available.
        omitted_columns:
          items:
            type: string
          type: array
          title: Omitted Columns
          description: Licensed columns withheld from this caller.
      type: object
      required:
        - columns
        - rows
        - row_count
        - limit
        - offset
        - has_more
        - next_offset
      title: DatasetQueryResult
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    DatasetFilter:
      properties:
        column:
          type: string
          title: Column
          description: Customer-visible dataset column.
        operator:
          type: string
          enum:
            - eq
            - ne
            - gt
            - gte
            - lt
            - lte
            - in
            - contains
            - is_null
          title: Operator
          description: Structured comparison operator.
        value:
          anyOf:
            - {}
            - type: 'null'
          title: Value
          description: Comparison value. Use an array with `in`; omit it with `is_null`.
      type: object
      required:
        - column
        - operator
      title: DatasetFilter
    DatasetSort:
      properties:
        column:
          type: string
          title: Column
          description: Customer-visible dataset column.
        direction:
          type: string
          enum:
            - asc
            - desc
          title: Direction
          description: Sort direction.
          default: asc
      type: object
      required:
        - column
      title: DatasetSort
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````