{
  "openapi": "3.0.1",
  "info": {
    "title": "Substack Scraper - Posts, Subscribers & Paid Plan Prices",
    "description": "Scrape any Substack newsletter archive: post title, subtitle, date, full text, paywall state, likes, restacks and comment counts, plus the publication's subscriber size, paid plan prices and bestseller tier. Custom domains supported. No login, one flat price.",
    "version": "0.1",
    "x-build-id": "KPUZlqFFgz5c9iKsB"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/cirkit~substack-newsletter-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-cirkit-substack-newsletter-scraper",
        "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/cirkit~substack-newsletter-scraper/runs": {
      "post": {
        "operationId": "runs-sync-cirkit-substack-newsletter-scraper",
        "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/cirkit~substack-newsletter-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-cirkit-substack-newsletter-scraper",
        "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": [
          "publications"
        ],
        "properties": {
          "publications": {
            "title": "Publications",
            "minItems": 1,
            "type": "array",
            "description": "Substack publications to scrape. Accepts a publication URL (https://sherwood.substack.com), a custom domain (www.slowboring.com), a bare handle (sherwood), or any post URL, in which case its publication is scraped.",
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Max results",
            "minimum": 0,
            "type": "integer",
            "description": "Hard cap on rows returned across every publication in this run. Set 0 for no limit and the full archive is walked.",
            "default": 100
          },
          "maxPostsPerPublication": {
            "title": "Max posts per publication",
            "minimum": 0,
            "type": "integer",
            "description": "Cap per publication, useful when several publications share one Max results budget. Set 0 for no per-publication cap.",
            "default": 0
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "new",
              "top"
            ],
            "type": "string",
            "description": "Order Substack returns the archive in. Newest walks the archive back in time; Top returns the publication's best performing posts first.",
            "default": "new"
          },
          "searchQuery": {
            "title": "Search within the publication",
            "type": "string",
            "description": "Optional keyword. Substack filters the archive server side, so only matching posts are fetched and charged. Leave empty to walk the whole archive."
          },
          "postType": {
            "title": "Post type",
            "enum": [
              "any",
              "newsletter",
              "podcast",
              "thread",
              "video"
            ],
            "type": "string",
            "description": "Keep only one kind of post. Newsletter is a written article, podcast is an audio episode, thread is a discussion post and video is a video post.",
            "default": "any"
          },
          "audience": {
            "title": "Paywall",
            "enum": [
              "any",
              "free",
              "paid"
            ],
            "type": "string",
            "description": "Keep only free posts (readable by anyone) or only paywalled posts (paid or founding subscribers only).",
            "default": "any"
          },
          "publishedAfter": {
            "title": "Published after",
            "type": "string",
            "description": "Keep only posts published on or after this date, as 2026-01-31 or a full ISO timestamp."
          },
          "publishedBefore": {
            "title": "Published before",
            "type": "string",
            "description": "Keep only posts published on or before this date, as 2026-06-30 or a full ISO timestamp."
          },
          "includeBodyText": {
            "title": "Include full post text",
            "type": "boolean",
            "description": "Fetch each post's full article text as plain text. Costs one extra request per post, so the run is slower. Off by default because the excerpt is enough for most jobs.",
            "default": false
          },
          "includeBodyHtml": {
            "title": "Include full post HTML",
            "type": "boolean",
            "description": "Fetch each post's full article as HTML, keeping links, images and formatting. Costs one extra request per post and makes rows much larger.",
            "default": false
          },
          "includePublicationStats": {
            "title": "Include newsletter stats",
            "type": "boolean",
            "description": "Stamp every row with the publication's subscriber size, monthly and annual paid plan prices, bestseller tier, launch date and podcast flag. One extra request per publication, not per post.",
            "default": true
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxy settings. The Apify default works: Substack answers datacenter IPs normally and needs no residential traffic.",
            "default": {
              "useApifyProxy": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}