> ## 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.

# Person Search Count

> Count people matching the same structured, natural-language, and availability-filter inputs accepted by /person-search. Count endpoints do not accept pagination and do not return rows.



## OpenAPI

````yaml /openapi.json post /person-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:
  /person-search-count:
    post:
      tags:
        - Contact APIs
      summary: Person Search Count
      description: >-
        Count people matching the same structured, natural-language, and
        availability-filter inputs accepted by /person-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 people to count. Mutually
                    exclusive with query.
                filters:
                  type: object
                  description: >-
                    Hard filters for semantic_query. Same supported fields as
                    query.
                  properties:
                    title:
                      type: object
                      description: Employee job title.
                      properties:
                        include:
                          type: array
                          items:
                            type: string
                          description: Values to match.
                        exclude:
                          type: array
                          items:
                            type: string
                          description: Values to exclude.
                    locality:
                      type: object
                      description: Person locality, such as city, state, or country.
                      properties:
                        include:
                          type: array
                          items:
                            type: string
                          description: Values to match.
                        exclude:
                          type: array
                          items:
                            type: string
                          description: Values to exclude.
                    company_name:
                      type: object
                      description: Current employer name.
                      properties:
                        include:
                          type: array
                          items:
                            type: string
                          description: Values to match.
                        exclude:
                          type: array
                          items:
                            type: string
                          description: Values to exclude.
                    company_url:
                      type: object
                      description: Company website or domain.
                      properties:
                        include:
                          type: array
                          items:
                            type: string
                          description: Values to match.
                        exclude:
                          type: array
                          items:
                            type: string
                          description: Values to exclude.
                    city:
                      type: object
                      description: Company city.
                      properties:
                        include:
                          type: array
                          items:
                            type: string
                          description: Values to match.
                        exclude:
                          type: array
                          items:
                            type: string
                          description: Values to exclude.
                    country_code:
                      type: object
                      description: Alpha-2 country code.
                      properties:
                        include:
                          type: array
                          items:
                            type: string
                          description: Values to match.
                        exclude:
                          type: array
                          items:
                            type: string
                          description: Values to exclude.
                    industry_linkedin:
                      type: object
                      description: Company industry label.
                      properties:
                        include:
                          type: array
                          items:
                            type: string
                          description: Values to match.
                        exclude:
                          type: array
                          items:
                            type: string
                          description: Values to exclude.
                    number_of_employees:
                      type: object
                      description: Company employee range label.
                      properties:
                        include:
                          type: array
                          items:
                            type: string
                          description: Values to match.
                        exclude:
                          type: array
                          items:
                            type: string
                          description: Values to exclude.
                    revenue:
                      type: object
                      description: Company revenue range label.
                      properties:
                        include:
                          type: array
                          items:
                            type: string
                          description: Values to match.
                        exclude:
                          type: array
                          items:
                            type: string
                          description: Values to exclude.
                    bio_li:
                      type: object
                      description: Company LinkedIn About text.
                      properties:
                        include:
                          type: array
                          items:
                            type: string
                          description: Values to match.
                        exclude:
                          type: array
                          items:
                            type: string
                          description: Values to exclude.
                    services:
                      type: object
                      description: Company service label.
                      properties:
                        include:
                          type: array
                          items:
                            type: string
                          description: Values to match.
                        exclude:
                          type: array
                          items:
                            type: string
                          description: Values to exclude.
                  additionalProperties: false
                query:
                  type: object
                  description: >-
                    At least one supported filter required unless has_email or
                    has_phone is true. Use non-empty include and/or exclude
                    arrays.
                  properties:
                    title:
                      type: object
                      description: Employee job title.
                      properties:
                        include:
                          type: array
                          items:
                            type: string
                          description: Values to match.
                        exclude:
                          type: array
                          items:
                            type: string
                          description: Values to exclude.
                    locality:
                      type: object
                      description: Person locality, such as city, state, or country.
                      properties:
                        include:
                          type: array
                          items:
                            type: string
                          description: Values to match.
                        exclude:
                          type: array
                          items:
                            type: string
                          description: Values to exclude.
                    company_name:
                      type: object
                      description: Current employer name.
                      properties:
                        include:
                          type: array
                          items:
                            type: string
                          description: Values to match.
                        exclude:
                          type: array
                          items:
                            type: string
                          description: Values to exclude.
                    company_url:
                      type: object
                      description: Company website or domain.
                      properties:
                        include:
                          type: array
                          items:
                            type: string
                          description: Values to match.
                        exclude:
                          type: array
                          items:
                            type: string
                          description: Values to exclude.
                    city:
                      type: object
                      description: Company city.
                      properties:
                        include:
                          type: array
                          items:
                            type: string
                          description: Values to match.
                        exclude:
                          type: array
                          items:
                            type: string
                          description: Values to exclude.
                    country_code:
                      type: object
                      description: Alpha-2 country code.
                      properties:
                        include:
                          type: array
                          items:
                            type: string
                          description: Values to match.
                        exclude:
                          type: array
                          items:
                            type: string
                          description: Values to exclude.
                    industry_linkedin:
                      type: object
                      description: Company industry label.
                      properties:
                        include:
                          type: array
                          items:
                            type: string
                          description: Values to match.
                        exclude:
                          type: array
                          items:
                            type: string
                          description: Values to exclude.
                    number_of_employees:
                      type: object
                      description: Company employee range label.
                      properties:
                        include:
                          type: array
                          items:
                            type: string
                          description: Values to match.
                        exclude:
                          type: array
                          items:
                            type: string
                          description: Values to exclude.
                    revenue:
                      type: object
                      description: Company revenue range label.
                      properties:
                        include:
                          type: array
                          items:
                            type: string
                          description: Values to match.
                        exclude:
                          type: array
                          items:
                            type: string
                          description: Values to exclude.
                    bio_li:
                      type: object
                      description: Company LinkedIn About text.
                      properties:
                        include:
                          type: array
                          items:
                            type: string
                          description: Values to match.
                        exclude:
                          type: array
                          items:
                            type: string
                          description: Values to exclude.
                    services:
                      type: object
                      description: Company service label.
                      properties:
                        include:
                          type: array
                          items:
                            type: string
                          description: Values to match.
                        exclude:
                          type: array
                          items:
                            type: string
                          description: Values to exclude.
                  additionalProperties: false
                has_email:
                  type: boolean
                  description: When true, only count contacts with email data available.
                has_phone:
                  type: boolean
                  description: When true, only count contacts with phone data available.
              not:
                required:
                  - query
                  - semantic_query
              description: >-
                Choose one people 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.


                Optional: add has_email and/or has_phone to count only contacts
                with available email or phone data.


                Do not send query and semantic_query together. Count endpoints
                do not accept pagination.
            examples:
              semantic:
                summary: Natural-language people count with a hard location filter
                description: >-
                  Natural-language mode: semantic_query describes the people to
                  count. filters adds a hard location constraint. has_email
                  counts only contacts with email data available.
                value:
                  semantic_query: VPs of Sales at cybersecurity companies
                  filters:
                    locality:
                      include:
                        - US
                  has_email: true
              by_title:
                summary: Count CTOs in the US
                description: >-
                  Structured-filter mode: query contains exact title and
                  location filters supplied by your code.
                value:
                  query:
                    title:
                      include:
                        - CTO
                        - Chief Technical Officer
                    locality:
                      include:
                        - US
              by_company:
                summary: Count engineers at a company
                description: >-
                  Structured-filter mode: query contains exact title and current
                  employer filters supplied by your code.
                value:
                  query:
                    title:
                      include:
                        - engineer
                    company_name:
                      include:
                        - Stripe
              has_email:
                summary: Count contacts with email data
                description: >-
                  Availability-only input: has_email counts contacts where email
                  data is available.
                value:
                  has_email: true
              has_phone:
                summary: Count contacts with phone data
                description: >-
                  Availability-only input: has_phone counts contacts where phone
                  data is available.
                value:
                  has_phone: true
      responses:
        '200':
          description: Person 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 people for the submitted query.
                  price:
                    type: number
                    description: Always 0 for count endpoints.
                  credits_remaining:
                    type: number
                additionalProperties: false
              examples:
                count:
                  summary: Person count returned
                  value:
                    success: true
                    request_id: req_1746123456_psc1x2
                    total: 42000
                    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: Semantic query
          source: |-
            curl --request POST \
              --url https://api.tryhuntr.com/person-search-count \
              --header 'x-api-key: <api-key>' \
              --header 'Content-Type: application/json' \
              --data '{
              "semantic_query": "VPs of Sales at cybersecurity companies",
              "filters": {
                "locality": {
                  "include": [
                    "US"
                  ]
                }
              },
              "has_email": true
            }'
        - lang: Shell
          label: Structured title filter
          source: |-
            curl --request POST \
              --url https://api.tryhuntr.com/person-search-count \
              --header 'x-api-key: <api-key>' \
              --header 'Content-Type: application/json' \
              --data '{
              "query": {
                "title": {
                  "include": [
                    "CTO",
                    "Chief Technical Officer"
                  ]
                },
                "locality": {
                  "include": [
                    "US"
                  ]
                }
              }
            }'
        - lang: Shell
          label: Company name filter
          source: |-
            curl --request POST \
              --url https://api.tryhuntr.com/person-search-count \
              --header 'x-api-key: <api-key>' \
              --header 'Content-Type: application/json' \
              --data '{
              "query": {
                "title": {
                  "include": [
                    "engineer"
                  ]
                },
                "company_name": {
                  "include": [
                    "Stripe"
                  ]
                }
              }
            }'
        - lang: Shell
          label: Only contacts with email
          source: |-
            curl --request POST \
              --url https://api.tryhuntr.com/person-search-count \
              --header 'x-api-key: <api-key>' \
              --header 'Content-Type: application/json' \
              --data '{
              "has_email": true
            }'
        - lang: Shell
          label: Only contacts with phone
          source: |-
            curl --request POST \
              --url https://api.tryhuntr.com/person-search-count \
              --header 'x-api-key: <api-key>' \
              --header 'Content-Type: application/json' \
              --data '{
              "has_phone": true
            }'
      x-code-samples:
        - lang: Shell
          label: Semantic query
          source: |-
            curl --request POST \
              --url https://api.tryhuntr.com/person-search-count \
              --header 'x-api-key: <api-key>' \
              --header 'Content-Type: application/json' \
              --data '{
              "semantic_query": "VPs of Sales at cybersecurity companies",
              "filters": {
                "locality": {
                  "include": [
                    "US"
                  ]
                }
              },
              "has_email": true
            }'
        - lang: Shell
          label: Structured title filter
          source: |-
            curl --request POST \
              --url https://api.tryhuntr.com/person-search-count \
              --header 'x-api-key: <api-key>' \
              --header 'Content-Type: application/json' \
              --data '{
              "query": {
                "title": {
                  "include": [
                    "CTO",
                    "Chief Technical Officer"
                  ]
                },
                "locality": {
                  "include": [
                    "US"
                  ]
                }
              }
            }'
        - lang: Shell
          label: Company name filter
          source: |-
            curl --request POST \
              --url https://api.tryhuntr.com/person-search-count \
              --header 'x-api-key: <api-key>' \
              --header 'Content-Type: application/json' \
              --data '{
              "query": {
                "title": {
                  "include": [
                    "engineer"
                  ]
                },
                "company_name": {
                  "include": [
                    "Stripe"
                  ]
                }
              }
            }'
        - lang: Shell
          label: Only contacts with email
          source: |-
            curl --request POST \
              --url https://api.tryhuntr.com/person-search-count \
              --header 'x-api-key: <api-key>' \
              --header 'Content-Type: application/json' \
              --data '{
              "has_email": true
            }'
        - lang: Shell
          label: Only contacts with phone
          source: |-
            curl --request POST \
              --url https://api.tryhuntr.com/person-search-count \
              --header 'x-api-key: <api-key>' \
              --header 'Content-Type: application/json' \
              --data '{
              "has_phone": true
            }'
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.