> ## 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 Posts

> Search LinkedIn posts across keywords, companies, profiles, and groups. Includes SDK V2 guidance, input constraints, response fields, and Deepline credit cost.

Search LinkedIn posts across keywords, companies, profiles, and groups.

<Info>
  Tool ID: `harvestapi_search_posts`
</Info>

## Run this action

Use the TypeScript SDK for a single call. Put `ctx.tools.execute(...)` inside a Play when the call should be durable, scheduled, or run across a CSV.

```ts theme={null}
import { Deepline } from 'deepline';

const deepline = await Deepline.connect();
const result = await deepline.tools.execute(
  'harvestapi_search_posts',
  {
    "authorKeywords": "software companies hiring engineers",
    "authorsCompany": "example",
    "authorsIndustryId": "authors_industry_123"
  },
);

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

### CLI

```bash theme={null}
deepline tools execute harvestapi_search_posts --input '{
  "authorKeywords": "software companies hiring engineers",
  "authorsCompany": "example",
  "authorsIndustryId": "authors_industry_123"
}' --json
```

## Example response

The SDK exposes this shape at `result.toolResponse.raw`. Values below are representative.

```json theme={null}
{
  "data": {
    "elements": [
      {
        "id": "id_123"
      }
    ],
    "pagination": {
      "totalPages": 123,
      "totalElements": 123,
      "pageNumber": 123
    },
    "status": 1
  }
}
```

Use `deepline tools get harvestapi_search_posts --json` for the latest machine-readable contract.

## Input reference

Search LinkedIn posts. Supports general, company, profile, and group filters documented by HarvestAPI on the shared post-search endpoint.

| Name                        | Type      | Required | Default | Details                                                                                                                                                                                                                                                                                                                                               |
| --------------------------- | --------- | -------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `payload.authorKeywords`    | `string`  | No       | —       | Filter by keywords in authors' profiles                                                                                                                                                                                                                                                                                                               |
| `payload.authorsCompany`    | `string`  | No       | —       | List of LinkedIn companies where authors of posts work (comma-separated). It supports company URLs and IDs.                                                                                                                                                                                                                                           |
| `payload.authorsIndustryId` | `string`  | No       | —       | List of LinkedIn industry IDs of authors' companies (comma-separated). It supports industry IDs. Full list of industry 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.company`           | `string`  | No       | —       | Filter posts by this company URL or URLs (comma-separated). Note: LinkedIn returns fewer results per company when using post search. To extract all posts by a company, use the /linkedin/company-posts endpoint                                                                                                                                      |
| `payload.companyId`         | `string`  | No       | —       | Filter posts by company ID or IDs (comma-separated). It's faster to search by ID. Note: LinkedIn returns fewer results per company when using post search. To extract all posts by a company, use the /linkedin/company-posts endpoint                                                                                                                |
| `payload.contentType`       | `string`  | No       | —       | Filter by content type. Supported values: 'videos', 'images', 'live\_videos', 'documents', 'collaborative\_articles', 'jobs'                                                                                                                                                                                                                          |
| `payload.group`             | `string`  | No       | —       | Group LinkedIn URL or Group ID                                                                                                                                                                                                                                                                                                                        |
| `payload.mentioningCompany` | `string`  | No       | —       | Filter posts mentioning this LinkedIn company URL or ID (comma-separated). It supports company URLs and IDs.                                                                                                                                                                                                                                          |
| `payload.mentioningMember`  | `string`  | No       | —       | Filter posts mentioning this LinkedIn profile URL or ID (comma-separated). It supports profile URLs and IDs.                                                                                                                                                                                                                                          |
| `payload.page`              | `integer` | No       | `1`     | Page number for pagination                                                                                                                                                                                                                                                                                                                            |
| `payload.paginationToken`   | `string`  | No       | —       | Required if it was returned by the previous page. Otherwise the page will always be 1 (on LinkedIn side). Doesn't apply for all queries, usually profile posts return this token Format: `nullable`.                                                                                                                                                  |
| `payload.postedLimit`       | `string`  | No       | —       | Filter posts by maximum posted date. Supported values: '24h', 'week', 'month'. This parameter will be sent to LinkedIn, the filtering will be done on their side                                                                                                                                                                                      |
| `payload.profile`           | `string`  | No       | —       | Filter posts by author's profile URL (comma-separated). Note: LinkedIn returns fewer results per profile when using post search. To extract all posts by a profile, use the /linkedin/profile-posts endpoint                                                                                                                                          |
| `payload.profileId`         | `string`  | No       | —       | Filter posts by author's profile ID or IDs (comma-separated). It's faster to search by ID. Note: LinkedIn returns fewer results per profile when using post search. To extract all posts by a profile, use the /linkedin/profile-posts endpoint                                                                                                       |
| `payload.scrapePostedLimit` | `string`  | No       | —       | Post-Filter posts by maximum posted date. Supported values: '1h', '24h', 'week','month', '3months', '6months', 'year'. This parameter will be applied after receiving results from LinkedIn, the filtering will be done on our side                                                                                                                   |
| `payload.search`            | `string`  | No       | —       | Keywords to search for in posts                                                                                                                                                                                                                                                                                                                       |
| `payload.sortBy`            | `string`  | No       | —       | Sort by field. Supported values: 'relevance', 'date'                                                                                                                                                                                                                                                                                                  |

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

  ### Input JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "Search LinkedIn posts. Supports general, company, profile, and group filters documented by HarvestAPI on the shared post-search endpoint.",
    "properties": {
      "authorKeywords": {
        "type": "string",
        "description": "Filter by keywords in authors' profiles"
      },
      "authorsCompany": {
        "type": "string",
        "description": "List of LinkedIn companies where authors of posts work (comma-separated). It supports company URLs and IDs."
      },
      "authorsIndustryId": {
        "type": "string",
        "description": "List of LinkedIn industry IDs of authors' companies (comma-separated). It supports industry IDs. Full list of industry IDs: https://github.com/HarvestAPI/linkedin-industry-codes-v2/blob/main/linkedin_industry_code_v2_all_eng.csv"
      },
      "company": {
        "type": "string",
        "description": "Filter posts by this company URL or URLs (comma-separated). Note: LinkedIn returns fewer results per company when using post search. To extract all posts by a company, use the /linkedin/company-posts endpoint"
      },
      "companyId": {
        "type": "string",
        "description": "Filter posts by company ID or IDs (comma-separated). It's faster to search by ID. Note: LinkedIn returns fewer results per company when using post search. To extract all posts by a company, use the /linkedin/company-posts endpoint"
      },
      "contentType": {
        "type": "string",
        "description": "Filter by content type. Supported values: 'videos', 'images', 'live_videos', 'documents', 'collaborative_articles', 'jobs'"
      },
      "group": {
        "type": "string",
        "description": "Group LinkedIn URL or Group ID"
      },
      "mentioningCompany": {
        "type": "string",
        "description": "Filter posts mentioning this LinkedIn company URL or ID (comma-separated). It supports company URLs and IDs."
      },
      "mentioningMember": {
        "type": "string",
        "description": "Filter posts mentioning this LinkedIn profile URL or ID (comma-separated). It supports profile URLs and IDs."
      },
      "page": {
        "type": "integer",
        "description": "Page number for pagination",
        "default": 1
      },
      "paginationToken": {
        "type": "string",
        "description": "Required if it was returned by the previous page. Otherwise the page will always be 1 (on LinkedIn side). Doesn't apply for all queries, usually profile posts return this token",
        "format": "nullable"
      },
      "postedLimit": {
        "type": "string",
        "description": "Filter posts by maximum posted date. Supported values: '24h', 'week', 'month'. This parameter will be sent to LinkedIn, the filtering will be done on their side"
      },
      "profile": {
        "type": "string",
        "description": "Filter posts by author's profile URL (comma-separated). Note: LinkedIn returns fewer results per profile when using post search. To extract all posts by a profile, use the /linkedin/profile-posts endpoint"
      },
      "profileId": {
        "type": "string",
        "description": "Filter posts by author's profile ID or IDs (comma-separated). It's faster to search by ID. Note: LinkedIn returns fewer results per profile when using post search. To extract all posts by a profile, use the /linkedin/profile-posts endpoint"
      },
      "scrapePostedLimit": {
        "type": "string",
        "description": "Post-Filter posts by maximum posted date. Supported values: '1h', '24h', 'week','month', '3months', '6months', 'year'. This parameter will be applied after receiving results from LinkedIn, the filtering will be done on our side"
      },
      "search": {
        "type": "string",
        "description": "Keywords to search for in posts"
      },
      "sortBy": {
        "type": "string",
        "description": "Sort by field. Supported values: 'relevance', 'date'"
      }
    },
    "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`  | Yes      | —       | —                          |
