Get DM for Linkedin

Get DM for Linkedin

by addeus

Export LinkedIn DMs and conversation history to JSON. Uses internal API interception for fast, accurate extraction without HTML rendering. Captures pa...

1,894 runs
3 users
Try This Actor

Opens on Apify.com

About Get DM for Linkedin

Export LinkedIn DMs and conversation history to JSON. Uses internal API interception for fast, accurate extraction without HTML rendering. Captures participants, timestamps, and text. Perfect for CRM sync and backups.

What does this actor do?

Get DM for Linkedin is a web scraping and automation tool available on the Apify platform. It's designed to help you extract data and automate tasks efficiently in the cloud.

Key Features

  • Cloud-based execution - no local setup required
  • Scalable infrastructure for large-scale operations
  • API access for integration with your applications
  • Built-in proxy rotation and anti-blocking measures
  • Scheduled runs and webhooks for automation

How to Use

  1. Click "Try This Actor" to open it on Apify
  2. Create a free Apify account if you don't have one
  3. Configure the input parameters as needed
  4. Run the actor and download your results

Documentation

LinkedIn Get Direct Messages Actor Apify actor that retrieves all direct messages from your LinkedIn messaging inbox with comprehensive conversation details, participant information, and message metadata. ## Features - Retrieves all conversations from LinkedIn messaging inbox - Extracts detailed information for each conversation: - Thread URL - Participant LinkedIn profile URL - Last message content - Sender information (firstname, lastname, occupation, company) - Message direction (from me or from contact) - Read/unread status - Message timestamp - Uses LinkedIn session cookies for authentication - Follows the same authentication pattern as other Apify LinkedIn actors - Multi-selector strategy for robust element detection - Automatic scrolling to load all conversations ## Input The actor requires the following input parameters: ### Required - liAtCookie (string, required): Your LinkedIn li_at cookie value for authentication - Example: "AQEDATEtZ..." - How to get it: Open LinkedIn in your browser, open Developer Tools (F12), go to Application/Storage → Cookies → https://www.linkedin.com, and copy the value of the li_at cookie ### Optional - jsessionid (string, optional): Your LinkedIn JSESSIONID cookie value for additional authentication - Example: "ajax:1234567890123456789" - Found in the same location as li_at cookie - userAgent (string, optional): Custom user agent string - Default: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36" - Use a recent Chrome/Edge user agent for best results ## Input Example json { "liAtCookie": "AQEDATEtZ...", "jsessionid": "ajax:1234567890123456789", "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36" } ## Output The actor outputs a single dataset item containing: - success (boolean): Whether the operation was successful - message (string): Status message - conversationCount (number): Total number of conversations retrieved - conversations (array): Array of conversation objects - timestamp (string): ISO timestamp of when the data was retrieved ### Conversation Object Structure Each conversation in the conversations array contains: - threadUrl (string): Direct URL to the conversation thread - linkedInUrl (string): LinkedIn profile URL of the contact - message (string): Content of the last message in the thread - lastMessageFromUrl (string): Profile URL of the last message sender - firstname (string): First name of the contact - lastname (string): Last name of the contact - occupation (string): Current job title/occupation of the contact - companyName (string): Company name where the contact works - isLastMessageFromMe (boolean): Whether the last message was sent by you - readStatus (boolean): Whether the conversation has been read (true = read, false = unread) - lastMessageDate (string): Human-readable date of the last message (e.g., "2h", "Yesterday", "Sep 01") - timestamp (string): ISO timestamp of the last message (if available) ## Output Example json { "success": true, "message": "Successfully retrieved 25 conversations", "conversationCount": 25, "conversations": [ { "threadUrl": "https://www.linkedin.com/messaging/thread/2-MGFjMTExN2YtOWI3NS00NmJlLWEyNjMtNjhlZDFjZWZkNDVkXzEwMA==/", "linkedInUrl": "https://www.linkedin.com/in/ACoAABJnny0ButYTqma7Tmq-SqQDoFJVPpqBIr8", "message": "Salut Pierre, j'ai vu que tu as jeté un œil à Hootsuite...", "lastMessageFromUrl": "https://www.linkedin.com/in/ACoAABJnny0ButYTqma7Tmq-SqQDoFJVPpqBIr8", "firstname": "Charlotte", "lastname": "Clemens", "occupation": "VP of Sales Enterprise Europe - Hootsuite & Talkwalker", "companyName": "Hootsuite", "isLastMessageFromMe": false, "readStatus": true, "lastMessageDate": "Sep 01", "timestamp": "2024-09-01T10:30:00.000Z" } ], "timestamp": "2025-01-15T14:23:45.123Z" } ## How It Works 1. Authentication: Sets LinkedIn session cookies (li_at and optionally JSESSIONID) 2. Navigation: Opens LinkedIn messaging page (https://www.linkedin.com/messaging/) 3. Conversation Loading: Automatically scrolls to load all available conversations 4. Data Extraction: For each conversation: - Extracts thread URL, message content, timestamp, and read status from the messaging list - Navigates to the contact's profile page - Extracts detailed profile information (name, occupation, company) 5. Output: Returns all conversation data in a structured format ## Performance - Execution Time: ~2-5 seconds per conversation (due to profile information extraction) - Scrolling: Automatically scrolls up to 5 times to load all conversations - Anti-Detection: Includes user-agent spoofing and webdriver masking ## Error Handling The actor will throw an error if: - The liAtCookie parameter is missing - LinkedIn returns a non-200 status code - The messaging page fails to load - Authentication fails (invalid cookies) ## Notes - Cookie Expiration: LinkedIn cookies expire periodically. If the actor fails, try getting fresh cookies from your browser. - Rate Limiting: LinkedIn may rate-limit requests if you run the actor too frequently. Use reasonable delays between runs. - Profile Privacy: Some profile information may not be available if the contact has restricted their profile visibility. - Headless Mode: The actor runs in headless mode by default for better performance. ## Security - Never share your li_at cookie publicly as it grants full access to your LinkedIn account - Use Apify's secret input feature to store cookies securely - Cookies are only used for authentication and are not stored or logged ## Use Cases - Export LinkedIn conversations for backup - Analyze messaging patterns and response rates - Integrate LinkedIn messaging data with CRM systems - Monitor unread messages and follow-ups - Generate reports on networking activities ## Related Actors - linkedin-send-dm: Send direct messages to LinkedIn profiles - linkedin-like-post: Automatically like LinkedIn posts - linkedin-comment-post: Automatically comment on LinkedIn posts - linkedin-quote-post: Repost LinkedIn content with your thoughts ## Support For issues or questions, please contact the development team. ## Version History - 1.0.0 (2025-01-15): Initial release - Basic conversation retrieval - Profile information extraction - Read status detection - Multi-selector strategies for robust element detection

Common Use Cases

Market Research

Gather competitive intelligence and market data

Lead Generation

Extract contact information for sales outreach

Price Monitoring

Track competitor pricing and product changes

Content Aggregation

Collect and organize content from multiple sources

Ready to Get Started?

Try Get DM for Linkedin now on Apify. Free tier available with no credit card required.

Start Free Trial

Actor Information

Developer
addeus
Pricing
Paid
Total Runs
1,894
Active Users
3
Apify Platform

Apify provides a cloud platform for web scraping, data extraction, and automation. Build and run web scrapers in the cloud.

Learn more about Apify

Need Professional Help?

Couldn't solve your problem? Hire a verified specialist on Fiverr to get it done quickly and professionally.

Find a Specialist

Trusted by millions | Money-back guarantee | 24/7 Support