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

# HarvestAPI: Search Companies

> Search LinkedIn companies by name, location, company size, and industry. Includes SDK V2 guidance, input constraints, response fields, and Deepline credit cost.

Search LinkedIn companies by name, location, company size, and industry.

> [!NOTE]
>
> Tool ID: `harvestapi_search_companies`

## Run this action

Use the TypeScript SDK for one call. Use `ctx.tools.execute(...)` inside a Play for durable calls, scheduled calls, or CSV processing.

```ts theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
import { Deepline } from 'deepline';

const deepline = await Deepline.connect();
const result = await deepline.tools.execute(
  'harvestapi_search_companies',
  {
    "search": "software companies hiring engineers",
    "location": "example",
    "geoId": "geo_123"
  },
);

console.log(result.toolResponse.raw);
```

### CLI

```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
deepline tools execute harvestapi_search_companies --input '{
  "search": "software companies hiring engineers",
  "location": "example",
  "geoId": "geo_123"
}' --json
```

## Example response

The SDK returns this shape at `result.toolResponse.raw`. The example values illustrate the response.

```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
{
  "data": {
    "elements": [
      {
        "universalName": "Example"
      }
    ],
    "pagination": {
      "totalPages": 123,
      "totalElements": 123,
      "pageNumber": 123
    },
    "status": 1
  }
}
```

Use `deepline describe harvestapi_search_companies --json` for the latest machine-readable contract.

## Input reference

Retrieve a list of LinkedIn companies matching the specified search criteria.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `payload.search` | `string` | No | — | Keywords to search for in company names. |
| `payload.location` | `string` | No | — | Filter companies by location. |
| `payload.geoId` | `string` | No | — | Filter by location as LinkedIn Geo ID. Overrides the location query param. Use the /linkedin/geo-id-search endpoint to find the Geo ID |
| `payload.companySize` | `string` | No | — | Filter by company size. One value or multiple comma-separated. Supported values: '1-10', '11-50', '51-200', '201-500', '501-1000', '1001-5000', '5001-10000', '10001+' |
| `payload.industryId` | `string` | No | — | Filter by industry ID. One value or multiple comma-separated industry IDs. Full list of IDs: [https://github.com/HarvestAPI/linkedin-industry-codes-v2/blob/main/linkedin\_industry\_code\_v2\_all\_eng.csv](https://github.com/HarvestAPI/linkedin-industry-codes-v2/blob/main/linkedin_industry_code_v2_all_eng.csv) |
| `payload.page` | `integer` | No | `1` | Page number for pagination. |

<details>
  <summary>Show raw input schema</summary>

  ### Input JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Retrieve a list of LinkedIn companies matching the specified search criteria.",
    "properties": {
      "search": {
        "type": "string",
        "description": "Keywords to search for in company names."
      },
      "location": {
        "type": "string",
        "description": "Filter companies by location."
      },
      "geoId": {
        "type": "string",
        "description": "Filter by location as LinkedIn Geo ID. Overrides the location query param. Use the /linkedin/geo-id-search endpoint to find the Geo ID"
      },
      "companySize": {
        "type": "string",
        "description": "Filter by company size. One value or multiple comma-separated. Supported values: '1-10', '11-50', '51-200', '201-500', '501-1000', '1001-5000', '5001-10000', '10001+'"
      },
      "industryId": {
        "type": "string",
        "description": "Filter by industry ID. One value or multiple comma-separated industry IDs. Full list of IDs: https://github.com/HarvestAPI/linkedin-industry-codes-v2/blob/main/linkedin_industry_code_v2_all_eng.csv"
      },
      "page": {
        "type": "integer",
        "description": "Page number for pagination.",
        "default": 1
      }
    },
    "required": [],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

Standard tool result payload.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `result.data` | `object` | Yes | — | Provider response payload. |
| `result.data.elements` | `array` | No | — | — |
| `result.data.elements[].id` | `string` | No | — | — |
| `result.data.elements[].name` | `string` | No | — | — |
| `result.data.elements[].industries` | `string` | No | — | — |
| `result.data.elements[].location` | `object` | No | — | — |
| `result.data.elements[].location.linkedinText` | `string` | No | — | — |
| `result.data.elements[].followers` | `string` | No | — | — |
| `result.data.elements[].summary` | `string \| null` | No | — | — |
| `result.data.elements[].logo` | `string \| null` | No | — | — |
| `result.data.elements[].linkedinUrl` | `string` | No | — | — |
| `result.data.elements[].universalName` | `string` | Yes | — | — |
| `result.data.pagination` | `object` | No | — | — |
| `result.data.pagination.totalPages` | `integer` | No | — | Format: `int32`. |
| `result.data.pagination.totalElements` | `integer` | No | — | Format: `int32`. |
| `result.data.pagination.pageNumber` | `integer` | No | — | Format: `int32`. |
| `result.data.pagination.previousElements` | `integer` | No | — | Format: `int32`. |
| `result.data.pagination.pageSize` | `integer` | No | — | Format: `int32`. |
| `result.data.pagination.paginationToken` | `string` | No | — | Format: `nullable`. |
| `result.data.status` | `string \| integer` | No | — | — |
| `result.data.error` | `string \| null` | No | — | — |
| `result.meta` | `object` | No | — | Additional response metadata (status, paging). |

<details>
  <summary>Show raw output schema</summary>

  ### Output JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Standard tool result payload.",
    "properties": {
      "data": {
        "type": "object",
        "description": "Provider response payload.",
        "properties": {
          "elements": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "industries": {
                  "type": "string"
                },
                "location": {
                  "type": "object",
                  "properties": {
                    "linkedinText": {
                      "type": "string"
                    }
                  },
                  "additionalProperties": false
                },
                "followers": {
                  "type": "string"
                },
                "summary": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "logo": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "linkedinUrl": {
                  "type": "string"
                },
                "universalName": {
                  "type": "string"
                }
              },
              "required": [
                "universalName"
              ],
              "additionalProperties": false
            }
          },
          "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"
              }
            },
            "additionalProperties": false
          },
          "status": {
            "type": [
              "string",
              "integer"
            ]
          },
          "error": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "additionalProperties": false
      },
      "meta": {
        "type": "object",
        "description": "Additional response metadata (status, paging).",
        "additionalProperties": true
      }
    },
    "required": [
      "data"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Deepline cost

* Pricing model: `provider_usage` (provider usage).
* Estimated Deepline credits: `0.03` per pricing unit.

## Related documentation

* [HarvestAPI provider guide](https://deepline.com/docs/providers/harvestapi/guide.md)
* [SDK V2 quickstart](https://deepline.com/docs/sdk-v2/quickstart.md)
* [SDK reference](https://deepline.com/docs/sdk-v2/sdk-reference.md)
* [Run tools across a CSV](https://deepline.com/docs/sdk-v2/batch-csv.md)


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