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

# Search Posts

> Extract and search LinkedIn posts with various filters

Search and extract LinkedIn posts with advanced filtering options including post type, sorting, keywords, and date filters.

<Note>
  **Credit Usage:** 1 credit per 10 results (or fraction thereof). For example:

  * 1-10 results = 1 credit
  * 11-20 results = 2 credits
  * 300 results = 30 credits
</Note>

### Header Parameters

<ParamField header="x-api-key" type="string" required>
  Your API key
</ParamField>

### Body Parameters

<ParamField body="post_type" type="string">
  Type of posts to search for: "photos" or "jobs" or "videos"
</ParamField>

<ParamField body="sort_by" type="string" default="date_posted">
  How to sort the results: "date\_posted" or "relevance"
</ParamField>

<ParamField body="country" type="string" default="FR">
  Country code for proxy selection. Available: (US, UK, FR, DE, NL, IT, IL, CA, BR, ES, IN)
</ParamField>

<ParamField body="keyword" type="string">
  Search keyword for posts
</ParamField>

<ParamField body="post_date" type="string">
  Filter posts by date: "past-24h" or "past-week" or "past-month"
</ParamField>

<ParamField body="linkedin_url" type="string">
  LinkedIn profile URL to extract posts from
</ParamField>

<ParamField body="total_results" type="integer" default="10">
  Number of posts to retrieve (used when not in pagination mode)
</ParamField>

<ParamField body="start_page" type="integer">
  First page to fetch when using pagination mode (default: 1)
</ParamField>

<ParamField body="end_page" type="integer">
  Last page to fetch when using pagination mode (default: same as start\_page)
</ParamField>

<ParamField body="login_token" type="string" required>
  LinkedIn authentication cookie obtained from the login/verify process
</ParamField>

### Response

<ResponseField name="status" type="string">
  Request status (success/error)
</ResponseField>

<ResponseField name="data" type="object">
  <Expandable title="Properties">
    <ResponseField name="total_results" type="integer">
      Number of posts returned
    </ResponseField>

    <ResponseField name="pagination" type="object">
      <Expandable title="Pagination Object">
        <ResponseField name="start_page" type="integer">
          First page fetched in the current request
        </ResponseField>

        <ResponseField name="end_page" type="integer">
          Last page fetched in the current request
        </ResponseField>

        <ResponseField name="results_per_page" type="integer">
          Number of results per page (typically 50)
        </ResponseField>

        <ResponseField name="pages_fetched" type="integer">
          Total number of pages fetched in the current request
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="posts" type="array">
      <Expandable title="Post Object">
        <ResponseField name="shareAudience" type="string">
          Visibility of the post (e.g., "PUBLIC")
        </ResponseField>

        <ResponseField name="shareUrl" type="string">
          URL of the post
        </ResponseField>

        <ResponseField name="text" type="string">
          Content of the post
        </ResponseField>

        <ResponseField name="created_time" type="string">
          Timestamp when the post was created
        </ResponseField>

        <ResponseField name="numLikes" type="integer">
          Number of likes on the post
        </ResponseField>

        <ResponseField name="numComments" type="integer">
          Number of comments on the post
        </ResponseField>

        <ResponseField name="numShares" type="integer">
          Number of shares of the post
        </ResponseField>

        <ResponseField name="actor_name" type="string">
          Name of the post author
        </ResponseField>

        <ResponseField name="actor_description" type="string">
          Description/headline of the post author
        </ResponseField>

        <ResponseField name="actor_image" type="string">
          Profile image URL of the post author
        </ResponseField>

        <ResponseField name="actor_profile_url" type="string">
          LinkedIn profile URL of the post author
        </ResponseField>

        <ResponseField name="post_images" type="array">
          Array of image URLs included in the post
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseExample>
  ```json Success Response theme={null}
  {
    "status": "success",
    "data": {
      "total_results": 1,
      "pagination": {
          "start_page": 1,
          "end_page": 1,
          "results_per_page": 50,
          "pages_fetched": 1
        },
      "posts": [
        {
          "shareAudience": "PUBLIC",
          "shareUrl": "https://www.linkedin.com/posts/user_post-activity-123",
          "text": "Example post content",
          "created_time": "2023-04-01T12:00:00",
          "numLikes": 50,
          "numComments": 10,
          "numShares": 5,
          "actor_name": "John Doe",
          "actor_description": "Software Engineer at Tech Company",
          "actor_image": "https://media.licdn.com/dms/image/profile.jpg",
          "actor_profile_url": "https://www.linkedin.com/in/johndoe",
          "post_images": [
            "https://media.licdn.com/dms/image/post1.jpg"
          ]
        }
      ]
    }
  }
  ```
</ResponseExample>

### Notes

* Images URLs are direct links to LinkedIn's media servers
* Text content has special characters normalized
* Social metrics (likes, comments, shares) are included when available
* Post visibility information is included
* Results are paginated with a maximum of 50 posts per page
* **Pagination Mode vs. Total Results Mode**:
  * **Total Results Mode**: Use the `total_results` parameter to specify how many posts you want (default)
  * **Pagination Mode**: Use `start_page` and `end_page` parameters to fetch specific pages of results
  * Credit usage in pagination mode is based on the number of pages fetched (1 credit per page)
  * When using pagination mode, `total_results` parameter is ignored
* The API supports:
  * Multiple filtering options
  * Custom sort orders
  * Keyword search
  * Date-based filtering
  * Profile-specific post extraction
* Post content may be limited based on:
  * Privacy settings
  * Network connection level
  * Content visibility settings
