Skip to main content

Linkedin Tool

Scrape LinkedIn posts by profile or search by keyword. Get engagement metrics, media, and complete metadata.

Quick Start

import { LinkedInTool } from '@bubblelab/bubble-core';
import { CredentialType } from '@bubblelab/shared-schemas';
const result = await new LinkedInTool({
operation: 'scrapePosts',
credentials: {
[CredentialType.APIFY_CRED]: process.env.APIFY_CRED as string,
},
}).action();

Operation Details

execute

operation 'scrapePosts' | 'searchPosts' required
Operation to perform: scrapePosts for user profiles, searchPosts for keyword search
username string
LinkedIn username (for scrapePosts operation). Examples: "satyanadella", "billgates"
keyword string
Keyword or phrase to search for (for searchPosts operation). Examples: "AI", "hiring", "n8n"
sortBy 'relevance' | 'date_posted'
Sort results by relevance or date posted (for searchPosts operation, default: relevance)
dateFilter '' | 'past-24h' | 'past-week' | 'past-month'
Filter posts by date range (for searchPosts operation, default: no filter)
limit number
Maximum number of posts to fetch (default: 50 for search, 100 for profiles)
pageNumber number
Page number for pagination (default: 1)
credentials Record<CredentialType,string>
Required credentials (auto-injected)