Post with Python

Post to social media
with Python.

PostLake gives you one REST endpoint to publish to every major social network. From Python that's a single POST — no per-platform SDK, no OAuth dance in your code, and one normalised response you can reason over.

Get started free →

No card for the free tier · one API for every network · full MCP access

The fastest way: ask your agent

Prefer no code at all? Connect PostLake's hosted MCP server to your AI assistant (Claude, ChatGPT, Cursor and others) and just ask it to post. It authorizes over OAuth — no key to paste. See the MCP guide.

Post with Python

This is the whole integration — connect your accounts once in the dashboard, then:

import requests

resp = requests.post(
    "https://api.postlake.dev/v1/posts",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    json={
        "text": "Hello from Python 👋",
        "platforms": ["bluesky", "linkedin"],
        "profile": "my-brand",
    },
)
resp.raise_for_status()
print(resp.json())  # → one post id + a targets list with each live URL

Step by step

  1. Create an API key in your PostLake dashboard (Settings → API Keys).
  2. Connect the accounts you want to post to under a profile (once, in the dashboard).
  3. POST to /v1/posts with your text and the platforms — the example above is the whole integration.
  4. Read the normalised response: a post id plus a targets array with the live URL per network.

Good to know

Why PostLake

One call, every network

List the platforms in one request and PostLake posts to all of them, returning a single normalised shape — your code never branches per platform.

No app setup

PostLake manages each network's developer app and OAuth for you — nothing to register or get reviewed yourself.

Agent-safe

Idempotency keys mean a retry never double-posts, and analytics come back normalised so an agent can decide what to post next.

Honest pricing

A free tier to start, then usage-based credits — one per post. You only pay for posts that actually publish.

Common questions

How do I post to social media with Python?

Send a POST request to PostLake's /v1/posts endpoint with your API key, the text, and the platforms you want. PostLake handles every network's API for you and returns one normalised response — so a few lines of requests covers all of them.

Do I need a separate library for each social network?

No. That's the point of PostLake — one endpoint covers every network, so you use plain requests (or httpx) and never install a per-platform SDK.

Can I schedule a post from Python?

Yes — include a scheduledAt timestamp (ISO 8601, UTC) in the request body and PostLake fires the post at that time, with a webhook when it goes live.

More guides

Node.js · n8n · Make · Zapier · LangChain · All guides · Full docs

One API and MCP server for every major network. Free to start.

Get started free →