{
  "openapi": "3.0.1",
  "info": {
    "title": "Substack Scraper: Posts, Full Text, Newsletters & Leaderboards",
    "description": "Export every post of any Substack newsletter (custom domains too) with likes, comments, restacks and dates; full text and HTML of free posts; publication info with subscriber counts and prices; and category bestseller lists. No login.",
    "version": "0.0",
    "x-build-id": "ci4aORckSlMIAS6Ob"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/winterlock~substack-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-winterlock-substack-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/winterlock~substack-scraper/runs": {
      "post": {
        "operationId": "runs-sync-winterlock-substack-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/winterlock~substack-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-winterlock-substack-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": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "What to scrape",
            "enum": [
              "posts",
              "postDetails",
              "publicationDetails",
              "searchPublications"
            ],
            "type": "string",
            "description": "Posts of a publication (newest first), full content of specific posts, publication info, or Substack's category leaderboards.",
            "default": "posts"
          },
          "publications": {
            "title": "Publications",
            "type": "array",
            "description": "For Posts and Publication info. A Substack address (lenny.substack.com or just lenny), a custom domain (www.lennysnewsletter.com), a profile link (substack.com/@lenny) or any post link from the publication.",
            "items": {
              "type": "string"
            }
          },
          "postUrls": {
            "title": "Post URLs",
            "type": "array",
            "description": "For Full content of specific posts. Links such as https://name.substack.com/p/post-slug, a custom-domain post link, or https://substack.com/home/post/p-123456.",
            "items": {
              "type": "string"
            }
          },
          "categories": {
            "title": "Categories",
            "type": "array",
            "description": "For Find publications. Substack's top-level categories by name, slug or ID, for example: technology, business, us-politics, finance, culture. Each category's leaderboard is listed in the order chosen below.",
            "items": {
              "type": "string"
            }
          },
          "categoryRanking": {
            "title": "Category list",
            "enum": [
              "paid",
              "trending",
              "top"
            ],
            "type": "string",
            "description": "Bestsellers ranks by paid subscriptions (up to 100). Rising lists fast-growing publications (up to 75). Top is Substack's broader 'Top in <category>' list (up to 525).",
            "default": "paid"
          },
          "maxPostsPerPublication": {
            "title": "Max posts per publication",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Posts mode only. The newest posts come first unless Order is changed.",
            "default": 50
          },
          "sortBy": {
            "title": "Order",
            "enum": [
              "new",
              "top"
            ],
            "type": "string",
            "description": "Posts mode. Newest first, or Substack's own 'top' order (most popular).",
            "default": "new"
          },
          "postedAfter": {
            "title": "Posted on or after",
            "type": "string",
            "description": "Posts mode. A date like 2026-01-31 (UTC). Older posts are left out."
          },
          "postedBefore": {
            "title": "Posted before",
            "type": "string",
            "description": "Posts mode. A date like 2026-06-30 (UTC). Posts from this date on are left out."
          },
          "keyword": {
            "title": "Keyword",
            "type": "string",
            "description": "Posts mode. Only posts that Substack's archive search matches for this word or phrase."
          },
          "includeContent": {
            "title": "Include full post content",
            "type": "boolean",
            "description": "Posts mode. Adds the post text and HTML (free posts in full, paid posts as the public preview). One extra request per post, billed as a post with content.",
            "default": false
          },
          "onlyNewPosts": {
            "title": "Only new posts since the last run (monitoring)",
            "type": "boolean",
            "description": "Remembers the newest post saved for each publication and on later runs returns only newer ones. Schedule the Actor to get a feed of new posts and pay only for those.",
            "default": false
          },
          "maxPublicationsPerCategory": {
            "title": "Max publications per category",
            "minimum": 1,
            "maximum": 525,
            "type": "integer",
            "description": "Find publications mode. Bestsellers lists stop at 100, Rising at 75, Top at 525.",
            "default": 100
          },
          "maxItems": {
            "title": "Max items in total",
            "minimum": 1,
            "type": "integer",
            "description": "Stop the run after saving this many items. Leave empty for no limit."
          },
          "maxConcurrency": {
            "title": "Max parallel requests",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many requests run at once. Substack rate-limits bursts; three is a safe pace.",
            "default": 3
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Not needed for most runs. Use it if Substack starts refusing requests from the run's server.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}