LinkedIn Posts Data API for Python
John
Call the API from Python: a profile URL in, structured posts out with text, reactions, comments, and author. One row per post.
Input
Output fields
Sign up on Apify or log in
The LinkedIn Posts API | Scrape Profile Posts & Engagement Actor is ready to run with the inputs already set for "LinkedIn Posts Data API for Python". Sign up or log in and you'll land in Apify Console with a copy of this exact task.
Start the "LinkedIn Posts Data API for Python" task
The LinkedIn Posts API | Scrape Profile Posts & Engagement Actor will start running based on the input automatically. You can also change all the input fields, like profile urls (discover posts) and max posts per profile, to match your specific use case.
Receive the "LinkedIn Posts Data API for Python" output
Monitor the progress in real time. You will be notified as soon as your dataset is complete and ready for review. Each result includes data such as result type, author, text, and more.
Integrate into your workflow
The final output is delivered in JSON, CSV, or Excel format, ready to be plugged into your workflow. You can also run the "LinkedIn Posts Data API for Python" task via API.

One JSON object per post with authorName, text, numLikes, numComments, datePosted, postUrl and summary. apify-client hands them back as a Python list of dicts, and the same dataset downloads as CSV or Excel.
A dict with profileUrls, a list of LinkedIn profile or company URLs such as https://www.linkedin.com/in/williamhgates, and maxPostsPerProfile, 20 in the example. Add startDate and endDate in YYYY-MM-DD form to bound discovery.
Install apify-client, call the task with your profileUrls as task_input, then iterate the run's default dataset; each item is a dict. A worked script lives in the example repo.
Either works. Apify Console has Actions, then Schedule, on the task; a cron such as 0 7 * * * runs it daily with no server of yours awake. Or keep cron on your side and have the Python script start the run through apify-client.
Both can coexist. Add https://mcp.apify.com/?tools=actors,docs,johnvc/linkedin-posts-api as an MCP server in Claude or any other MCP client for ad hoc questions, and keep apify-client in Python for the batch jobs.
The same as from the Console: per post returned, with no per-run setup fee and no subscription. A small script asking for a few posts pays for a few, and the current rate is on the LinkedIn Posts API Actor page.
Both tasks run the same input and return the same overview rows. LinkedIn Posts Data API for Python is written for people calling the task from code with apify-client, while Scrape LinkedIn Posts to Structured JSON is the Console-first version.