| `result.data.elements[].content`                     | `string`  | No       | —       | —                          |
| `result.data.elements[].linkedinUrl`                 | `string`  | No       | —       | —                          |
| `result.data.elements[].author`                      | `object`  | No       | —       | —                          |
| `result.data.elements[].author.id`                   | `string`  | No       | —       | —                          |
| `result.data.elements[].author.urn`                  | `string`  | No       | —       | —                          |
| `result.data.elements[].author.publicIdentifier`     | `string`  | No       | —       | —                          |
| `result.data.elements[].author.universalName`        | `string`  | No       | —       | —                          |
| `result.data.elements[].author.name`                 | `string`  | No       | —       | —                          |
| `result.data.elements[].author.linkedinUrl`          | `string`  | No       | —       | —                          |
| `result.data.elements[].author.type`                 | `boolean` | No       | —       | —                          |
| `result.data.elements[].author.info`                 | `boolean` | No       | —       | —                          |
| `result.data.elements[].author.website`              | `boolean` | No       | —       | —                          |
| `result.data.elements[].author.websiteLabel`         | `boolean` | No       | —       | —                          |
| `result.data.elements[].author.avatar`               | `object`  | No       | —       | —                          |
| `result.data.elements[].author.avatar.url`           | `string`  | No       | —       | —                          |
| `result.data.elements[].author.avatar.width`         | `integer` | No       | —       | Format: `int32`.           |
| `result.data.elements[].author.avatar.height`        | `integer` | No       | —       | Format: `int32`.           |
| `result.data.elements[].author.avatar.expiresAt`     | `integer` | No       | —       | Format: `int64`.           |
| `result.data.elements[].postedAt`                    | `object`  | No       | —       | —                          |
| `result.data.elements[].postedAt.timestamp`          | `integer` | No       | —       | —                          |
| `result.data.elements[].postedAt.date`               | `string`  | No       | —       | —                          |
| `result.data.elements[].postedAt.postedAgoShort`     | `string`  | No       | —       | —                          |
| `result.data.elements[].postedAt.postedAgoText`      | `string`  | No       | —       | —                          |
| `result.data.elements[].postImages`                  | `array`   | No       | —       | —                          |
| `result.data.elements[].postImages[].url`            | `string`  | No       | —       | —                          |
| `result.data.elements[].postImages[].width`          | `integer` | No       | —       | Format: `int32`.           |
| `result.data.elements[].postImages[].height`         | `integer` | No       | —       | Format: `int32`.           |
| `result.data.elements[].postImages[].expiresAt`      | `integer` | No       | —       | Format: `int64`.           |
| `result.data.elements[].postVideo`                   | `object`  | No       | —       | —                          |
| `result.data.elements[].postVideo.thumbnailUrl`      | `string`  | No       | —       | —                          |
| `result.data.elements[].postVideo.videoUrl`          | `string`  | No       | —       | —                          |
| `result.data.elements[].article`                     | `object`  | No       | —       | —                          |
| `result.data.elements[].article.title`               | `string`  | No       | —       | —                          |
| `result.data.elements[].article.subtitle`            | `string`  | No       | —       | —                          |
| `result.data.elements[].article.link`                | `string`  | No       | —       | —                          |
| `result.data.elements[].article.linkLabel`           | `string`  | No       | —       | —                          |
| `result.data.elements[].article.description`         | `string`  | No       | —       | —                          |
| `result.data.elements[].article.image`               | `object`  | No       | —       | —                          |
| `result.data.elements[].article.image.url`           | `string`  | No       | —       | —                          |
| `result.data.elements[].article.image.width`         | `integer` | No       | —       | Format: `int32`.           |
| `result.data.elements[].article.image.height`        | `integer` | No       | —       | Format: `int32`.           |
| `result.data.elements[].article.image.expiresAt`     | `integer` | No       | —       | Format: `int64`.           |
| `result.data.elements[].repostId`                    | `string`  | No       | —       | Format: `nullable`.        |
| `result.data.elements[].repost`                      | `record`  | No       | —       | —                          |
| `result.data.elements[].repostedBy`                  | `object`  | No       | —       | —                          |
| `result.data.elements[].repostedBy.publicIdentifier` | `string`  | No       | —       | —                          |
| `result.data.elements[].repostedBy.name`             | `string`  | No       | —       | —                          |

