---
title: "POST /v2/companies/{domain}/ask"
method: POST
path: "/v2/companies/{domain}/ask"
tags: ["companies"]
---

# POST /v2/companies/{domain}/ask

`POST /v2/companies/{domain}/ask`

## Request

- Base URL: `https://api.thecompaniesapi.com`
- URL: `https://api.thecompaniesapi.com/v2/companies/{domain}/ask`
- Auth: API key in header `Authorization`
- TypeScript: <https://skmtc.dev/thecompaniesapi/apis/the-companies-api/docs/v2/companies/:domain/ask/post.ts> (a function with typed inputs; its response is checked against the schema)

Ask a question about a company by its domain.

## Path parameters

- `domain` string, required

## Request body

- object
  - `explain` boolean
  - `fields` object[]
    - `description` string
    - `key` string, required
    - `type` 'array|boolean' | 'array|number' | 'array|string' | 'boolean' | 'number' | 'string', required
    - `values` string[]
  - `listId` number
  - `model` 'small' | 'large'
  - `query` SegmentationCondition[]
    - `attribute` 'about.businessType' | 'about.industries' | 'about.industry' | 'about.name' | 'about.totalEmployees' | 'about.yearFounded' | 'ai.search' | 'analytics.monthlyVisitors' | 'apps' | 'codes.naics' | 'codes.sic' | 'contacts' | 'domain.domain' | 'domain.tld' | 'finances.revenue' | 'finances.stockExchange' | 'locations.headquarters.city.code' | 'locations.headquarters.continent.code' | 'locations.headquarters.country.code' | 'locations.headquarters.county.code' | 'locations.headquarters.state.code' | 'meta.listIds' | 'meta.score' | 'meta.syncedAt' | 'socials' | 'socials.linkedin.id' | 'technologies.active' | 'technologies.categories' | 'urls', required
    - `blockedOperator` boolean
    - `operator` 'and' | 'or', required
    - `sign` 'equals' | 'exactEquals' | 'greater' | 'lower' | 'notEquals', required
    - `values` union[], required
      - union
        - string
        - number
  - `question` string, required

## Response `200`

Ask a question about a company by its domain.

