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

# Count people

> Synchronous. Each calendar month (UTC) your account gets a free allowance of count requests; after that each successful request costs credits. Counts the people matching a filter set and returns the total without paginating results. Accepts the same filter payload as POST /search except the limit field; sending limit is rejected with 400. With maxContactsPerCompany on a large result set the total can be an estimate (an upper bound). Unmatched location values come back in warnings, as on POST /search. Useful for sizing the audience before a search.



## OpenAPI

````yaml https://api.leadsforge.ai/public/swagger/doc.json post /search/count
openapi: 3.1.0
info:
  description: >-
    Search B2B leads, find their work emails, phone numbers and LinkedIn
    profiles, and discover lookalike companies, company page followers and local
    businesses.


    Authenticate every request with your API key in the `Authorization` header:
    the raw key, no `Bearer` prefix. Create the key in the Leadsforge app under
    Settings -> API & MCP.


    Paid operations consume credits from your account balance, and each
    operation says whether it is paid. Long-running operations are asynchronous:
    they return a job that you poll (or receive by webhook) and then page
    through its results.


    Errors return a JSON body with a human-readable `message` and, except for an
    unknown path (404), a stable `code`. Program against `code`. A JSON body
    with a field the operation does not accept is rejected with 400 bad_request,
    listing the unknown fields in data.validations. A request still running when
    the server timeout is reached is cut off with 503 and an empty body.
  license:
    name: Proprietary
    url: https://www.leadsforge.ai/terms
  termsOfService: https://www.leadsforge.ai/terms
  title: Leadsforge API
  version: '1.0'
servers:
  - url: https://api.leadsforge.ai/public/v1
security: []
tags:
  - description: Your account's credit balance.
    name: Balance
  - description: >-
      Find people by role, seniority, company, location and other filters.
      Searches and counts are free up to a monthly allowance, then each one
      costs credits; finding contact details is charged separately.
    name: Search
  - description: >-
      Accepted values for the controlled filters of POST /search and POST
      /search/count, and a resolver for location strings. All free.
    name: Search filters
  - description: >-
      Find work emails, phone numbers and LinkedIn profiles. Asynchronous jobs
      take up to 500 people; synchronous calls take one person and answer in the
      same response.
    name: Enrichment
  - description: >-
      Find companies similar to the domains you give. Previews are free up to a
      monthly allowance, then each one costs credits; the search consumes
      credits per company returned.
    name: Lookalikes
  - description: >-
      Find the people who follow a LinkedIn company page. Asynchronous jobs that
      consume credits per follower collected.
    name: Company followers
  - description: >-
      Find local businesses in an area you choose, then find their owners'
      emails and phone numbers. Both steps are asynchronous jobs that consume
      credits.
    name: Maps discovery
  - description: Scrape LinkedIn Sales Navigator searches.
    name: salesnav
externalDocs:
  description: Leadsforge API guides
  url: >-
    https://developer.salesforge.ai/leadsforge-api/concepts/search-and-enrichment