The table shows the first 50 fields. Expand the raw schema below for every field.

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

  ### Output JSON Schema

  ```json theme={null}
  {
    "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"
                },
                "content": {
                  "type": "string"
                },
                "linkedinUrl": {
                  "type": "string"
                },
                "author": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "urn": {
                      "type": "string"
                    },
                    "publicIdentifier": {
                      "type": "string"
                    },
                    "universalName": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "linkedinUrl": {
                      "type": "string"
                    },
                    "type": {
                      "type": "boolean"
                    },
                    "info": {
                      "type": "boolean"
                    },
                    "website": {
                      "type": "boolean"
                    },
                    "websiteLabel": {
                      "type": "boolean"
                    },
                    "avatar": {
                      "type": "object",
                      "properties": {
                        "url": {
                          "type": "string"
                        },
                        "width": {
                          "type": "integer",
                          "format": "int32"
                        },
                        "height": {
                          "type": "integer",
                          "format": "int32"
                        },
                        "expiresAt": {
                          "type": "integer",
                          "format": "int64"
                        }
                      },
                      "additionalProperties": false
                    }
                  },
                  "additionalProperties": false
                },
                "postedAt": {
                  "type": "object",
                  "properties": {
                    "timestamp": {
                      "type": "integer"
                    },
                    "date": {
                      "type": "string"
                    },
                    "postedAgoShort": {
                      "type": "string"
                    },
                    "postedAgoText": {
                      "type": "string"
                    }
                  },
                  "additionalProperties": false
                },
                "postImages": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "url": {
                        "type": "string"
                      },
                      "width": {
                        "type": "integer",
                        "format": "int32"
                      },
                      "height": {
                        "type": "integer",
                        "format": "int32"
                      },
                      "expiresAt": {
                        "type": "integer",
                        "format": "int64"
                      }
                    },
                    "additionalProperties": false
                  }
                },
                "postVideo": {
                  "type": "object",
                  "properties": {
                    "thumbnailUrl": {
                      "type": "string"
                    },
                    "videoUrl": {
                      "type": "string"
                    }
                  },
                  "additionalProperties": false
                },
                "article": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string"
                    },
                    "subtitle": {
                      "type": "string"
                    },
                    "link": {
                      "type": "string"
                    },
                    "linkLabel": {
                      "type": "string"
                    },
                    "description": {
                      "type": "string"
                    },
                    "image": {
                      "type": "object",
                      "properties": {
                        "url": {
                          "type": "string"
                        },
                        "width": {
                          "type": "integer",
                          "format": "int32"
                        },
                        "height": {
                          "type": "integer",
                          "format": "int32"
                        },
                        "expiresAt": {
                          "type": "integer",
                          "format": "int64"
                        }
                      },
                      "additionalProperties": false
                    }
                  },
                  "additionalProperties": false
                },
                "repostId": {
                  "type": "string",
                  "format": "nullable"
                },
                "repost": {
                  "type": "object"
                },
                "repostedBy": {
                  "type": "object",
                  "properties": {
                    "publicIdentifier": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "linkedinUrl": {
                      "type": "string"
                    }
                  },
                  "additionalProperties": false
                },
                "newsletterUrl": {
                  "type": "string"
                },
                "newsletterTitle": {
                  "type": "string"
                },
                "socialContent": {
                  "type": "object",
                  "properties": {
                    "hideCommentsCount": {
                      "type": "boolean"
                    },
                    "hideReactionsCount": {
                      "type": "boolean"
                    },
                    "hideSocialActivityCounts": {
                      "type": "boolean"
                    },
                    "hideShareAction": {
                      "type": "boolean"
                    },
                    "hideSendAction": {
                      "type": "boolean"
                    },
                    "hideRepostsCount": {
                      "type": "boolean"
                    },
                    "hideViewsCount": {
                      "type": "boolean"
                    },
                    "hideReactAction": {
                      "type": "boolean"
                    },
                    "hideCommentAction": {
                      "type": "boolean"
                    },
                    "shareUrl": {
                      "type": "string"
                    },
                    "showContributionExperience": {
                      "type": "boolean"
                    },
                    "showSocialDetail": {
                      "type": "boolean"
                    }
                  },
                  "additionalProperties": false
                },
                "engagement": {
                  "type": "object",
                  "properties": {
                    "likes": {
                      "type": "integer",
                      "format": "int32"
                    },
                    "comments": {
                      "type": "integer",
                      "format": "int32"
                    },
                    "shares": {
                      "type": "integer",
                      "format": "int32"
                    },
                    "reactions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string"
                          },
                          "count": {
                            "type": "integer",
                            "format": "int32"
                          }
                        },
                        "additionalProperties": false
                      }
                    }
                  },
                  "additionalProperties": false
                }
              },
              "required": [
                "id"
              ],
              "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](/docs/providers/harvestapi/guide)
* [SDK V2 quickstart](/docs/sdk-v2/quickstart)
* [SDK reference](/docs/sdk-v2/sdk-reference)
* [Run tools across a CSV](/docs/sdk-v2/batch-csv)
