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

# Count people matching a query — free

> **Requires `x-api-key` header.**

Rate limit: 5 requests/second per API key.

Returns `total` matching people without profile data. Same `query` filters as POST /person-search — use to validate filters before paying per result.

**Price:** Free.



## 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: Research
    description: >-
      Research one company, person, team, or focused business question and
      return a sales-ready answer. Lite, standard, and deep tiers.
  - name: Companies
    description: >-
      Search companies and enrich firmographics. Per-result pricing on search;
      count endpoints are free.
  - name: People
    description: >-
      Search people and enrich contacts — work email, phone, and related lookup
      endpoints.
  - name: LinkedIn
    description: >-
      LinkedIn URL discovery, company and profile pages, posts, reactions, and
      comments.
  - name: X
    description: X profiles, posts, search results, and thread context.
  - name: Web
    description: >-
      Find 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:
        - People
      summary: Count people matching a query — free
      description: >-
        **Requires `x-api-key` header.**


        Rate limit: 5 requests/second per API key.


        Returns `total` matching people without profile data. Same `query`
        filters as POST /person-search — use to validate filters before paying
        per result.


        **Price:** Free.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - query
              properties:
                query:
                  type: object
                  description: >-
                    At least one filter required. Combine multiple filters — all
                    must match (AND). See each field for match rules. Use POST
                    /person-search-count to preview `total` for free.
                  properties:
                    firstname:
                      type: object
                      description: >-
                        **Person's first name.** Open text. Substring match —
                        any profile whose first name contains the string.
                        Example: `{ "include": ["John"] }`.
                      properties:
                        include:
                          type: array
                          items:
                            type: string
                          description: >-
                            Match companies where this field matches any listed
                            value.
                        exclude:
                          type: array
                          items:
                            type: string
                          description: Exclude companies matching any listed value.
                    lastname:
                      type: object
                      description: >-
                        **Person's last name.** Open text, substring match.
                        Example: `{ "include": ["Collison"] }`.
                      properties:
                        include:
                          type: array
                          items:
                            type: string
                          description: >-
                            Match companies where this field matches any listed
                            value.
                        exclude:
                          type: array
                          items:
                            type: string
                          description: Exclude companies matching any listed value.
                    currentJobTitle:
                      type: object
                      description: >-
                        **Current job title.** Open text — **contains** match:
                        the keyword appears anywhere in the title (e.g.
                        `"engineer"` matches "Software Engineer"). No synonym
                        expansion: list variants explicitly (`CTO`, `Chief
                        Technology Officer`). OR across values in `include`.
                        Example: `{ "include": ["CTO", "Chief Technical
                        Officer"] }`.
                      properties:
                        include:
                          type: array
                          items:
                            type: string
                          description: >-
                            Match companies where this field matches any listed
                            value.
                        exclude:
                          type: array
                          items:
                            type: string
                          description: Exclude companies matching any listed value.
                    pastJobTitle:
                      type: object
                      description: >-
                        **Past job title** (previous roles only). Same
                        contains-match rules as `currentJobTitle`. Use when
                        targeting alumni of a role, not current holders.
                      properties:
                        include:
                          type: array
                          items:
                            type: string
                          description: >-
                            Match companies where this field matches any listed
                            value.
                        exclude:
                          type: array
                          items:
                            type: string
                          description: Exclude companies matching any listed value.
                    currentCompanyName:
                      type: object
                      description: >-
                        **Current employer name.** Open text, fuzzy/substring
                        match — can return wrong companies with similar names.
                        **Prefer `currentCompanyWebsite`** when you know the
                        domain (`stripe.com`). Example: `{ "include": ["Stripe"]
                        }`. Do not use to mean "works at a company with a
                        LinkedIn page" — use website/domain filters instead.
                      properties:
                        include:
                          type: array
                          items:
                            type: string
                          description: >-
                            Match companies where this field matches any listed
                            value.
                        exclude:
                          type: array
                          items:
                            type: string
                          description: Exclude companies matching any listed value.
                    pastCompanyName:
                      type: object
                      description: >-
                        **Past employer name** (previous companies only). Same
                        fuzzy match as `currentCompanyName`. Use for alumni
                        searches.
                      properties:
                        include:
                          type: array
                          items:
                            type: string
                          description: >-
                            Match companies where this field matches any listed
                            value.
                        exclude:
                          type: array
                          items:
                            type: string
                          description: Exclude companies matching any listed value.
                    currentCompanyUrn:
                      type: object
                      description: >-
                        **Numeric URN of the person's current company.**
                        Example: `{ "include": ["1234", "5678"] }`. Use when you
                        have company URNs from a company export. Not the full
                        LinkedIn URN string.
                      properties:
                        include:
                          type: array
                          items:
                            type: string
                          description: >-
                            Match companies where this field matches any listed
                            value.
                        exclude:
                          type: array
                          items:
                            type: string
                          description: Exclude companies matching any listed value.
                    pastCompanyUrn:
                      type: object
                      description: >-
                        **Numeric URN of a past employer.** Same format as
                        `currentCompanyUrn`.
                      properties:
                        include:
                          type: array
                          items:
                            type: string
                          description: >-
                            Match companies where this field matches any listed
                            value.
                        exclude:
                          type: array
                          items:
                            type: string
                          description: Exclude companies matching any listed value.
                    currentCompanyWebsite:
                      type: object
                      description: >-
                        **Current employer's website or domain (exact).**
                        Example: `stripe.com` or `https://www.stripe.com`.
                        **Best filter for "people at company X"** when you know
                        the domain. Do **not** use `linkedin.com` — that matches
                        anyone whose employer has a LinkedIn page, not a
                        specific company.
                      properties:
                        include:
                          type: array
                          items:
                            type: string
                          description: >-
                            Match companies where this field matches any listed
                            value.
                        exclude:
                          type: array
                          items:
                            type: string
                          description: Exclude companies matching any listed value.
                    pastCompanyWebsite:
                      type: object
                      description: >-
                        **Past employer's website or domain.** Same rules as
                        `currentCompanyWebsite` for previous jobs.
                      properties:
                        include:
                          type: array
                          items:
                            type: string
                          description: >-
                            Match companies where this field matches any listed
                            value.
                        exclude:
                          type: array
                          items:
                            type: string
                          description: Exclude companies matching any listed value.
                    currentCompanyId:
                      type: object
                      description: >-
                        **Current company identifier (flexible).** Accepts
                        domain (`stripe.com`), numeric URN, LinkedIn company
                        URL, or vanity name (`stripe`). Equivalent to company
                        search `companyId` — use when you have mixed ID formats
                        from exports.
                      properties:
                        include:
                          type: array
                          items:
                            type: string
                          description: >-
                            Match companies where this field matches any listed
                            value.
                        exclude:
                          type: array
                          items:
                            type: string
                          description: Exclude companies matching any listed value.
                    pastCompanyId:
                      type: object
                      description: >-
                        **Past company identifier.** Same accepted formats as
                        `currentCompanyId`.
                      properties:
                        include:
                          type: array
                          items:
                            type: string
                          description: >-
                            Match companies where this field matches any listed
                            value.
                        exclude:
                          type: array
                          items:
                            type: string
                          description: Exclude companies matching any listed value.
                    school:
                      type: object
                      description: >-
                        **School or university attended.** Open text, substring
                        match. Example: `{ "include": ["Stanford", "Harvard"]
                        }`.
                      properties:
                        include:
                          type: array
                          items:
                            type: string
                          description: >-
                            Match companies where this field matches any listed
                            value.
                        exclude:
                          type: array
                          items:
                            type: string
                          description: Exclude companies matching any listed value.
                    languages:
                      type: object
                      description: >-
                        **Languages spoken.** Language name or **alpha-2 code**
                        (e.g. `EN`, `FR`). Example: `{ "include": ["EN"] }` with
                        `{ "location": { "include": ["FR"] } }` for English
                        speakers in France.
                      properties:
                        include:
                          type: array
                          items:
                            type: string
                          description: >-
                            Match companies where this field matches any listed
                            value.
                        exclude:
                          type: array
                          items:
                            type: string
                          description: Exclude companies matching any listed value.
                    skills:
                      type: object
                      description: >-
                        **Skills listed on the profile.** Open text, substring
                        match. Example: `{ "include": ["JavaScript", "Python"]
                        }`.
                      properties:
                        include:
                          type: array
                          items:
                            type: string
                          description: >-
                            Match companies where this field matches any listed
                            value.
                        exclude:
                          type: array
                          items:
                            type: string
                          description: Exclude companies matching any listed value.
                    location:
                      type: object
                      description: >-
                        **Person's location** (where they are based). City,
                        state, or country; **alpha-2 country codes** (`US`,
                        `GB`) work best. Example: `{ "include": ["US"] }`.
                      properties:
                        include:
                          type: array
                          items:
                            type: string
                          description: >-
                            Match companies where this field matches any listed
                            value.
                        exclude:
                          type: array
                          items:
                            type: string
                          description: Exclude companies matching any listed value.
                    keyword:
                      type: object
                      description: >-
                        **Full-profile keyword search** — scans current and past
                        titles, descriptions, headline, skills, education, etc.
                        Open text. Use for broad concepts (e.g. `CEO`,
                        `Co-Founder`) when no dedicated filter fits. Not a
                        replacement for listing job-title variants in
                        `currentJobTitle`.
                      properties:
                        include:
                          type: array
                          items:
                            type: string
                          description: >-
                            Match companies where this field matches any listed
                            value.
                        exclude:
                          type: array
                          items:
                            type: string
                          description: Exclude companies matching any listed value.
            example:
              query:
                currentJobTitle:
                  include:
                    - CTO
                location:
                  include:
                    - US
      responses:
        '200':
          description: Count result.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  request_id:
                    type: string
                  total:
                    type: integer
                    description: Number of people matching the query.
                  price:
                    type: number
                    description: Always 0 — this endpoint is free.
                  credits_remaining:
                    type: number
              example:
                success: true
                request_id: req_1746123456_pc2x3y
                total: 42
                price: 0
                credits_remaining: 5
        '400':
          description: Missing or invalid query.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Invalid API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Query failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: string
          description: Human-readable error message.
      required:
        - error
  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.

````