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

# Search Export

> Export search results as a CSV file. Poll /search/status/{task_id} for a presigned download URL when complete.



## OpenAPI

````yaml https://api.sixtyfour.ai/openapi.json post /search/export
openapi: 3.1.0
info:
  title: Sixtyfour API
  description: >-
    Intelligence API for People and Entities. Deploy AI agents that investigate,
    resolve identities, map relationships, and surface risk signals
  contact:
    name: Sixtyfour
    url: https://sixtyfour.ai/
    email: support@sixtyfour.ai
  license:
    name: Proprietary
  version: 1.0.0
servers:
  - url: https://api.sixtyfour.ai
    description: Production
security: []
tags:
  - name: Enrichment
    description: Find and enrich emails, phones, and LinkedIn for people and companies.
  - name: org-chart
    description: Discover people inside a company and build org charts.
  - name: Search
    description: Run deep and filter searches over Sixtyfour's data.
  - name: Workflow
    description: Create, run, and manage enrichment workflows.
  - name: Workflow Schedules
    description: Create and manage recurring schedules for workflows.
  - name: Account
    description: Manage and inspect your account and credit balance.
  - name: Intelligence
    description: Verify identity attributes such as age using high-tier OSINT research.
paths:
  /search/export:
    post:
      tags:
        - Search
      summary: Search Export
      description: >-
        Export search results as a CSV file. Poll /search/status/{task_id} for a
        presigned download URL when complete.
      operationId: search_export_endpoint_search_export_post
      parameters:
        - name: x-api-key
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Api-Key
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SaveSearchRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SaveSearchResponse'
        '400':
          description: Request was rejected by the route's validation rules.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
              example:
                detail: Invalid request body
        '401':
          description: Missing or invalid API key.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
              example:
                detail: Invalid API key
        '402':
          description: >-
            Insufficient credits or no active subscription for this
            organization.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
              example:
                detail: Insufficient API credits
        '403':
          description: Forwarded user_id does not belong to caller's organization.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
              example:
                detail: Forwarded user_id does not belong to your organization.
        '404':
          description: Search task or export file not found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
              example:
                detail: Search not found or has no parsed_query.
        '409':
          description: Export workflow already running for this search.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
              example:
                detail: Export workflow is already running for this search.
        '422':
          description: Request body failed validation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '429':
          description: Rate limit exceeded.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
              example:
                detail: Rate limit exceeded
        '500':
          description: Unexpected server error. Retry with backoff.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
              example:
                detail: Internal server error
        '502':
          description: Upstream search backend returned an error.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
              example:
                detail: 'NL upstream transport error: connection reset by peer'
        '503':
          description: Search backend is not configured or unavailable.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
              example:
                detail: Company search backend endpoint is not configured
        '504':
          description: Upstream search backend timed out.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
              example:
                detail: Field values request timed out
components:
  schemas:
    SaveSearchRequest:
      properties:
        search_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Search Id
          description: >-
            Search history ID returned by a previous search. Replays only the
            query shape; pass exclusions again on this request if they should
            apply.
        parsed_query:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Parsed Query
          description: Structured filter set returned by a previous search.
        mode:
          type: string
          enum:
            - people
            - company
          title: Mode
          description: Search mode; inferred from DB when not set.
          default: company
        max_results:
          type: integer
          title: Max Results
          description: Maximum number of results to return across pages.
          default: 1000
        exclude_public_ids:
          anyOf:
            - items:
                type: string
              type: array
              maxItems: 1000
            - type: 'null'
          title: Exclude Public Ids
          description: >-
            People-mode inline identifiers to exclude from results, applied as a
            post-filter. Accepts LinkedIn public IDs or profile URLs. For
            company searches, use `exclude_entity_ids`. Max 1000.
        exclude_entity_ids:
          anyOf:
            - items:
                type: string
              type: array
              maxItems: 1000
            - type: 'null'
          title: Exclude Entity Ids
          description: >-
            Inline identifiers to exclude from results, applied as a
            post-filter. People mode: LinkedIn public IDs or profile URLs.
            Company mode: numeric LinkedIn company IDs, company URLs/slugs, or
            exact website domains (values that resolve to no or multiple
            companies are ignored). Max 1000.
        exclude_list_ids:
          anyOf:
            - items:
                type: string
              type: array
              maxItems: 10
            - type: 'null'
          title: Exclude List Ids
          description: >-
            Saved exclusion-list IDs to apply as a post-filter. Each list's
            entity type must match the search mode (person lists for people
            searches, company lists for company searches). Max 5 (10 for
            organizations with extended exclusion limits).
      type: object
      title: SaveSearchRequest
      description: Request to export search results as CSV.
    SaveSearchResponse:
      properties:
        task_id:
          type: string
          title: Task Id
          description: Async task ID; poll for status with this value.
        status:
          type: string
          title: Status
          description: Initial task status, typically 'queued'.
        message:
          type: string
          title: Message
          description: Human-readable status message.
      type: object
      required:
        - task_id
        - status
        - message
      title: SaveSearchResponse
      description: Response for an async save/export request.
    HTTPValidationError:
      title: HTTPValidationError
      type: object
      properties:
        detail:
          type: array
          items:
            $ref: '#/components/schemas/ValidationError'
      example:
        detail:
          - loc:
              - body
              - target_company
              - domain
            msg: Field required
            type: missing
            input: null
            ctx: {}
    ValidationError:
      title: ValidationError
      type: object
      required:
        - loc
        - msg
        - type
      properties:
        loc:
          type: array
          items:
            oneOf:
              - type: string
              - type: integer
          description: Path to the field that failed validation.
          example:
            - body
            - target_company
            - domain
        msg:
          type: string
          description: Human-readable error message.
          example: Field required
        type:
          type: string
          description: Error code (e.g. 'missing', 'value_error').
          example: missing
        input:
          description: The offending input value (any type, may be null).
          nullable: true
          example: null
        ctx:
          type: object
          description: Optional error context.
          additionalProperties: true
          example: {}

````