{
  "openapi": "3.0.1",
  "info": {
    "title": "Substack Scraper: Posts, Full Text & Newsletter Subscribers",
    "description": "Scrape any Substack newsletter without login: posts with full text (Markdown, text or HTML), likes, comments, restacks, authors and tags, plus newsletter subscriber counts and paid plan prices. Keyword search and category leaderboards. $0.40 per 1,000 posts.",
    "version": "1.0",
    "x-build-id": "zXjARbBwitNyXgigp"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/best_apis~substack-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-best_apis-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/best_apis~substack-scraper/runs": {
      "post": {
        "operationId": "runs-sync-best_apis-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/best_apis~substack-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-best_apis-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",
        "properties": {
          "newsletters": {
            "title": "Newsletters or post links",
            "type": "array",
            "description": "Substack newsletters by address (https://www.noahpinion.blog, https://name.substack.com), bare subdomain (noahpinion), custom domain or open.substack.com link. A post link (https://name.substack.com/p/slug) returns just that post. Leave everything empty for a demo run.",
            "items": {
              "type": "string"
            }
          },
          "searchQueries": {
            "title": "Search Substack posts",
            "type": "array",
            "description": "Optional. Find posts across all of Substack by keyword (Substack's own search), e.g. \"ai agents\". Notes and comments are never returned.",
            "items": {
              "type": "string"
            }
          },
          "categories": {
            "title": "Discover newsletters by category (leaderboards)",
            "type": "array",
            "description": "Optional. Pull the top newsletters of Substack category leaderboards, with subscriber counts and prices. Set Max posts per newsletter to 0 to get only the newsletter rows.",
            "items": {
              "type": "string",
              "enum": [
                "technology",
                "business",
                "finance",
                "culture",
                "us-politics",
                "world-politics",
                "news",
                "science",
                "health",
                "crypto",
                "sports",
                "food",
                "music",
                "art",
                "fiction",
                "literature",
                "history",
                "education",
                "design",
                "travel",
                "parenting",
                "philosophy",
                "climate",
                "faith",
                "fashionandbeauty",
                "humor",
                "comics",
                "international",
                "health-politics",
                "film-and-tv",
                "home-garden",
                "games"
              ]
            }
          },
          "leaderboard": {
            "title": "Leaderboard",
            "enum": [
              "all",
              "paid"
            ],
            "type": "string",
            "description": "Which category leaderboard to read.",
            "default": "all"
          },
          "maxNewslettersPerCategory": {
            "title": "Max newsletters per category",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Leaderboard positions to read per category (25 per page).",
            "default": 25
          },
          "maxPostsPerNewsletter": {
            "title": "Max posts per newsletter",
            "minimum": 0,
            "type": "integer",
            "description": "Newest (or top) posts first, paged through the full archive until this limit. 0 = newsletter info only.",
            "default": 20
          },
          "maxPostsPerSearch": {
            "title": "Max posts per search query",
            "minimum": 1,
            "type": "integer",
            "description": "Search results to keep per query.",
            "default": 50
          },
          "sort": {
            "title": "Post order",
            "enum": [
              "new",
              "top"
            ],
            "type": "string",
            "description": "Order of each newsletter's archive.",
            "default": "new"
          },
          "publishedAfter": {
            "title": "Published after",
            "type": "string",
            "description": "Optional. Only posts newer than this: a date (2026-01-01) or a relative time like \"24 hours\", \"7 days\", \"3 months\"."
          },
          "audience": {
            "title": "Free or paid posts",
            "enum": [
              "all",
              "free",
              "paid"
            ],
            "type": "string",
            "description": "Paid posts include only the public preview the newsletter shows to non-subscribers.",
            "default": "all"
          },
          "contentFormat": {
            "title": "Post content format",
            "enum": [
              "markdown",
              "text",
              "html",
              "none"
            ],
            "type": "string",
            "description": "Full body of free posts (and the free preview of paid posts).",
            "default": "markdown"
          },
          "includeNewsletterInfo": {
            "title": "Include newsletter info rows",
            "type": "boolean",
            "description": "Add one row per newsletter: subscriber count, author, paid plan prices, language, launch date, logo. Category leaderboard rows are always included.",
            "default": true
          },
          "maxItems": {
            "title": "Max rows in total",
            "minimum": 1,
            "type": "integer",
            "description": "Hard cap for the whole run, so cost stays predictable.",
            "default": 5000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}