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

# Create company list export

> Runs a semantic company search with optional country, business model, and NAICS filters, persists the results as a dataset, and returns a short-lived signed download URL.



## OpenAPI

````yaml /openapi-v0.1.json post /v0.1/company-lists/exports
openapi: 3.0.0
info:
  title: PromptLoop API
  version: 0.1.0
  description: >-
    Run PromptLoop research tasks, manage asynchronous batches, and create
    company-list exports.
  contact:
    name: PromptLoop Support
    email: help@promptloop.com
    url: https://promptloop.com
servers:
  - url: https://api.promptloop.com
    description: Production
security: []
tags:
  - name: Tasks
    description: Create, inspect, test, and run research tasks.
  - name: Batches
    description: Run and manage asynchronous JSONL workloads.
  - name: Company Lists
    description: Search for companies and create downloadable dataset exports.
  - name: Team
    description: Inspect team usage and plan limits.
paths:
  /v0.1/company-lists/exports:
    post:
      tags:
        - Company Lists
      summary: Create company list export
      description: >-
        Runs a semantic company search with optional country, business model,
        and NAICS filters, persists the results as a dataset, and returns a
        short-lived signed download URL.
      operationId: createCompanyListExport
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CompanyListExportRequestDto'
      responses:
        '201':
          description: Successfully created company list export
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CompanyListExportResponseDto'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseDto'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseDto'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseDto'
      security:
        - x-api-key: []
components:
  schemas:
    CompanyListExportRequestDto:
      type: object
      properties:
        query:
          type: string
          description: Primary semantic search query used to find matching companies
          example: Developer tools startups serving fintech teams
        name:
          type: string
          description: Optional saved dataset/list name
          example: Fintech Devtools Companies
        description:
          type: string
          description: Optional saved dataset/list description
          example: Semantic company export for fintech-facing developer tools
        limit:
          type: integer
          description: Requested export size. Server-side max is 5000 rows.
          example: 500
          format: int32
        country:
          type: string
          description: Optional hard country filter using ISO-style country code
          example: US
        businessModel:
          type: string
          description: Optional hard business model filter. v1 supports b2b or b2c.
          enum:
            - b2b
            - b2c
          example: b2b
        naicsCodes:
          description: Optional hard include filter for one or more NAICS codes
          example:
            - 541511
            - 541512
          type: array
          items:
            type: integer
            format: int32
      required:
        - query
    CompanyListExportResponseDto:
      type: object
      properties:
        status:
          type: string
          enum:
            - success
            - error
          example: success
        data:
          $ref: '#/components/schemas/CompanyListExportDataDto'
        message:
          type: string
        error:
          allOf:
            - $ref: '#/components/schemas/ErrorDetailsDto'
          nullable: true
        request_id:
          type: string
          description: Correlation identifier for support and request tracing.
      required:
        - status
        - data
        - message
    ErrorResponseDto:
      type: object
      properties:
        status:
          type: string
          enum:
            - success
            - error
          example: error
        data:
          type: object
          nullable: true
        message:
          type: string
        error:
          allOf:
            - $ref: '#/components/schemas/ErrorDetailsDto'
          nullable: true
        request_id:
          type: string
          description: Correlation identifier for support and request tracing.
      required:
        - status
        - data
        - message
    CompanyListExportDataDto:
      type: object
      properties:
        datasetId:
          type: string
        datasetFileId:
          type: string
        fileId:
          type: string
        rowCount:
          type: integer
          format: int32
        downloadUrl:
          type: string
        downloadUrlExpiresInSeconds:
          type: integer
          format: int32
        searchCriteria:
          $ref: '#/components/schemas/CompanyListSearchCriteriaDto'
      required:
        - datasetId
        - datasetFileId
        - fileId
        - rowCount
        - downloadUrl
        - downloadUrlExpiresInSeconds
        - searchCriteria
    ErrorDetailsDto:
      type: object
      properties:
        code:
          type: number
        details:
          type: string
      required:
        - code
        - details
    CompanyListSearchCriteriaDto:
      type: object
      properties:
        query:
          type: string
        country:
          type: string
        businessModels:
          type: array
          items:
            type: string
        naicsCodes:
          type: array
          items:
            type: integer
            format: int32
        limit:
          type: integer
          format: int32
      required:
        - query
        - limit
  securitySchemes:
    x-api-key:
      type: apiKey
      in: header
      name: x-api-key

````