- object
  - `meta` object, required
    - `cost` number, required
    - `model` 'small' | 'large', required
    - `score` number
  - `prompt` object, required: A natural language request made to the platform resolving to a specific action or search segment.
    - `companyId` number
    - `context` 'analytics' | 'api' | 'companies' | 'company' | 'documentation' | 'enrichment' | 'landing' | 'list' | 'similarity', required
    - `createdAt` string
    - `data` object
      - `all` boolean
      - `count` number
      - `domains` string[]
      - `explain` boolean
      - `fields` object[]
        - `description` string
        - `key` string, required
        - `type` 'array|boolean' | 'array|number' | 'array|string' | 'boolean' | 'number' | 'string', required
        - `values` string[]
      - `model` 'small' | 'large'
      - `names` string[]
      - `query` SegmentationCondition[]
        - `attribute` 'about.businessType' | 'about.industries' | 'about.industry' | 'about.name' | 'about.totalEmployees' | 'about.yearFounded' | 'ai.search' | 'analytics.monthlyVisitors' | 'apps' | 'codes.naics' | 'codes.sic' | 'contacts' | 'domain.domain' | 'domain.tld' | 'finances.revenue' | 'finances.stockExchange' | 'locations.headquarters.city.code' | 'locations.headquarters.continent.code' | 'locations.headquarters.country.code' | 'locations.headquarters.county.code' | 'locations.headquarters.state.code' | 'meta.listIds' | 'meta.score' | 'meta.syncedAt' | 'socials' | 'socials.linkedin.id' | 'technologies.active' | 'technologies.categories' | 'urls', required
        - `blockedOperator` boolean
        - `operator` 'and' | 'or', required
        - `sign` 'equals' | 'exactEquals' | 'greater' | 'lower' | 'notEquals', required
        - `values` union[], required
          - union
            - string
            - number
      - `question` string
      - `segmentation` boolean
    - `feature` 'ask' | 'cleanup' | 'enrich' | 'product' | 'search' | 'similar'
    - `hits` number
    - `id` number, required
    - `model` 'small' | 'large'
    - `prompt` string, required
    - `promptKey` string, required
    - `response` union, required
      - object
        - `all` boolean
        - `cost` number
        - `count` number
        - `domain` string
        - `error` string
        - `action` object
          - `cost` number
          - `data` object
            - `answer` LLMAnswer, required: An answer from a query made to the LLM.
              - …
            - `domains` string[]
            - `fields` object[], required
              - …
            - `job` 'ask-list', required
            - `query` SegmentationCondition[]
              - …
            - `question` string, required
          - `listId` number
          - `promptId` number, required
          - `status` 'pending', required
          - `type` 'jobs:request', required
        - `answer` object
          - `explanation` string
          - `output` object, required
          - `score` number, required
      - object
        - `all` boolean
        - `cost` number
        - `count` number
        - `domain` string
        - `error` string
        - `domains` string[]
        - `listId` number
        - `query` SegmentationCondition[]
          - `attribute` 'about.businessType' | 'about.industries' | 'about.industry' | 'about.name' | 'about.totalEmployees' | 'about.yearFounded' | 'ai.search' | 'analytics.monthlyVisitors' | 'apps' | 'codes.naics' | 'codes.sic' | 'contacts' | 'domain.domain' | 'domain.tld' | 'finances.revenue' | 'finances.stockExchange' | 'locations.headquarters.city.code' | 'locations.headquarters.continent.code' | 'locations.headquarters.country.code' | 'locations.headquarters.county.code' | 'locations.headquarters.state.code' | 'meta.listIds' | 'meta.score' | 'meta.syncedAt' | 'socials' | 'socials.linkedin.id' | 'technologies.active' | 'technologies.categories' | 'urls', required
          - `blockedOperator` boolean
          - `operator` 'and' | 'or', required
          - `sign` 'equals' | 'exactEquals' | 'greater' | 'lower' | 'notEquals', required
          - `values` union[], required
            - union
              - …
        - `action` object
          - `cost` number
          - `data` object
            - `answer` LLMAnswer, required: An answer from a query made to the LLM.
              - …
            - `domains` string[]
            - `fields` object[], required
              - …
            - `job` 'ask-list', required
            - `query` SegmentationCondition[]
              - …
            - `question` string, required
          - `listId` number
          - `promptId` number, required
          - `status` 'pending', required
          - `type` 'jobs:request', required
        - `answer` object
          - `explanation` string
          - `output` object, required
          - `score` number, required
      - object
        - `all` boolean
        - `cost` number
        - `count` number
        - `domain` string
        - `error` string
        - `domains` string[]
        - `action` object
          - `cost` number
          - `data` object
            - `answer` LLMAnswer, required: An answer from a query made to the LLM.
              - …
            - `domains` string[]
            - `fields` object[], required
              - …
            - `job` 'ask-list', required
            - `query` SegmentationCondition[]
              - …
            - `question` string, required
          - `listId` number
          - `promptId` number, required
          - `status` 'pending', required
          - `type` 'jobs:request', required
        - `answer` object
          - `explanation` string
          - `output` object, required
          - `score` number, required
    - `updatedAt` string

## Other responses

- `401`: The error message
- `403`: The error message
- `404`: The error message

---

[API](https://skmtc.dev/thecompaniesapi/apis/the-companies-api.md) - [All operations](https://skmtc.dev/thecompaniesapi/apis/the-companies-api/llms.txt) - [OpenAPI document](https://skmtc.dev/thecompaniesapi/apis/the-companies-api/revisions/f8bfc2d10b71?raw)
