# LinkedIn Carousel Generator — Native PDF + Slide PNGs (`abidchaudhry/linkedin-carousel-generator`) Actor

Turn text slides into a native LinkedIn carousel: a 1080x1350 multi-page PDF for document posts, plus per-slide PNGs ready for Instagram carousels.

- **URL**: https://apify.com/abidchaudhry/linkedin-carousel-generator.md
- **Developed by:** [Abid Chaudhry](https://apify.com/abidchaudhry) (community)
- **Categories:** AI, Automation, Social media
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-usage

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## LinkedIn Carousel Generator — Native PDF + Slide PNGs

Turn a list of text slides into a **ready-to-upload LinkedIn carousel** — the multi-page 1080×1350 PDF that LinkedIn renders as a native swipeable document post — plus **per-slide PNGs** you can publish as an Instagram carousel from the same run.

Carousels are LinkedIn's highest-dwell-time format, but making them means fighting Canva for an hour or paying $30+/month for a carousel SaaS. This actor makes them from JSON in seconds, which means you can fully automate them (Zapier, Make, n8n, or a cron + HTTP call).

### What you get per run

- `carousel.pdf` — one page per slide at exactly 1080×1350. Upload it to LinkedIn as a **document post** and it becomes a native swipeable carousel.
- `slide-01.png` … `slide-NN.png` — the same slides as retina PNGs (2160×2700), ready for Instagram's carousel API or manual posting.
- A dataset item per output with a direct download `url` for downstream automation.

### Slide anatomy

Three slide roles, styled automatically with a clean editorial look:

- **cover** — kicker label + big headline + "Swipe →" hint (first slide by default)
- **body** — auto-numbered insight slides: big number, title, supporting text
- **cta** — closing slide with a "Follow @you for more" line (last slide by default)

Every slide carries your name, handle, avatar (or an initials circle), accent color, and an `N / total` pager. Pass `bgImage` on any slide for a full-bleed image slide with a gradient text overlay.

### Example input

```json
{
  "name": "Jane Doe",
  "handle": "@janedoe",
  "accent": "#c2410c",
  "slides": [
    { "kicker": "PLAYBOOK", "title": "5 habits that quietly compound", "body": "None of these take more than 10 minutes." },
    { "title": "Ship before you're ready", "body": "Perfect is a form of procrastination." },
    { "title": "Write it down or lose it", "body": "Your brain is for having ideas, not storing them." },
    { "title": "Default to async", "body": "Every meeting that could've been a message costs a deep-work block." },
    { "title": "Want the full system?", "body": "Follow for a new playbook every week." }
  ]
}
````

First slide becomes the cover, last becomes the CTA, middle slides are auto-numbered — override any of it with an explicit `variant`.

### Branding

- `accent` — any hex; used for the top bar, kicker, big numbers, CTA dot
- `theme` — optional object to change background/text colors and fonts (e.g. dark mode: `{"bg":"#0f1419","title":"#ffffff","body":"#d6dbdf","sub":"#8a97a3"}`)
- `avatarUrl` — your headshot in every footer

### Automation recipe

1. Have your LLM of choice output the slides JSON (the schema above is prompt-friendly).
2. Call this actor via the Apify API.
3. Take `carousel.pdf` → LinkedIn `/rest/documents` upload, or the PNGs → Instagram carousel container.
4. Post on a schedule. That's a carousel machine.

### FAQ

**How many slides?** 2–20. LinkedIn documents support more, but engagement falls off a cliff after ~10.

**Custom fonts?** Pass any Google Fonts import URL in `theme.fontImport` plus `theme.fontTitle` / `theme.fontBody`.

**Why PDF and not images for LinkedIn?** LinkedIn only renders *documents* (PDFs) as native swipeable carousels — image multi-posts display differently and reach differently.

# Actor input Schema

## `slides` (type: `array`):

2-20 slide objects. Each: { "variant": "cover|body|cta" (auto if omitted: first=cover, last=cta), "kicker": "small uppercase label", "title": "headline", "body": "supporting text", "accent": "#hex", "bgImage": "https url for full-bleed image slide" }. Body slides are auto-numbered.

## `name` (type: `string`):

Author name shown in every slide's footer.

## `handle` (type: `string`):

Author handle shown in the footer, with or without @.

## `avatarUrl` (type: `string`):

Optional https:// avatar shown in the footer. Falls back to an initials circle.

## `accent` (type: `string`):

Hex accent used for the top bar, kicker, numbers and CTA dot (per-slide accent overrides this).

## `theme` (type: `object`):

Optional theme overrides: { "bg", "title", "body", "sub", "muted", "fontTitle", "fontBody", "wtTitle", "lsTitle", "fontImport" }. Defaults to a clean white/Inter editorial look.

## `formats` (type: `array`):

Which outputs to render.

## `retina` (type: `boolean`):

Render PNGs at 2160x2700 for maximum sharpness.

## Actor input object example

```json
{
  "slides": [
    {
      "kicker": "PLAYBOOK",
      "title": "5 habits that quietly compound",
      "body": "None of these take more than 10 minutes."
    },
    {
      "title": "Ship before you're ready",
      "body": "Perfect is a form of procrastination. Version one just has to exist."
    },
    {
      "title": "Write it down or lose it",
      "body": "Your brain is for having ideas, not storing them."
    },
    {
      "title": "Default to async",
      "body": "Every meeting that could've been a message costs you a deep-work block."
    },
    {
      "title": "Want the full system?",
      "body": "Follow for a new playbook every week."
    }
  ],
  "name": "Your Name",
  "handle": "@yourhandle",
  "accent": "#1d9bf0",
  "formats": [
    "pdf",
    "png"
  ],
  "retina": true
}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "slides": [
        {
            "kicker": "PLAYBOOK",
            "title": "5 habits that quietly compound",
            "body": "None of these take more than 10 minutes."
        },
        {
            "title": "Ship before you're ready",
            "body": "Perfect is a form of procrastination. Version one just has to exist."
        },
        {
            "title": "Write it down or lose it",
            "body": "Your brain is for having ideas, not storing them."
        },
        {
            "title": "Default to async",
            "body": "Every meeting that could've been a message costs you a deep-work block."
        },
        {
            "title": "Want the full system?",
            "body": "Follow for a new playbook every week."
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("abidchaudhry/linkedin-carousel-generator").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "slides": [
        {
            "kicker": "PLAYBOOK",
            "title": "5 habits that quietly compound",
            "body": "None of these take more than 10 minutes.",
        },
        {
            "title": "Ship before you're ready",
            "body": "Perfect is a form of procrastination. Version one just has to exist.",
        },
        {
            "title": "Write it down or lose it",
            "body": "Your brain is for having ideas, not storing them.",
        },
        {
            "title": "Default to async",
            "body": "Every meeting that could've been a message costs you a deep-work block.",
        },
        {
            "title": "Want the full system?",
            "body": "Follow for a new playbook every week.",
        },
    ] }

# Run the Actor and wait for it to finish
run = client.actor("abidchaudhry/linkedin-carousel-generator").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "slides": [
    {
      "kicker": "PLAYBOOK",
      "title": "5 habits that quietly compound",
      "body": "None of these take more than 10 minutes."
    },
    {
      "title": "Ship before you'\''re ready",
      "body": "Perfect is a form of procrastination. Version one just has to exist."
    },
    {
      "title": "Write it down or lose it",
      "body": "Your brain is for having ideas, not storing them."
    },
    {
      "title": "Default to async",
      "body": "Every meeting that could'\''ve been a message costs you a deep-work block."
    },
    {
      "title": "Want the full system?",
      "body": "Follow for a new playbook every week."
    }
  ]
}' |
apify call abidchaudhry/linkedin-carousel-generator --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=abidchaudhry/linkedin-carousel-generator",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "LinkedIn Carousel Generator — Native PDF + Slide PNGs",
        "description": "Turn text slides into a native LinkedIn carousel: a 1080x1350 multi-page PDF for document posts, plus per-slide PNGs ready for Instagram carousels.",
        "version": "0.1",
        "x-build-id": "eJQ4D7bEzhYhlCCaf"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/abidchaudhry~linkedin-carousel-generator/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-abidchaudhry-linkedin-carousel-generator",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/abidchaudhry~linkedin-carousel-generator/runs": {
            "post": {
                "operationId": "runs-sync-abidchaudhry-linkedin-carousel-generator",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/abidchaudhry~linkedin-carousel-generator/run-sync": {
            "post": {
                "operationId": "run-sync-abidchaudhry-linkedin-carousel-generator",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "slides"
                ],
                "properties": {
                    "slides": {
                        "title": "Slides",
                        "type": "array",
                        "description": "2-20 slide objects. Each: { \"variant\": \"cover|body|cta\" (auto if omitted: first=cover, last=cta), \"kicker\": \"small uppercase label\", \"title\": \"headline\", \"body\": \"supporting text\", \"accent\": \"#hex\", \"bgImage\": \"https url for full-bleed image slide\" }. Body slides are auto-numbered."
                    },
                    "name": {
                        "title": "Display name",
                        "type": "string",
                        "description": "Author name shown in every slide's footer.",
                        "default": "Your Name"
                    },
                    "handle": {
                        "title": "Handle",
                        "type": "string",
                        "description": "Author handle shown in the footer, with or without @.",
                        "default": "@yourhandle"
                    },
                    "avatarUrl": {
                        "title": "Avatar image URL",
                        "type": "string",
                        "description": "Optional https:// avatar shown in the footer. Falls back to an initials circle."
                    },
                    "accent": {
                        "title": "Accent color",
                        "type": "string",
                        "description": "Hex accent used for the top bar, kicker, numbers and CTA dot (per-slide accent overrides this).",
                        "default": "#1d9bf0"
                    },
                    "theme": {
                        "title": "Theme (advanced)",
                        "type": "object",
                        "description": "Optional theme overrides: { \"bg\", \"title\", \"body\", \"sub\", \"muted\", \"fontTitle\", \"fontBody\", \"wtTitle\", \"lsTitle\", \"fontImport\" }. Defaults to a clean white/Inter editorial look."
                    },
                    "formats": {
                        "title": "Output formats",
                        "type": "array",
                        "description": "Which outputs to render.",
                        "items": {
                            "type": "string",
                            "enum": [
                                "pdf",
                                "png"
                            ],
                            "enumTitles": [
                                "PDF (LinkedIn document post)",
                                "PNGs (Instagram slides)"
                            ]
                        },
                        "default": [
                            "pdf",
                            "png"
                        ]
                    },
                    "retina": {
                        "title": "Retina (2x) PNGs",
                        "type": "boolean",
                        "description": "Render PNGs at 2160x2700 for maximum sharpness.",
                        "default": true
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
