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

# Estimate number of leads

> Estimate the number of leads matching specific search criteria.

# Use Case:

Quickly assess lead volume for new campaigns.


## OpenAPI

````yaml post /api/linkedin/leads/by_icp/get_count/
openapi: 3.0.3
info:
  title: Generect API
  description: >-
    Welcome to the Generect API documentation. Here we will help you integrate
    and use our API.


    API base url: `api.generect.com`  

    Protocol: `HTTPS`


    # Authentication


    Firstly, add a `API Token` to the enviroment variables `auth_token` in
    `Settings` tab.


    # Rate limits


    Credits: You can request data depending on your data plan and credit
    balance. The default is 10000/month. The estimated number of credits to
    spend is based on the complexity of the query and the number of results. The
    amount spent can be increased by additional data flags in the queries.


    # Note


    _Ensure that you are add a "/" to the end of url._
  version: 1.0.0
  contact: {}
servers:
  - url: https://api.generect.com
security:
  - apiKey: []
tags:
  - name: 1. Auth
    description: Login and get user info
  - name: 2. Transactions
    description: List of latest transactions in your account
  - name: 3. Leads
    description: Fetch information about leads by _link/name/ICP_.
  - name: 4. Companies
    description: Fetch information about companies by link/name/ICP.
paths:
  /api/linkedin/leads/by_icp/get_count/:
    post:
      tags:
        - 3. Leads
      summary: Count leads by ICP
      description: Estimate the number of leads matching specific search criteria.
      operationId: countLeadsByIcp
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                company_link:
                  type: string
                  description: Use 'company_link' or 'company_id'. One of them is required.
                company_id:
                  type: integer
                  description: Optional
                locations:
                  type: array
                  items:
                    type: string
                personas:
                  type: array
                  items:
                    type: array
                    items:
                      oneOf:
                        - type: string
                        - type: array
                          items:
                            type: string
                    minItems: 4
                exclude_names:
                  type: array
                  items:
                    type: string
                filter_empty_vars:
                  type: array
                  items:
                    type: string
                changed_jobs:
                  type: boolean
                  description: Optional, flag to specify if jobs have changed.
                posted_on_linkedin:
                  type: boolean
                  description: Optional, flag to specify if posted on LinkedIn.
                mentioned_in_news:
                  type: boolean
                  description: Optional, flag to specify if mentioned in news.
                lead_industries:
                  type: array
                  items:
                    type: string
                  description: Optional, list of industries
                company_locations:
                  type: array
                  items:
                    type: string
                  description: Optional, company locations.
                company_headcounts:
                  type: array
                  items:
                    type: string
                  description: Optional, company headcounts.
                company_types:
                  type: array
                  items:
                    type: string
                  description: Optional, company types.
                past_company_names:
                  type: array
                  items:
                    type: string
                  description: Optional, list of past company names.
                years_in_company:
                  type: array
                  items:
                    type: integer
                  description: Optional, number of years in a company.
                years_in_position:
                  type: array
                  items:
                    type: integer
                  description: Optional, number of years in the position.
                groups:
                  type: array
                  items:
                    type: integer
                  description: Optional, list of group IDs.
                schools:
                  type: array
                  items:
                    type: integer
                  description: Optional, list of school IDs.
            examples:
              Get List of Leads by ICP:
                value:
                  company_link: https://www.linkedin.com/company/fette-compacting-gmbh
                  locations:
                    - Austria
                    - Switzerland
                  personas:
                    - - Communication
                      - - Communication
                        - Kommunikation
                        - Communication
                      - []
                      - - Assistant
                        - Operations
                        - Hubspot
                    - - Communications
                      - - Communications
                        - Kommunikation
                        - Communications
                      - []
                      - - Assistant
                        - Operations
                        - Hubspot
                  exclude_names:
                    - Volker Reinsch
                    - Nathalie Hoffmann
                    - Nora Behrens
                    - Emanuel da Silva Gomes
                    - Kerstin Schaper
                    - Angela Hogrefe
                  filter_empty_vars:
                    - started_at_position
      responses:
        '200':
          description: '200'
          headers:
            Allow:
              schema:
                type: string
                example: POST, OPTIONS
            Content-Length:
              schema:
                type: string
                example: '44'
            Cross-Origin-Opener-Policy:
              schema:
                type: string
                example: same-origin
            Date:
              schema:
                type: string
                example: Mon, 02 Dec 2024 21:38:18 GMT
            Referrer-Policy:
              schema:
                type: string
                example: same-origin
            Server:
              schema:
                type: string
                example: WSGIServer/0.2 CPython/3.11.10
            Vary:
              schema:
                type: string
                example: Accept, Origin
            X-Content-Type-Options:
              schema:
                type: string
                example: nosniff
            X-Frame-Options:
              schema:
                type: string
                example: DENY
          content:
            application/json:
              schema:
                type: object
                properties:
                  amount:
                    type: number
                    example: -3
                  results_count:
                    type: string
                    example: within limit
              examples:
                '200':
                  value:
                    amount: -3
                    results_count: within limit
      security:
        - apiKey: []
components:
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: Authorization
      description: Use 'Token <api-key>' as the value

````