Skip to content

Python guide

Scrape LinkedIn company posts
with Python.
One script. No LinkedIn login.

A LinkedIn post scraper in one Python script: a company page’s recent posts with their full text, dates, likes and comments, saved to CSV. One API key. No LinkedIn login, cookies or browser.

  • 4 creditsper 10 posts
  • 5 creditsfor a post’s likes and comments
  • 0LinkedIn logins
import csv
import os
import requests

POSTS_URL = "https://www.monocrawl.com/v1/linkedin/company-posts"
HEADERS = {"x-api-key": os.environ["MONOCRAWL_API_KEY"]}
COMPANY = "https://www.linkedin.com/company/duolingo/"


def get_posts(company_url, max_pages=7):
    params = {"url": company_url}
    for _ in range(max_pages):
        body = requests.get(POSTS_URL, params=params, headers=HEADERS, timeout=60).json()
        if not body.get("success"):
            raise RuntimeError(body["error"]["message"])
        data = body["data"]
        yield from data["items"]
        if not data.get("has_more") or not data.get("cursor"):
            break
        params = {"url": company_url, "cursor": data["cursor"]}


POST_URL = "https://www.monocrawl.com/v1/linkedin/post"


def get_details(post_url):
    body = requests.get(POST_URL, params={"url": post_url}, headers=HEADERS, timeout=60).json()
    return body["data"] if body.get("success") else {}


with open("posts.csv", "w", newline="", encoding="utf-8") as file:
    writer = csv.writer(file)
    writer.writerow(["id", "created_at", "likes", "comments", "url", "text"])
    for post in get_posts(COMPANY):
        details = get_details(post["url"])
        stats = details.get("stats") or {}
        writer.writerow([post["id"], details.get("created_at") or post["created_at"], stats.get("likes"),
                         stats.get("comments"), post["url"], post["text"]])

$ python posts.py

GET /v1/linkedin/company-posts company/duolingo · page 1

✓ 10 posts · 4 credits · has_more: true

✓ page 2: 10 more posts · 4 credits · no repeats

✓ likes and comments from linkedin/post · 5 credits a post

✓ posts.csv · up to 7 pages ≈ 70 posts (estimate)

Replay of a real call, recorded 26 Sep 2026

Four steps

Copy, paste, run.
See what each step returns.

Terminal
export MONOCRAWL_API_KEY="mn_your_key_here"
pip install requests

What you get

MONOCRAWL_API_KEY=mn_••••••••Free plan · 1,000 credits a month · No card

What comes back

One company.
Real posts.

A real page of Duolingo’s LinkedIn posts: 10 posts for 4 credits, with the likes and comments 6 of them drew. Duolingo’s page has 889,553 followers.

  • idThe post’s LinkedIn activity id
  • textThe post’s full text
  • created_atWhen, as an ISO timestamp
  • urlThe post on linkedin.com
  • statsLikes and comments, from linkedin/post
  • image, imagesThe post’s images, from linkedin/post
  1. ABC, it’s easy as 123? So why don't we start with the ABCs when we teach you a new language?

    1621028 Sept 2026
  2. THROWBACK! This is what Duolingo looked like in 2014.

    1,21411625 Sept 2026
  3. Anyone else feeling a little... not sweaty lately?

    2411724 Sept 2026
  4. When 10-year-old Sue's mom, Sasa, completed the Danish course on Duolingo, Sue wanted to mark the occasion in a special way. She painted Duo, tucked into a soft green scene of leaves and little flowers, as a celebration gift.

    9021223 Sept 2026
  5. Are we allowed to say this four-letter word on here?

    24322 Sept 2026
  6. 木 is tree. 林 is woods.

    2,6634121 Sept 2026
