Scrape LinkedIn post details
Extract detailed information from a LinkedIn post URL including content, author, engagement metrics, and media. Uses caching to reduce API calls. Supports both authenticated and public scraping with proxy rotation for reliability.
/posts/scrapeScrape LinkedIn post details
Extract detailed information from a LinkedIn post URL including content, author, engagement metrics, and media. Uses caching to reduce API calls. Supports both authenticated and public scraping with proxy rotation for reliability.
Code Examples
curl -X POST 'https://api.connectsafely.ai/linkedin/posts/scrape' \ -H 'Authorization: Bearer <your_api_key>' \ -H 'Content-Type: application/json' \ -d '{"postUrl":"https://linkedin.com/posts/example-post"}'Parameters
No parameters.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
postUrl | string | Yes | Full LinkedIn post URL to scrape |
accountId | string | No | LinkedIn account ID for authenticated scraping (gets more data than public) |
useCache | boolean | No | Whether to use cached results if available |
maxCacheAge | number | No | Maximum age of cached data in hours before refresh |
maxProxyRetries | number | No | Number of proxy rotation attempts on failure |
forceRefresh | boolean | No | Force fresh scrape ignoring cache |
dumpHtml | boolean | No | Debug: save raw HTML response to file |
dumpPath | string | No | Debug: file path to save HTML dump |
Example
{
"postUrl": "https://linkedin.com/posts/example-post"
}Responses
| Status | Description |
|---|---|
| 200 | Post details scraped successfully |
Search posts by keyword
Search LinkedIn posts by keywords with filtering options. Find relevant content for engagement, monitor industry discussions, or discover trending topics. Filter by date posted, sort by relevance or recency, and target posts by author job titles.
LinkedIn Profiles API
Retrieve enriched LinkedIn profile data via API. Get work history, skills, education, and contact information for lead enrichment and CRM sync.
