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

# GET /v2/companies/count

`GET /v2/companies/count`

## Request

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

Get the count of companies using a segmentation query.

## Query parameters

- `actionId` 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
      - string
      - number
- `search` string
- `searchFields` string[]

## Response `200`

Get the count of companies using a segmentation query.

- object
  - `count` number, required

## Other responses

- `401`: The error message
- `403`: 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)