Show the JSON
{
  "success": true,
  "data": {
    "has_more": true,
    "cursor": "mlc1.…",
    "items": [
      {
        "id": "7510308163322146816",
        "url": "https://www.linkedin.com/posts/duolingo_learning-activity-7510308163322146816-9EOI",
        "created_at": "2026-09-28T12:03:20.913Z",
        "text": "ABC, it’s easy as 123? So why don't we start with the ABCs when we teach you a new language?\n\nIf you’ve ever wondered how Duolingo works, this is one of the clearest examples.\n\nMost language courses start the same way: the alphabet. However, knowing how to recite letters doesn't get you very far when you're trying to ask for directions, or connect with someone in a language that isn't your own.\n\nSo the way we teach looks a little different.\n\nInstead, we use what's called the communicative approach.\n\nWhat is communicative approach? It means we prioritize the skills learners actually need in their daily lives. Within the first 15 units, learners can learn how to order food, navigate a store, and get help if something goes wrong. We call this \"survival language\" – the skills you need to meet your most basic needs. Think Maslow's hierarchy, but for languages.\n\nOnce you've got the foundations, then we start branching out into things that are less immediately necessary. Things like the alphabet, colors, and grammar details come in when they're genuinely useful. There is an exception: courses that teach non-Roman writing systems, like Japanese or Arabic.\n\nRead more about our communicative approach here: https://lnkd.in/g8eMXjZg\n\n#learning",
        "stats": {
          "likes": 162,
          "comments": 10
        }
      },
      {
        "id": "7509220764898770944",
        "url": "https://www.linkedin.com/posts/duolingo_throwback-this-is-what-duolingo-looked-like-activity-7509220764898770944-ZQ-W",
        "created_at": "2026-09-25T12:02:24.927Z",
        "text": "THROWBACK! This is what Duolingo looked like in 2014.\n\nOur app has changed a lot in the past 12 years, and we’re proud of how much we’ve improved it – both in terms of learning and design. The app teaches better and looks better too.\n\nDo you remember the old app?\n\n⬇️ Tell us in the comments how long you’ve been using Duolingo!",
        "stats": {
          "likes": 1214,
          "comments": 116
        }
      },
      {
        "id": "7508858406737465344",
        "url": "https://www.linkedin.com/posts/duolingo_anyone-else-feeling-a-little-not-sweaty-activity-7508858406737465344-9xXk",
        "created_at": "2026-09-24T12:02:32.002Z",
        "text": "Anyone else feeling a little... not sweaty lately?\n\nWell, it's officially fall.\n\nSchool in session, and summer is over. But don't be sad!\n\nThere's lots to look forward to this season: sweaters, soups, costumes, foliage, and honestly just sitting indoors without suffering serious FOMO... Or sitting outdoors and not getting 999 mosquito bites.\n\nWhat's your first sign that it's officially fall?",
        "stats": {
          "likes": 241,
          "comments": 17
        }
      },
      {
        "id": "7508497115711434752",
        "url": "https://www.linkedin.com/posts/duolingo_when-10-year-old-sues-mom-sasa-completed-activity-7508497115711434752-xCI9",
        "created_at": "2026-09-23T12:06:53.515Z",
        "text": "When 10-year-old Sue's mom, Sasa, completed the Danish course on Duolingo, Sue wanted to mark the occasion in a special way. She painted Duo, tucked into a soft green scene of leaves and little flowers, as a celebration gift.\n\nSue's dad, Guangchen Leo Ji, sent us a picture of the painting, hoping it might bring a smile to our team, and it did more than that. It made our whole day.\n\nThe Ji’s are a Chinese family living Denmark. Sasa learned Danish on Duolingo and now she's moving on to the English course.\n\nWe sent Sue a Duo plushie to say thank you, and her reaction might be our favorite part of this story. She told her friends the news right away and said it felt like her painting had come to life.\n\nWe hope that Duo loves his fan art as much as we do! \nSue, this one's for you. 💚",
        "stats": {
          "likes": 902,
          "comments": 12
        }
      },
      {
        "id": "7508133988419657728",
        "url": "https://www.linkedin.com/posts/duolingo_tap-tap-are-we-allowed-to-say-this-four-letter-activity-7508133988419657728-MT8M",
        "created_at": "2026-09-22T12:03:57.222Z",
        "text": "Are we allowed to say this four-letter word on here?\n\nK-I-S-S. 💋\n\nIn many cultures, kissing someone on the cheek isn’t romantic. It’s just how you say hello.\n\nPerhaps first you kiss the left and then the right cheek… Or maybe the right then the left… One cheek or two cheeks… Only blowing a kiss… Or even an air kiss…\n\nGet it wrong, and you'll either butt heads with a stranger or offend someone.\n\nLearning how to say “hello” is important in every language, but understanding a culture goes beyond that.\n\nWe put together a video that breaks down the culture of a greeting kiss around the world. We look at where it comes from, why it varies from culture to culture, and how to respect traditions abroad.\n\nSo, want to learn how to kiss? You should check out the video below.",
        "stats": {
          "likes": 24,
          "comments": 3
        }
      },
      {
        "id": "7507777682852483072",
        "url": "https://www.linkedin.com/posts/duolingo_learning-activity-7507777682852483072-ySu3",
        "created_at": "2026-09-21T12:28:07.337Z",
        "text": "木 is tree. \n林 is woods. \n森 is forest.\n\nIn Japanese and Chinese, some characters look very similar to their meanings.\n\nWriting in a new language starts with noticing patterns like that, and it gets harder from there.\n\nThat’s why we focus on building writing skills in multiple ways: \n-Character practice for Hanzi, Katakana, and Hangeul\n-Stories that make you answer in your own words\n-Flashcards you can type instead of speak\n\nWriting in a language strengthens your memory through retrieval practice. Retrieval practice is the active process of pulling vocabulary, grammar rules, or phonetic structures from memory. This all contributes to making learning more effective.\n\nHere's more on how we teach writing skills → https://lnkd.in/gKrrvWuj\n\n#learning",
        "stats": {
          "likes": 2663,
          "comments": 41
        }
      }
    ]
  }
}

