Skip to main content

Count leads

Count leads matching the same payload shape used by Query leads.

POST/api/leads/query/count
HTTP referenceScope leads:readUpdated March 6, 2026

This page documents the canonical HTTP contract for this endpoint.

Body parameters

  • filter · optional

    object

    Optional FilterDescriptor; same root rule/group validation as POST /api/leads/query.

  • search · optional

    string

    Optional free-text query.

  • sort · optional

    array<object>

    Accepted by shared request model but ignored by count.

  • pagination · optional

    object

    Accepted by shared request model but ignored by count.

  • scope · optional

    string

    Optional org or user scope.

  • source_table_id · optional

    string

    Optional research table context.

  • source_table_scope · optional

    string

    company or lead; defaults to company.

  • related_tables_mode · optional

    string

    Accepted by shared request model but ignored by count.

  • include_research_data · optional

    boolean

    Accepted by shared request model but ignored by count.

  • include_placeholder_leads · optional

    boolean

    Include or exclude placeholder Leads in matching; defaults false.

  • selection_context · optional

    string

    Accepted by shared request model but ignored by count.

  • ids_only · optional

    boolean

    Accepted by shared request model but ignored by count.

  • include_count · optional

    boolean

    Accepted by shared request model; count is always returned.

Errors

StatusMeaning
400Invalid descriptor payload.
401Invalid API key or missing auth.
403Missing leads:read scope.
503Lead count timed out; refine the filter and retry.

Docs