# Export a Substack newsletter's archive with the full text

**Use case:** 

Give it a publication address and get its posts back with title, subtitle, author, date, URL and the full body text, up to the number of posts you ask for. Raise that number to take the whole back catalogue. A post whose body cannot be read is delivered with a note and is not charged for, so you never pay for an empty row.

## Input

```json
{
  "publications": [
    "https://www.astralcodexten.com"
  ],
  "maxPostsPerPublication": 200,
  "sort": "new",
  "includeBody": true,
  "includeComments": false,
  "postTypes": [
    "newsletter",
    "podcast",
    "thread",
    "video"
  ],
  "maxConcurrency": 2
}
```

## Output

```json
{
  "rowType": {
    "label": "Row type",
    "format": "string"
  },
  "publicationName": {
    "label": "Publication name",
    "format": "string"
  },
  "title": {
    "label": "Title",
    "format": "string"
  },
  "url": {
    "label": "Post URL",
    "format": "string"
  },
  "publishedAt": {
    "label": "Published at",
    "format": "string"
  },
  "type": {
    "label": "Type",
    "format": "string"
  },
  "audience": {
    "label": "Audience",
    "format": "string"
  },
  "paywalled": {
    "label": "Paywalled",
    "format": "boolean"
  },
  "wordCount": {
    "label": "Word count",
    "format": "integer"
  },
  "likes": {
    "label": "Likes",
    "format": "integer"
  },
  "commentCount": {
    "label": "Comments",
    "format": "integer"
  },
  "restacks": {
    "label": "Restacks",
    "format": "integer"
  },
  "authors": {
    "label": "Authors",
    "format": "array"
  },
  "bodyText": {
    "label": "Body text",
    "format": "string"
  },
  "input": {
    "label": "Input value",
    "format": "string"
  },
  "note": {
    "label": "Note",
    "format": "string"
  },
  "error": {
    "label": "Error",
    "format": "string"
  },
  "charged": {
    "label": "Charged",
    "format": "boolean"
  }
}
```

## About this Actor

This example demonstrates how to use [Substack Newsletter Scraper: Posts, Archive, Publication Data](https://apify.com/titian_fluorite/substack-scraper.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/titian_fluorite/substack-scraper.md) to learn more, explore other use cases, and run it yourself.


## How to integrate an Actor?

This Task's input is already configured above. Use it as-is rather than inventing a new one.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For full API examples (JavaScript, Python, CLI, MCP, OpenAPI), see this Task's Actor page: https://apify.com/titian_fluorite/substack-scraper.md

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).