Cost

4 credits a page.
Nothing for failures.

A page of 10 posts costs 4 credits; adding each post’s likes and comments costs 5 credits more. That is 54 credits for 10 posts with their counts. Slide to see what a collection costs.

378credits, 54 per 10 posts
$0a month: the free plan covers it, no card
2collections like this a month on the free plan

4 credits a page of 10 posts plus 5 credits a post for likes and comments. Without the counts, 70 posts cost 28 credits. Failed calls are free.

Two more things

The company page,
errors and rate limits.

The company page

For the company itself, call linkedin/company with the same URL: followers, employees on LinkedIn, industry, size and headquarters, 5 credits. Recorded for Duolingo: 889,553 followers and 3,232 employees on LinkedIn.

company.py
COMPANY_PAGE_URL = "https://www.monocrawl.com/v1/linkedin/company"

body = requests.get(COMPANY_PAGE_URL, params={"url": COMPANY}, headers=HEADERS, timeout=60).json()
page = body["data"]
print(page["name"], page["followers"], page["employees_count"], page["industry"])

Errors and rate limits

A failed call returns success: false with an error type and message, and costs nothing. On HTTP 429, wait and try again.

Rate limits by plan
posts.py
import time

def get_page(params, attempts=5):
    for attempt in range(attempts):
        response = requests.get(API_URL, params=params, headers=HEADERS, timeout=60)
        if response.status_code != 429:
            return response.json()
        time.sleep(2 ** attempt)
    raise RuntimeError("Still rate limited; try again later")

Other platforms

Same loop.
Swap the endpoint.

The same key collects a brand’s posts on other platforms. Each endpoint’s reference lists its fields and paging.

Questions

Scraping LinkedIn posts,
answered.

Do I need a LinkedIn account, cookies or a browser?

No. You call Monocrawl with your API key and get the posts back as JSON. Your own LinkedIn account is never involved.

How many posts does one call return?

One page of 10. Both recorded pages returned 10 posts with has_more set to true. Pass the cursor back with the same company URL; a company page goes back 7 pages.

What does it cost?

4 credits a page of 10 posts, and 5 credits a post for its likes and comments. The free plan’s 1,000 credits a month cover about 180 posts with their counts, or 2,500 without. Failed calls are free.

Can I get the comments themselves?

Yes. Pass a post’s URL to linkedin/post-comments: 10 comments a page with their text, time and likes, 4 credits a page.

Can I get a person’s posts instead of a company’s?

Yes. linkedin/profile-posts takes a profile URL and returns 20 posts a page with likes, comments and shares, 4 credits a page.

Does LinkedIn have an official API for this?

LinkedIn’s Community Management API reads posts for pages your app’s users administer, after LinkedIn approves your app. Monocrawl reads any public company page with one key.

Start free

Posts from any LinkedIn company page.
4 credits a page of 10.

1,000 free credits every month. No card required.

Get a free API key