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

# Search Accounts

> Search LinkedIn companies by advanced filters (headcount and its growth, revenue, department headcount, hiring, recent activities, Fortune lists) with inclusion and exclusion criteria

* Search LinkedIn companies by filters the [company search](/linkedin-api-reference/company/search) doesn't have: headcount growth, annual revenue, number of followers, department headcount and its growth, hiring on LinkedIn, senior leadership changes, funding events and Fortune 500 rank.
* Every result has the company ID: get its full profile with [Get Company](/linkedin-api-reference/company/get) or in-depth insights with [Account Insights](/linkedin-api-reference/accounts/account-insights).
* 25 results per page, up to 100 pages.

## Examples

<CodeGroup>
  ```javascript JavaScript theme={null}
  const params = new URLSearchParams({
    page: '1',
    search: 'software',
    headquarterLocations: 'United States',
    companyHeadcount: '51-200,201-500',
    annualRevenue: '10-100;USD',
    departmentHeadcount: '10-100;Engineering',
    jobOpportunities: 'HIRING_ON_LINKEDIN',
    excludeIndustryIds: '6',
  });
  fetch(`https://api.harvestapi.io/linkedin/account-search?${params.toString()}`, {
    headers: { 'X-API-Key': '<api-key>' },
  })
    .then((response) => response.json())
    .then((data) => console.log(data));
  ```
</CodeGroup>

## Session ID

LinkedIn personalizes search results, so different pages of the same search can come from different resources and be inconsistent. Pass the same `sessionId` with every page to keep them on one resource: see [Session ID](/linkedin-api-reference/leads/search-leads#session-id) in the lead search for how it works.


## OpenAPI

````yaml GET /linkedin/account-search
openapi: 3.0.1
info:
  title: HarvestAPI LinkedIn API reference
  description: HarvestAPI LinkedIn API reference
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.harvestapi.io
security:
  - ApiKeyAuthHeader: []
paths:
  /linkedin/account-search:
    get:
      summary: Search LinkedIn accounts
      description: >-
        Search LinkedIn companies by advanced filters (headcount and its growth,
        revenue, department headcount, hiring, recent activities, Fortune lists)
        with inclusion and exclusion criteria
      parameters:
        - name: search
          in: query
          description: Search query. Fuzzy search, supports LinkedIn's search operators
          schema:
            type: string
        - name: headquarterLocations
          in: query
          description: Filter by headquarters location text. Comma-separated (max 70)
          schema:
            type: string
        - name: headquarterGeoIds
          in: query
          description: >-
            Filter by headquarters LinkedIn Geo ID. Comma-separated (max 70).
            Use /linkedin/geo-id-search to find IDs
          schema:
            type: string
        - name: industryIds
          in: query
          description: >-
            Filter by industry IDs. Comma-separated (max 70). Full list:
            https://github.com/HarvestAPI/linkedin-industry-codes-v2/blob/main/linkedin_industry_code_v2_all_eng_with_header.csv
          schema:
            type: string
        - name: companyHeadcount
          in: query
          description: >-
            Filter by company headcount. Comma-separated. Available values:
            1-10, 11-50, 51-200, 201-500, 501-1000, 1001-5000, 5001-10000,
            10001+
          schema:
            type: string
        - name: companyHeadcountGrowth
          in: query
          description: >-
            Filter by company headcount growth in percent, as `min-max`.
            Example: `1-100`
          schema:
            type: string
        - name: annualRevenue
          in: query
          description: >-
            Filter by annual revenue in millions, as `min-max;currency` (USD by
            default). Examples: `1-10;USD`, `0.5-1000`
          schema:
            type: string
        - name: numOfFollowers
          in: query
          description: >-
            Filter by number of followers. Comma-separated. Available values:
            1-50, 51-100, 101-1000, 1001-5000, 5001+
          schema:
            type: string
        - name: departmentHeadcount
          in: query
          description: >-
            Filter by the headcount of a department, as `min-max;department`.
            Example: `10-100;Engineering`. Departments: 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, Support
          schema:
            type: string
        - name: departmentHeadcountGrowth
          in: query
          description: >-
            Filter by the headcount growth of a department in percent, as
            `min-max;department`. Example: `5-50;Sales`. Same departments as
            `departmentHeadcount`
          schema:
            type: string
        - name: jobOpportunities
          in: query
          description: >-
            Set to `HIRING_ON_LINKEDIN` to find companies that are hiring on
            LinkedIn
          schema:
            type: string
        - name: accountActivities
          in: query
          description: >-
            Filter by recent company activities. Comma-separated. Available
            values: SENIOR_LEADERSHIP_CHANGES_LAST_3_MONTHS,
            FUNDING_EVENTS_PAST_12_MONTHS
          schema:
            type: string
        - name: fortune
          in: query
          description: >-
            Filter by Fortune 500 rank. Comma-separated. Available values: 50
            (Fortune 50), 51_100, 101_250, 251_500
          schema:
            type: string
        - name: excludeHeadquarterLocations
          in: query
          description: Headquarters locations to exclude. Comma-separated (max 70)
          schema:
            type: string
        - name: excludeHeadquarterGeoIds
          in: query
          description: Headquarters Geo IDs to exclude. Comma-separated (max 70)
          schema:
            type: string
        - name: excludeIndustryIds
          in: query
          description: Industry IDs to exclude. Comma-separated (max 70)
          schema:
            type: string
        - name: excludeCompanyHeadcount
          in: query
          description: >-
            Company headcounts to exclude. Comma-separated. Same values as
            `companyHeadcount`
          schema:
            type: string
        - name: page
          in: query
          description: Page number for pagination (clamped at 100). 25 results per page
          schema:
            type: integer
            default: 1
        - name: sessionId
          in: query
          description: >-
            Session ID to use for the search. See
            https://docs.harvestapi.io/linkedin-api-reference/leads/search-leads#session-id
            for details.
          schema:
            type: string
      responses:
        '200':
          description: Account search response
          content:
            application/json:
              schema:
                type: object
                properties:
                  elements:
                    type: array
                    items:
                      $ref: '#/components/schemas/AccountShort'
                  pagination:
                    $ref: '#/components/schemas/Pagination'
                  status:
                    type: integer
                  error:
                    type: string
              example:
                elements:
                  - id: '1035'
                    name: Microsoft
                    linkedinUrl: https://www.linkedin.com/company/1035
                    description: >-
                      Every company has a mission. What's ours? To empower every
                      person and every organization to achieve more.
                    industry: Software Development
                    employeeCountRange: 10001+
                    employeeDisplayCount: 220K+
                    logoUrl: >-
                      https://media.licdn.com/dms/image/v2/D560BAQH32RJQCl3dDQ/company-logo_400_400/B56ZYQ0mrGGoAc-/0/1744038948046/microsoft_logo?e=1793836800&v=beta&t=JH7PTbL3UCVJmkaiI6Z2aUeXHDoVPM_TzQRclPPsptI
                    highlights:
                      - id: AIQ_STRATEGIC_PRIORITIES
                        label: Expansion of Cloud Services
                        header: Expansion of Cloud Services
                        message: null
                      - id: HIRING_ON_LINKEDIN
                        label: Hiring on Linkedin
                        header: Hiring on Linkedin
                        message: >-
                          Microsoft is actively hiring on LinkedIn. This is a
                          sign they may be increasing their headcount.
                      - id: SENIOR_LEADERSHIP_CHANGE
                        label: 21 senior leadership hires
                        header: Senior leadership hires in the last 90 days
                        message: >-
                          Microsoft’s senior leadership has recently changed.
                          This can signal an openness to explore new products or
                          services.
                  - id: '95716738'
                    name: Microsoft Intune
                    linkedinUrl: https://www.linkedin.com/company/95716738
                    description: >-
                      Microsoft Intune empowers your organization to simplify
                      endpoint management, help protect a hybrid workforce, and
                      power better user experiences.
                    industry: IT Services and IT Consulting
                    employeeCountRange: 10001+
                    employeeDisplayCount: '989'
                    logoUrl: >-
                      https://media.licdn.com/dms/image/v2/D4D0BAQGLOoNygVSSeg/company-logo_400_400/B4DZaCFLXBG8Ac-/0/1745939117800/microsoft_intune_product_logo?e=1793836800&v=beta&t=dMlG_JGIxIfrMOm4iFoJulTHXJYuFh-ouJm2ayOBCec
                    highlights: []
                pagination:
                  totalElements: 98574
                  totalPages: 100
                  pageNumber: 1
                  previousElements: 0
                  pageSize: 25
                status: 200
        '400':
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    AccountShort:
      type: object
      properties:
        id:
          type: string
          description: LinkedIn company ID
        name:
          type: string
          nullable: true
        linkedinUrl:
          type: string
          format: uri
        description:
          type: string
          nullable: true
        industry:
          type: string
          nullable: true
        employeeCountRange:
          type: string
          nullable: true
          description: >-
            Company size as stated on its page, in the form of the
            `companyHeadcount` values: 1-10, 11-50, 51-200, 201-500, 501-1000,
            1001-5000, 5001-10000, 10001+
        employeeDisplayCount:
          type: string
          nullable: true
          description: Employees on LinkedIn, as LinkedIn displays the number, e.g. "220K+"
        logoUrl:
          type: string
        highlights:
          type: array
          description: >-
            Signals about the company: "HIRING_ON_LINKEDIN" (hiring on
            LinkedIn), "SENIOR_LEADERSHIP_CHANGE" (senior leadership hires in
            the last 90 days) or "AIQ_STRATEGIC_PRIORITIES" (one of its
            strategic priorities, in `label`)
          items:
            $ref: '#/components/schemas/AccountHighlight'
    Pagination:
      type: object
      properties:
        totalPages:
          type: integer
          format: int32
        totalElements:
          type: integer
          format: int32
        pageNumber:
          type: integer
          format: int32
        previousElements:
          type: integer
          format: int32
        pageSize:
          type: integer
          format: int32
        paginationToken:
          type: string
          format: nullable
    Error:
      required:
        - error
        - message
      type: object
      properties:
        error:
          type: integer
          format: int32
        message:
          type: string
    AccountHighlight:
      type: object
      properties:
        id:
          type: string
          description: >-
            e.g. "HIRING_ON_LINKEDIN" or "SENIOR_LEADERSHIP_CHANGE" for a
            company, "RECENTLY_HIRED" or "POSTED_ON_LINKEDIN" for a person
        label:
          type: string
          nullable: true
        header:
          type: string
          nullable: true
        message:
          type: string
          nullable: true
  securitySchemes:
    ApiKeyAuthHeader:
      type: apiKey
      in: header
      name: X-API-Key

````

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