paths:
  /search/count:
    post:
      tags:
        - Search
      summary: Count people
      description: >-
        Synchronous. Each calendar month (UTC) your account gets a free
        allowance of count requests; after that each successful request costs
        credits. Counts the people matching a filter set and returns the total
        without paginating results. Accepts the same filter payload as POST
        /search except the limit field; sending limit is rejected with 400. With
        maxContactsPerCompany on a large result set the total can be an estimate
        (an upper bound). Unmatched location values come back in warnings, as on
        POST /search. Useful for sizing the audience before a search.
      operationId: countPeople
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PersonSearchFilters'
              description: Search filters
              summary: search
        description: Search filters
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchCountResponse'
          description: Count response
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          description: 'bad_request: the body or a parameter is invalid'
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          description: >-
            missing_api_key, invalid_api_key, or unauthorized when your account
            is blocked
        '402':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          description: >-
            insufficient_credits: the free counts of this month are used up and
            your balance does not cover the next one
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          description: >-
            account_frozen: the free counts of this month are used up and credit
            spending is paused for your account
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          description: >-
            rate_limited: too many requests, retry later; Retry-After is set
            when known
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          description: 'internal: unexpected server error'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    PersonSearchFilters:
      properties:
        companyBusinessModels:
          $ref: '#/components/schemas/IncludeExcludeFilter'
        companyDomains:
          $ref: '#/components/schemas/IncludeExcludeFilter'
        companyEmployeeNumberRange:
          $ref: '#/components/schemas/MinMaxFilter'
        companyFoundedYearRange:
          $ref: '#/components/schemas/MinMaxFilter'
        companyFundingRounds:
          $ref: '#/components/schemas/IncludeExcludeFilter'
        companyIDs:
          $ref: '#/components/schemas/IncludeExcludeFilter'
        companyIndustries:
          $ref: '#/components/schemas/IncludeExcludeFilter'
        companyKeywords:
          $ref: '#/components/schemas/IncludeExcludeAllFilter'
        companyLocations:
          $ref: '#/components/schemas/IncludeExcludeFilter'
        companyNames:
          $ref: '#/components/schemas/IncludeExcludeFilter'
        companyNiches:
          $ref: '#/components/schemas/IncludeExcludeFilter'
        companyRequired:
          description: CompanyRequired true returns only people with a known company.
          type: boolean
        companyRevenueRanges:
          items:
            $ref: '#/components/schemas/RevenueCategory'
          type: array
          uniqueItems: false
        companyTechnologies:
          $ref: '#/components/schemas/AnyAllFilter'
        companyTypes:
          $ref: '#/components/schemas/IncludeExcludeFilter'
        companyYearsInBusinessRange:
          $ref: '#/components/schemas/MinMaxFilter'
        leadDepartments:
          $ref: '#/components/schemas/IncludeExcludeFilter'
        leadIDs:
          $ref: '#/components/schemas/IncludeExcludeFilter'
        leadJobTitles:
          $ref: '#/components/schemas/JobTitleFilter'
        leadLanguages:
          $ref: '#/components/schemas/LanguageFilter'
        leadLocations:
          $ref: '#/components/schemas/IncludeExcludeFilter'
        leadSeniorities:
          $ref: '#/components/schemas/IncludeExcludeFilter'
        leadTenure:
          $ref: '#/components/schemas/MinMaxFilter'
        maxContactsPerCompany:
          description: >-
            MaxContactsPerCompany caps the people returned per company, up to
            100; 0 or absent means no cap.
          maximum: 100
          minimum: 0
          type: integer
      type: object
    SearchCountResponse:
      properties:
        totalCount:
          type: integer
        warnings:
          items:
            $ref: '#/components/schemas/SearchFilterWarning'
          type: array
          uniqueItems: false
      type: object
    ApiError:
      properties:
        code:
          description: >-
            Code is the stable, machine-readable error code; each endpoint lists
            the codes it returns.
          type: string
        data:
          description: >-
            Data carries details for some errors; on validation errors it is
            {"validations": ["..."]}, one message per

            invalid field.
        message:
          type: string
      type: object
    IncludeExcludeFilter:
      properties:
        exclude:
          items:
            type: string
          type: array
          uniqueItems: false
        include:
          items:
            type: string
          type: array
          uniqueItems: false
      type: object
    MinMaxFilter:
      properties:
        max:
          type: integer
        min:
          type: integer
      type: object
    IncludeExcludeAllFilter:
      properties:
        exclude:
          items:
            type: string
          type: array
          uniqueItems: false
        include:
          items:
            type: string
          type: array
          uniqueItems: false
        matchAll:
          description: >-
            MatchAll true requires every include value to match; false (default)
            matches any of them.
          type: boolean
      type: object
    RevenueCategory:
      enum:
        - very_small
        - small_lower
        - small_upper
        - lower_mid_sized
        - mid_sized_lower
        - mid_sized_upper
        - large_lower
        - large_upper
        - enterprise_lower
        - enterprise_upper
        - global_giants_lower
        - global_giants_upper
        - super_enterprises
      type: string
      x-enum-varnames:
        - RevenueVerySmall
        - RevenueSmallLower
        - RevenueSmallUpper
        - RevenueLowerMidSized
        - RevenueMidSizedLower
        - RevenueMidSizedUpper
        - RevenueLargeLower
        - RevenueLargeUpper
        - RevenueEnterpriseLower
        - RevenueEnterpriseUpper
        - RevenueGlobalGiantsLower
        - RevenueGlobalGiantsUpper
        - RevenueSuperEnterprises
    AnyAllFilter:
      properties:
        all:
          description: All matches only when every value matches.
          items:
            type: string
          type: array
          uniqueItems: false
        any:
          description: Any matches when at least one of the values matches.
          items:
            type: string
          type: array
          uniqueItems: false
      type: object
    JobTitleFilter:
      properties:
        exactMatch:
          description: ExactMatch true matches the whole title instead (case-insensitive).
          type: boolean
        exclude:
          items:
            type: string
          type: array
          uniqueItems: false
        include:
          items:
            type: string
          type: array
          uniqueItems: false
      type: object
    LanguageFilter:
      properties:
        exclude:
          items:
            type: string
          type: array
          uniqueItems: false
        include:
          description: >-
            Include takes language names as on the profile, e.g. "English"
            (case-sensitive).
          items:
            type: string
          type: array
          uniqueItems: false
        primaryOnly:
          description: PrimaryOnly true keeps only native or bilingual speakers.
          type: boolean
      type: object
    SearchFilterWarning:
      properties:
        filter:
          type: string
        value:
          type: string
      type: object
  securitySchemes:
    ApiKeyAuth:
      description: >-
        Your API key, sent as is (no `Bearer` prefix). Create it in the
        Leadsforge app under Settings -> API & MCP.
      in: header
      name: Authorization
      type: apiKey

````

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