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

# Extract LinkedIn Messages

> Extract messages from a LinkedIn conversation.

This action allows you to extract messages from a LinkedIn conversation, providing valuable insights into your communication history with connections.

### Inputs

<ParamField path="linkedin_thread_url" type="string" required={true} primary={true}>
  A message thread URL should look like:
  `https://www.linkedin.com/messaging/thread/2-OTFhNjRhZDUtY2M4ZS00OGMADFEFZEFEFEFE==/`
  or be a valid thread ID such as `2-OTFhNjRhZDUtY2M4ZS00OGASAFZGERGRG==/`.
</ParamField>

### Parameters

<ParamField path="max_days" type="number" default={0}>
  Specifies the maximum number of days from which data will be extracted. If the
  value is 0, this setting will be disabled. Maximum value is 1000.
</ParamField>

<ParamField path="max_minutes" type="number" default={0}>
  Specifies the maximum number of minutes from which data will be extracted. If
  the value is 0, this setting will be disabled. Maximum value is 10,000,000.
</ParamField>

### Output Fields

The extracted data includes the following fields:

<ResponseField>
  <Expandable title="properties">
    <ResponseField name="first_name" type="string">
      The first name of the LinkedIn user
    </ResponseField>

    <ResponseField name="full_name" type="string">
      The full name of the LinkedIn user
    </ResponseField>

    <ResponseField name="last_name" type="string">
      The last name of the LinkedIn user
    </ResponseField>

    <ResponseField name="linkedin_profile_handle" type="string">
      The LinkedIn profile handle
    </ResponseField>

    <ResponseField name="linkedin_profile_id" type="string">
      The LinkedIn profile ID
    </ResponseField>

    <ResponseField name="linkedin_profile_url" type="string">
      The LinkedIn profile URL
    </ResponseField>

    <ResponseField name="linkedin_thread_id" type="string">
      The LinkedIn thread ID
    </ResponseField>

    <ResponseField name="messages" type="array">
      The messages from the LinkedIn conversation
    </ResponseField>
  </Expandable>
</ResponseField>

Below is the JSON schema for the output:

<Accordion title="Show JSON Output Schema">
  ```json
  {
    "first_name": "string",
    "full_name": "string",
    "last_name": "string",
    "linkedin_profile_handle": "string",
    "linkedin_profile_id": "string",
    "linkedin_profile_url": "string",
    "linkedin_thread_id": "string",
    "messages": "array"
  }
  ```
</Accordion>

### Specificities

<Steps>
  <Step title="Locate LinkedIn Thread URL">
    Go to your LinkedIn Inbox [https://www.linkedin.com/messaging](https://www.linkedin.com/messaging). For each
    conversation you select, a thread URL will appear in your browser's
    navigation bar. It should look like:
    `https://www.linkedin.com/messaging/thread/662348847845156432/`.
  </Step>

  <Step title="Use Max Minutes">
    You can limit the number of messages based on the time of extraction. For
    example, if you had 3 new messages in the last hour and 10 in the last two
    hours, setting `max_minutes = 60` will collect only the 3 new messages.
  </Step>
</Steps>
