---
title: "GET /v2/prompts"
method: GET
path: "/v2/prompts"
tags: ["prompts"]
---

# GET /v2/prompts

`GET /v2/prompts`

## Request

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

Fetch prompts history.

## Query parameters

- `companyId` number
- `context` 'analytics' | 'api' | 'companies' | 'company' | 'documentation' | 'enrichment' | 'landing' | 'list' | 'similarity'
- `feature` 'ask' | 'cleanup' | 'enrich' | 'product' | 'search' | 'similar'
- `limit` number
- `listId` number
- `model` 'small' | 'large'
- `page` number
- `prompt` string
- `search` string
- `size` number

## Response `200`

Fetch prompts history.

- object
  - `meta` PaginationMeta, required: Metadata about a paginated or billed response.
    - `cost` number, required
    - `credits` number, required
    - `currentPage` number, required
    - `firstPage` number, required
    - `freeRequest` boolean, required
    - `lastPage` number, required
    - `maxScrollResultsReached` boolean
    - `perPage` number, required
    - `total` number, required
  - `prompts` Prompt[], required
    - `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
      - 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
        - `action` object
          - `cost` 0
          - `data` object
            - `domains` string[]
            - `job` 'cleanup-list', required
            - `query` SegmentationCondition[]
              - …
          - `listId` number
          - `promptId` number, required
          - `status` 'pending', required
          - `type` 'jobs:request', required
      - object
        - `all` boolean
        - `cost` number
        - `count` number
        - `domain` string
        - `error` string
        - `action` object
          - `cost` number
          - `data` object, required
            - `domains` string[]
            - `job` 'enrich-companies' | 'enrich-list', required
            - `query` SegmentationCondition[]
              - …
          - `listId` number
          - `promptId` number, required
          - `status` 'pending', required
          - `type` 'jobs:request', 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
              - …
      - object
        - `all` boolean
        - `cost` number
        - `count` number
        - `domain` string
        - `error` string
        - `domains` string[]
    - `updatedAt` string

## Other responses

- `401`: 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)
