Facebook Pixel
APILinkedIn Posts

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.

POST/posts/scrape

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.

Authentication requiredPosts

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

FieldTypeRequiredDescription
postUrlstringYesFull LinkedIn post URL to scrape
accountIdstringNoLinkedIn account ID for authenticated scraping (gets more data than public)
useCachebooleanNoWhether to use cached results if available
maxCacheAgenumberNoMaximum age of cached data in hours before refresh
maxProxyRetriesnumberNoNumber of proxy rotation attempts on failure
forceRefreshbooleanNoForce fresh scrape ignoring cache
dumpHtmlbooleanNoDebug: save raw HTML response to file
dumpPathstringNoDebug: file path to save HTML dump

Example

{
  "postUrl": "https://linkedin.com/posts/example-post"
}

Responses

StatusDescription
200Post details scraped successfully