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

# Export analysis results as CSV

> Export the analysis results as CSV.

One row per sub-analysis. Per-prompt columns appear in the analysis'
canonical prompt order; `__argument` and `__sources` extras are emitted
next to their prompt's response column when the corresponding flag is set.



## OpenAPI

````yaml /openapi-web.json get /v1/analyses/{analysis_id}/results.csv
openapi: 3.1.0
info:
  title: GreetIncs API
  description: Analyze any business via API
  version: 0.1.0
servers: []
security: []
tags:
  - name: health
    x-displayName: Health
  - name: analyses
    x-displayName: Analyses
  - name: prompts
    x-displayName: Prompts
paths:
  /v1/analyses/{analysis_id}/results.csv:
    get:
      tags:
        - analyses
      summary: Export analysis results as CSV
      description: >-
        Export the analysis results as CSV.


        One row per sub-analysis. Per-prompt columns appear in the analysis'

        canonical prompt order; `__argument` and `__sources` extras are emitted

        next to their prompt's response column when the corresponding flag is
        set.
      operationId: exportAnalysisResultsCsv
      parameters:
        - name: analysis_id
          in: path
          required: true
          schema:
            type: string
            description: Analysis ID in TypeID format
            title: Analysis Id
          description: Analysis ID in TypeID format
        - name: delimiter
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/CsvDelimiter'
            description: Field delimiter.
            default: comma
          description: Field delimiter.
        - name: bom
          in: query
          required: false
          schema:
            type: boolean
            description: >-
              Prepend a UTF-8 BOM. Set `true` for downloads opened in
              Excel-on-Windows (which otherwise mis-detects encoding and garbles
              non-ASCII cells); leave `false` for programmatic consumers
              (pandas, Python `csv`, Node `csv-parse`, n8n).
            default: false
            title: Bom
          description: >-
            Prepend a UTF-8 BOM. Set `true` for downloads opened in
            Excel-on-Windows (which otherwise mis-detects encoding and garbles
            non-ASCII cells); leave `false` for programmatic consumers (pandas,
            Python `csv`, Node `csv-parse`, n8n).
        - name: include_argument
          in: query
          required: false
          schema:
            type: boolean
            description: >-
              Include the model's `argument` as `<prompt>__argument` next to
              each prompt response column.
            default: false
            title: Include Argument
          description: >-
            Include the model's `argument` as `<prompt>__argument` next to each
            prompt response column.
        - name: include_sources
          in: query
          required: false
          schema:
            type: boolean
            description: >-
              Include sources as `<prompt>__sources` (JSON-encoded list) next to
              each prompt response column.
            default: false
            title: Include Sources
          description: >-
            Include sources as `<prompt>__sources` (JSON-encoded list) next to
            each prompt response column.
        - name: prompts
          in: query
          required: false
          schema:
            type: array
            items:
              type: string
            description: >-
              Restrict columns to these prompt IDs. Header order still follows
              the analysis' canonical prompt order. Pass comma-separated
              (`?prompts=a,b`) — repeated form (`?prompts=a&prompts=b`) is also
              accepted.
            title: Prompts
          description: >-
            Restrict columns to these prompt IDs. Header order still follows the
            analysis' canonical prompt order. Pass comma-separated
            (`?prompts=a,b`) — repeated form (`?prompts=a&prompts=b`) is also
            accepted.
          style: form
          explode: false
        - name: statuses
          in: query
          required: false
          schema:
            type: array
            items:
              $ref: '#/components/schemas/DO_SubAnalysisStatus'
            description: >-
              Restrict rows to sub-analyses with one of these statuses. Pass
              comma-separated (`?statuses=completed,failed`).
            title: Statuses
          description: >-
            Restrict rows to sub-analyses with one of these statuses. Pass
            comma-separated (`?statuses=completed,failed`).
          style: form
          explode: false
        - name: filename
          in: query
          required: false
          schema:
            type: string
            maxLength: 120
            description: >-
              Optional download filename (without `.csv` extension). Empty
              string means use the server-generated default
              `<slug>-<short_id>-<UTC>.csv`. Sanitized server-side.
            default: ''
            title: Filename
          description: >-
            Optional download filename (without `.csv` extension). Empty string
            means use the server-generated default
            `<slug>-<short_id>-<UTC>.csv`. Sanitized server-side.
      responses:
        '200':
          description: Analysis results as CSV (one row per sub-analysis).
          content:
            text/csv:
              schema:
                type: string
                format: binary
          headers:
            Content-Disposition:
              description: >-
                Default: `attachment; filename="<slug>-<short_id>-<UTC>.csv"`
                (or the user-provided override). Includes RFC 5987
                `filename*=UTF-8''…` for non-ASCII analysis names.
              schema:
                type: string
              example: attachment; filename="my-analysis-abc12345-20260417T101200Z.csv"
            Cache-Control:
              description: >-
                Always `private, no-cache`. Results change on every rerun, so
                intermediaries must not serve a stale copy.
              schema:
                type: string
              example: private, no-cache
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/BadRequest'
        '500':
          $ref: '#/components/responses/InternalServerError'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    CsvDelimiter:
      type: string
      enum:
        - comma
        - semicolon
        - tab
      title: CsvDelimiter
      description: |-
        Delimiter choices exposed to API consumers.

        Enum (rather than a free char) keeps OpenAPI strict and avoids smuggling
        of e.g. newlines into the field separator.
    DO_SubAnalysisStatus:
      type: string
      enum:
        - pending
        - queued
        - in_progress
        - completed
        - problem
        - failed
        - skipped
      title: DO_SubAnalysisStatus
      description: Lifecycle of a per-domain execution inside an Analysis.
  responses:
    BadRequest:
      description: Request Validation Error
      content:
        application/problem+json:
          schema:
            additionalProperties: false
            description: >-
              Error response wrapper for problem details that can be returned
              directly from FastAPI.
            properties:
              response_type:
                default: ErrorResponse
                description: Always 'ErrorResponse' for error responses
                examples:
                  - ErrorResponse
                title: Response Type
                type: string
              data:
                additionalProperties: true
                description: Problem detail for validation errors.
                properties:
                  title:
                    default: Request Validation Error
                    title: Title
                    type: string
                  status:
                    default: 422
                    title: Status
                    type: integer
                  detail:
                    default: Request validation failed
                    title: Detail
                    type: string
                  instance:
                    anyOf:
                      - type: string
                      - type: 'null'
                    default: null
                    description: >-
                      A URI reference that identifies the specific occurrence of
                      the problem
                    examples:
                      - https://urlyourequest.com/path?query=value
                    title: Instance
                title: ValidationError
                type: object
            required:
              - data
            title: ErrorResponse
            type: object
    Unauthorized:
      description: Unauthorized
      content:
        application/problem+json:
          schema:
            additionalProperties: false
            description: >-
              Error response wrapper for problem details that can be returned
              directly from FastAPI.
            properties:
              response_type:
                default: ErrorResponse
                description: Always 'ErrorResponse' for error responses
                examples:
                  - ErrorResponse
                title: Response Type
                type: string
              data:
                additionalProperties: true
                description: Problem detail for authentication errors.
                properties:
                  title:
                    default: Unauthorized
                    title: Title
                    type: string
                  status:
                    default: 401
                    title: Status
                    type: integer
                  detail:
                    default: Authentication required
                    title: Detail
                    type: string
                  instance:
                    anyOf:
                      - type: string
                      - type: 'null'
                    default: null
                    description: >-
                      A URI reference that identifies the specific occurrence of
                      the problem
                    examples:
                      - https://urlyourequest.com/path?query=value
                    title: Instance
                title: UnauthorizedError
                type: object
            required:
              - data
            title: ErrorResponse
            type: object
    PaymentRequired:
      description: Payment Required
      content:
        application/problem+json:
          schema:
            additionalProperties: false
            description: >-
              Error response wrapper for problem details that can be returned
              directly from FastAPI.
            properties:
              response_type:
                default: ErrorResponse
                description: Always 'ErrorResponse' for error responses
                examples:
                  - ErrorResponse
                title: Response Type
                type: string
              data:
                additionalProperties: true
                description: Problem detail for payment required errors.
                properties:
                  title:
                    default: Payment Required
                    title: Title
                    type: string
                  status:
                    default: 402
                    title: Status
                    type: integer
                  detail:
                    default: Payment required
                    title: Detail
                    type: string
                  instance:
                    anyOf:
                      - type: string
                      - type: 'null'
                    default: null
                    description: >-
                      A URI reference that identifies the specific occurrence of
                      the problem
                    examples:
                      - https://urlyourequest.com/path?query=value
                    title: Instance
                title: PaymentRequiredError
                type: object
            required:
              - data
            title: ErrorResponse
            type: object
    Forbidden:
      description: Forbidden
      content:
        application/problem+json:
          schema:
            additionalProperties: false
            description: >-
              Error response wrapper for problem details that can be returned
              directly from FastAPI.
            properties:
              response_type:
                default: ErrorResponse
                description: Always 'ErrorResponse' for error responses
                examples:
                  - ErrorResponse
                title: Response Type
                type: string
              data:
                additionalProperties: true
                description: Problem detail for authorization errors.
                properties:
                  title:
                    default: Forbidden
                    title: Title
                    type: string
                  status:
                    default: 403
                    title: Status
                    type: integer
                  detail:
                    default: Access forbidden
                    title: Detail
                    type: string
                  instance:
                    anyOf:
                      - type: string
                      - type: 'null'
                    default: null
                    description: >-
                      A URI reference that identifies the specific occurrence of
                      the problem
                    examples:
                      - https://urlyourequest.com/path?query=value
                    title: Instance
                title: ForbiddenError
                type: object
            required:
              - data
            title: ErrorResponse
            type: object
    NotFound:
      description: Not Found
      content:
        application/problem+json:
          schema:
            additionalProperties: false
            description: >-
              Error response wrapper for problem details that can be returned
              directly from FastAPI.
            properties:
              response_type:
                default: ErrorResponse
                description: Always 'ErrorResponse' for error responses
                examples:
                  - ErrorResponse
                title: Response Type
                type: string
              data:
                additionalProperties: true
                description: Problem detail for resource not found errors.
                properties:
                  title:
                    default: Not Found
                    title: Title
                    type: string
                  status:
                    default: 404
                    title: Status
                    type: integer
                  detail:
                    default: Resource not found
                    title: Detail
                    type: string
                  instance:
                    anyOf:
                      - type: string
                      - type: 'null'
                    default: null
                    description: >-
                      A URI reference that identifies the specific occurrence of
                      the problem
                    examples:
                      - https://urlyourequest.com/path?query=value
                    title: Instance
                title: NotFoundError
                type: object
            required:
              - data
            title: ErrorResponse
            type: object
    InternalServerError:
      description: Internal Server Error
      content:
        application/problem+json:
          schema:
            additionalProperties: false
            description: >-
              Error response wrapper for problem details that can be returned
              directly from FastAPI.
            properties:
              response_type:
                default: ErrorResponse
                description: Always 'ErrorResponse' for error responses
                examples:
                  - ErrorResponse
                title: Response Type
                type: string
              data:
                additionalProperties: true
                description: Problem detail for internal server errors.
                properties:
                  title:
                    default: Internal Server Error
                    title: Title
                    type: string
                  status:
                    default: 500
                    title: Status
                    type: integer
                  detail:
                    default: Internal server error
                    title: Detail
                    type: string
                  instance:
                    anyOf:
                      - type: string
                      - type: 'null'
                    default: null
                    description: >-
                      A URI reference that identifies the specific occurrence of
                      the problem
                    examples:
                      - https://urlyourequest.com/path?query=value
                    title: Instance
                title: InternalServerError
                type: object
            required:
              - data
            title: ErrorResponse
            type: object
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: 'API Key for external integrations (format: greetincs_...)'

````