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

# Company Search Count

> Count companies matching the same structured or natural-language inputs accepted by /company-search. Count endpoints do not accept pagination and do not return rows.



## OpenAPI

````yaml /openapi.json post /company-search-count
openapi: 3.0.3
info:
  title: Huntr — The GTM Intelligence API
  description: >-
    Give AI agents company, people, contact, and web intelligence through one
    API. Search accounts, build targeted lists, enrich leads, find contacts, and
    uncover buying signals.


    **Authentication:** Authenticated endpoints require an `x-api-key` header
    with your Huntr API key. Get a key by signing up via `POST /keys/create`.
    Public endpoints (pricing, sign-up, health) work without a key.


    **Rate limit:** 5 requests/second per API key on authenticated endpoints.
  version: 2.0.0
servers:
  - url: https://api.tryhuntr.com
security: []
tags:
  - name: Contact APIs
    description: >-
      Search people and enrich work email, phone, and reverse-email contact
      fields.
  - name: Company APIs
    description: >-
      Search companies and retrieve company-level attributes such as detected
      technology stack and active job postings.
  - name: Research APIs
    description: >-
      Research one company, person, team, or focused business question and
      return a sales-ready answer. Lite, standard, and deep tiers.
  - name: LinkedIn APIs
    description: >-
      LinkedIn URL discovery, company and profile pages, posts, reactions, and
      comments.
  - name: X APIs
    description: X profiles, posts, search results, and thread context.
  - name: Web APIs
    description: >-
      Find, scrape, and analyze pages on a domain, plus tech stack, domain
      contacts, and job postings.
  - name: Account
    description: >-
      Sign up, verify email, recover keys, check balance, view usage, add
      credits, and read the public pricing matrix.
  - name: System
    description: Health check.
paths:
  /company-search-count:
    post:
      tags:
        - Company APIs
      summary: Company Search Count
      description: >-
        Count companies matching the same structured or natural-language inputs
        accepted by /company-search. Count endpoints do not accept pagination
        and do not return rows.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                semantic_query:
                  type: string
                  description: >-
                    Natural-language description of companies to count. Mutually
                    exclusive with query.
                filters: 5a65f9a1-8f63-40ed-be76-2337a71bf7b5
                query: aefca82b-1326-456a-b45b-d89a2d19bb82
              description: >-
                Choose one company count input:

                - Natural-language mode: send semantic_query. Add filters only
                with semantic_query when you need hard constraints.

                - Structured-filter mode: send query when you already have exact
                filters.


                Do not send query and semantic_query together. Count endpoints
                do not accept pagination.
            examples:
              semantic:
                summary: Natural-language company count with a hard country filter
                description: >-
                  Natural-language mode: semantic_query describes the companies
                  to count. filters adds a hard country constraint.
                value:
                  semantic_query: US software companies building developer tools
                  filters:
                    country_code:
                      include:
                        - US
              structured:
                summary: Structured company count
                description: >-
                  Structured-filter mode: query contains exact filters supplied
                  by your code.
                value:
                  query:
                    industry:
                      include:
                        - Software Development
                    country_code:
                      include:
                        - US
      responses:
        '200':
          description: Company count returned.
          content:
            application/json:
              schema:
                type: object
                required:
                  - success
                  - request_id
                  - total
                  - price
                  - credits_remaining
                properties:
                  success:
                    type: boolean
                  request_id:
                    type: string
                  total:
                    type: number
                    description: Total matching companies for the submitted query.
                  price:
                    type: number
                    description: Always 0 for count endpoints.
                  credits_remaining:
                    type: number
                additionalProperties: false
              examples:
                count:
                  summary: Company count returned
                  value:
                    success: true
                    request_id: req_1746123456_csc1x2
                    total: 842
                    price: 0
                    credits_remaining: 5
        '400':
          description: Invalid input or pagination field supplied.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Invalid API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: >-
            A constrained lookup filter contains a value outside the accepted
            list.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QueryValidationError'
        '502':
          description: The natural-language query could not be translated safely.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - lang: Shell
          label: Structured filters
          source: |-
            curl --request POST \
              --url https://api.tryhuntr.com/company-search-count \
              --header 'x-api-key: <api-key>' \
              --header 'Content-Type: application/json' \
              --data '{
              "query": {
                "industry": {
                  "include": [
                    "Software Development"
                  ]
                },
                "country_code": {
                  "include": [
                    "US"
                  ]
                }
              }
            }'
        - lang: Shell
          label: Semantic query
          source: |-
            curl --request POST \
              --url https://api.tryhuntr.com/company-search-count \
              --header 'x-api-key: <api-key>' \
              --header 'Content-Type: application/json' \
              --data '{
              "semantic_query": "US software companies building developer tools",
              "filters": {
                "country_code": {
                  "include": [
                    "US"
                  ]
                }
              }
            }'
      x-code-samples:
        - lang: Shell
          label: Structured filters
          source: |-
            curl --request POST \
              --url https://api.tryhuntr.com/company-search-count \
              --header 'x-api-key: <api-key>' \
              --header 'Content-Type: application/json' \
              --data '{
              "query": {
                "industry": {
                  "include": [
                    "Software Development"
                  ]
                },
                "country_code": {
                  "include": [
                    "US"
                  ]
                }
              }
            }'
        - lang: Shell
          label: Semantic query
          source: |-
            curl --request POST \
              --url https://api.tryhuntr.com/company-search-count \
              --header 'x-api-key: <api-key>' \
              --header 'Content-Type: application/json' \
              --data '{
              "semantic_query": "US software companies building developer tools",
              "filters": {
                "country_code": {
                  "include": [
                    "US"
                  ]
                }
              }
            }'
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: string
          description: Human-readable error message.
      required:
        - error
    QueryValidationError:
      type: object
      description: >-
        Returned when a company-search query filter fails validation (invalid
        enum, unknown key, empty query).
      properties:
        error:
          type: string
          description: What went wrong.
        field:
          type: string
          description: >-
            JSON path to the bad filter, e.g. query.industry or
            query.headcountGrowth.timespan.
        invalid_values:
          type: array
          items:
            type: string
          description: Values you sent that were rejected.
        accepted_values:
          type: array
          items:
            type: string
          description: >-
            Full list of allowed values for that field (industry, type, or
            timespan).
      required:
        - error
        - field
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        Your Huntr API key. Get one at tryhuntr.com. Pass as x-api-key header on
        all authenticated requests.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.