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

# Search Leads

> Accepts either filters or a Sales Navigator search URL.

## Streamline your  Sales Navigator lead searches effortlessly without connecting your own account or cookies.

### 🛠 How the Process Works

#### **Step 1️⃣: Initiate Search**

* Launch your search with specific criteria via this endpoint.
* This endpoint returns a **`request_id`**, allowing you to track progress through the [**Check Search Status**](https://fdocs.info/api-reference/endpoint/check-search-status) endpoint.
* This step costs minimum **50 credits**, even if the search returns **0 results** (Excluding cases where the filters you provided are invalid).

#### **Step 2️⃣: Monitor Search Progress**

* Use the [**Check Search Status**](https://fdocs.info/api-reference/endpoint/check-search-status) endpoint to track your search.
* This action is **free of charge**.

#### **Step 3️⃣: Retrieve Results**

* Once the search is complete, access the results via the [**Get Search Results**](https://fdocs.info/api-reference/endpoint/get-search-results) endpoint.
* Retrieving each result incurs **1 credits**. For example, fetching **1000 results** will consume **1000 credits** (*not include 50 credits at **step 1***).

💡 *For better understanding and demo code, please follow [this tutorial](https://fdocs.info/tutorial/howto-search-leads)*


## OpenAPI

````yaml POST /search-leads
openapi: 3.0.1
info:
  title: OpenAPI Plant Store
  description: >-
    A sample API that uses a plant store as an example to demonstrate features
    in the OpenAPI specification
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://web-scraping-api2.p.rapidapi.com
security:
  - ApiKeyAuth: []
paths:
  /search-leads:
    post:
      description: Accepts either filters or a Sales Navigator search URL.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                url:
                  type: string
                  example: >-
                    https://www.linkedin.com/sales/search/people?query=(recentSearchParam%3A(doLogHistory%3Atrue)%2Cfilters%3AList((type%3ACURRENT_COMPANY%2Cvalues%3AList((id%3Aurn%253Ali%253Aorganization%253A18890478%2Ctext%3AFTMO%2CselectionType%3AINCLUDED%2Cparent%3A(id%3A0))))))&sessionId=P1DbKqCXT7CvuwbJNjT8dw%3D%3D&viewAllFilters=true
                  description: >-
                    This is the highest-priority filter, used when you already
                    have Sales Navigator search URLs. When you use this filter,
                    all other filters will be ignored except for the limit
                    filter.
                current_company_ids:
                  type: array
                  items:
                    type: integer
                  example:
                    - 162479
                    - 1053
                  description: >-
                    To filter by current company. Learn how to [find a
                    company_id](/tutorial/howto-find-company-id). Maximum: 10
                    elements.
                title_keywords:
                  type: array
                  items:
                    type: string
                  example:
                    - Director
                    - Operation
                  description: 'Maximum: 20 elements.'
                company_headcounts:
                  type: array
                  items:
                    type: string
                    enum:
                      - Self-employed
                      - 1-10
                      - 11-50
                      - 51-200
                      - 201-500
                      - 501-1000
                      - 1001-5000
                      - 5001-10000
                      - 10001+
                  example:
                    - 1001-5000
                    - 5001-10000
                functions:
                  type: array
                  items:
                    type: string
                    enum:
                      - Accounting
                      - Administrative
                      - Arts and Design
                      - Business Development
                      - Community and Social Services
                      - Consulting
                      - Education
                      - Engineering
                      - Entrepreneurship
                      - Finance
                      - Healthcare Services
                      - Human Resources
                      - Information Technology
                      - Legal
                      - Marketing
                      - Media and Communication
                      - Military and Protective Services
                      - Operations
                      - Product Management
                      - Program and Project Management
                      - Purchasing
                      - Quality Assurance
                      - Real Estate
                      - Research
                      - Sales
                      - Customer Success and Support
                  example:
                    - Accounting
                    - Administrative
                geo_codes:
                  type: array
                  items:
                    type: integer
                  example:
                    - 103644278
                    - 102299470
                  description: >-
                    To filter by location. Learn how to [find a
                    geo_code](/tutorial/howto-geocode). Maximum: 20 elements.
                past_company_ids:
                  type: array
                  items:
                    type: integer
                  example:
                    - 1009
                  description: >-
                    To filter by past company. Learn how to [find a
                    company_id](/tutorial/howto-find-company-id). Maximum: 10
                    elements.
                industry_codes:
                  type: array
                  items:
                    type: integer
                  example:
                    - 3
                    - 4
                  description: >-
                    All industry codes could be found [on this page](
                    https://learn.microsoft.com/en-us/linkedin/shared/references/reference-tables/industry-codes-v2).
                    Maximum: 10 elements.
                seniority_levels:
                  type: array
                  items:
                    type: string
                    enum:
                      - Owner/Partner
                      - CXO
                      - Vice President
                      - Director
                      - Experienced Manager
                      - Entry Level Manager
                      - Strategic
                      - Senior
                      - Entry Level
                      - In Training
                  example: []
                year_in_current_company:
                  type: array
                  items:
                    type: string
                    enum:
                      - Less than 1 year
                      - 1 to 2 years
                      - 3 to 5 years
                      - 6 to 10 years
                      - More than 10 years
                  example: []
                year_in_current_position:
                  type: array
                  items:
                    type: string
                    enum:
                      - Less than 1 year
                      - 1 to 2 years
                      - 3 to 5 years
                      - 6 to 10 years
                      - More than 10 years
                  example: []
                years_of_experience:
                  type: array
                  items:
                    type: string
                    enum:
                      - Less than 1 year
                      - 1 to 2 years
                      - 3 to 5 years
                      - 6 to 10 years
                      - More than 10 years
                  example: []
                current_company_names:
                  type: array
                  description: >-
                    In case the **company_id** is not available, use this filter
                    instead. Maximum: 10 elements.
                  items:
                    type: string
                  example:
                    - Apple
                    - Microsoft
                past_company_names:
                  type: array
                  items:
                    type: string
                  example:
                    - Apple
                    - Microsoft
                  description: 'Maximum: 10 elements.'
                company_type:
                  type: array
                  items:
                    type: string
                    enum:
                      - Public Company
                      - Privately Held
                      - Non Profit
                      - Educational Institution
                      - Partnership
                      - Self Employed
                      - Self Owned
                      - Government Agency
                  example: []
                company_headquarter_location_ids:
                  type: array
                  items:
                    type: integer
                  example: []
                  description: >-
                    Learn how to [find a
                    geo_code/location_id](/tutorial/howto-geocode). Maximum: 20
                    elements.
                company_headquarter_location_ids_exclude:
                  type: array
                  items:
                    type: integer
                  example: []
                  description: >-
                    To exclude some locations. Learn how to [find a
                    geo_code/location_id](/tutorial/howto-geocode). Maximum: 20
                    elements.
                seniority_levels_exclude:
                  type: array
                  items:
                    type: string
                    enum:
                      - Owner/Partner
                      - CXO
                      - Vice President
                      - Director
                      - Experienced Manager
                      - Entry Level Manager
                      - Strategic
                      - Senior
                      - Entry Level
                      - In Training
                  example: []
                past_job_titles:
                  type: array
                  items:
                    type: string
                  example:
                    - CEO
                  description: ' Maximum 20 elements.'
                current_company_ids_exclude:
                  type: array
                  items:
                    type: integer
                  example: []
                  description: >-
                    To exclude some companies. Learn how to [find a
                    company_id](/tutorial/howto-find-company-id). Maximum: 10
                    elements.
                title_keywords_exclude:
                  type: array
                  description: To exclude some title keywords. Maximum 20 elements.
                  items:
                    type: string
                  example:
                    - Sales
                functions_exclude:
                  type: array
                  items:
                    type: string
                    enum:
                      - Accounting
                      - Administrative
                      - Arts and Design
                      - Business Development
                      - Community and Social Services
                      - Consulting
                      - Education
                      - Engineering
                      - Entrepreneurship
                      - Finance
                      - Healthcare Services
                      - Human Resources
                      - Information Technology
                      - Legal
                      - Marketing
                      - Media and Communication
                      - Military and Protective Services
                      - Operations
                      - Product Management
                      - Program and Project Management
                      - Purchasing
                      - Quality Assurance
                      - Real Estate
                      - Research
                      - Sales
                      - Customer Success and Support
                  example: []
                geo_codes_exclude:
                  type: array
                  items:
                    type: integer
                  example:
                    - 105080838
                    - 102257491
                  description: >-
                    To exclude some locations. Learn how to [find a
                    geo_code](https://fdocs.info/tutorial/howto-geocode).
                    Maximum: 20 elements.
                past_company_ids_exclude:
                  type: array
                  items:
                    type: integer
                  example:
                    - 1009
                  description: >-
                    Learn how to [find a
                    company_id](https://fdocs.info/tutorial/howto-find-company-id).
                    Maximum: 10 elements.
                past_job_titles_exclude:
                  type: array
                  items:
                    type: string
                  example:
                    - Founder
                  description: 'Maximum: 20 elements.'
                industry_codes_exclude:
                  type: array
                  items:
                    type: integer
                  example:
                    - 5
                    - 6
                  description: 'Maximum: 10 elements.'
                first_name:
                  type: string
                  example: ''
                last_name:
                  type: string
                  example: ''
                profile_languages:
                  type: array
                  items:
                    type: string
                    enum:
                      - Arabic
                      - English
                      - Spanish
                      - Portuguese
                      - Chinese
                      - French
                      - Italian
                      - Russian
                      - German
                      - Dutch
                      - Turkish
                      - Tagalog
                      - Polish
                      - Korean
                      - Japanese
                      - Malay
                      - Norwegian
                      - Danish
                      - Romanian
                      - Swedish
                      - Bahasa Indonesia
                      - Czech
                  example: []
                school_ids:
                  type: array
                  items:
                    type: integer
                  example:
                    - 123456
                  description: 'Maximum: 10 elements.'
                school_ids_exclude:
                  type: array
                  items:
                    type: integer
                  example:
                    - 654321
                  description: 'Maximum: 10 elements.'
                changed_jobs:
                  type: string
                  description: ''
                  enum:
                    - 'true'
                    - 'false'
                  example: 'false'
                posted_on_linkedin:
                  type: string
                  description: ''
                  enum:
                    - 'true'
                    - 'false'
                  example: 'false'
                mentioned_in_news:
                  type: string
                  description: ''
                  enum:
                    - 'true'
                    - 'false'
                  example: 'false'
                keywords:
                  type: string
                  example: system
                  description: >-
                    Support Boolean keywords as well. For example: AI OR
                    "machine learning".
                zipcode_ids:
                  type: array
                  items:
                    type: integer
                  example:
                    - 90001
                  description: Maximum 5 elements.
                radius:
                  type: integer
                  description: >-
                    To be used together with the **zipcode_ids** filter to
                    define the radius in mile.
                  default: 5
                  enum:
                    - 1
                    - 5
                    - 10
                    - 25
                    - 35
                    - 50
                    - 75
                    - 100
                  example: 5
                limit:
                  type: integer
                  description: 'Limit the number of results. Default: 25. Maximum 2500.'
                  example: 25
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchEmployees'
        '400':
          description: Invalid payload
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvalidPayload'
        '503':
          description: System Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SystemError'
components:
  schemas:
    SearchEmployees:
      type: object
      properties:
        message:
          type: string
          example: >-
            Use this request_id to check your search with 'Check Search Status'
            endpoint
        request_id:
          type: string
          example: 0bb8360c779317e5f6fc1722a8bd26a1
    InvalidPayload:
      type: object
      properties:
        data:
          type: object
          nullable: true
          example: null
        message:
          type: string
          example: 'Bad request: Invalid payload.'
    SystemError:
      type: object
      properties:
        data:
          type: object
          nullable: true
          example: null
        message:
          type: string
          example: System error. We will fix it soon!
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-rapidapi-key

````