{
  "openapi": "3.0.1",
  "info": {
    "title": "Substack Newsletter Scraper - Subscribers, Pricing & Authors",
    "description": "Find Substack newsletters by keyword or category and get subscriber estimates, paid pricing, bestseller status, author info and recent posts. No login needed.",
    "version": "1.0",
    "x-build-id": "knxYApnjcznhtzjgS"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/brazen_kraken~substack-newsletter-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-brazen_kraken-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/brazen_kraken~substack-newsletter-scraper/runs": {
      "post": {
        "operationId": "runs-sync-brazen_kraken-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/brazen_kraken~substack-newsletter-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-brazen_kraken-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",
        "properties": {
          "categories": {
            "title": "Categories (leaderboards)",
            "type": "array",
            "description": "Pull newsletters from Substack's category leaderboards (ranked by popularity). Leave empty with keywords set to search every category.",
            "items": {
              "type": "string",
              "enum": [
                "96",
                "4",
                "62",
                "76739",
                "153",
                "13645",
                "podcast",
                "94",
                "15417",
                "76740",
                "76741",
                "103",
                "49715",
                "11",
                "223",
                "15414",
                "134",
                "339",
                "284",
                "355",
                "61",
                "109",
                "1796",
                "114",
                "387",
                "51282",
                "118",
                "18",
                "49692",
                "34",
                "76782",
                "76866",
                "76863"
              ],
              "enumTitles": [
                "Culture",
                "Technology",
                "Business",
                "U.S. Politics",
                "Finance",
                "Food & Drink",
                "Podcasts",
                "Sports",
                "Art & Illustration",
                "World Politics",
                "Health Politics",
                "News",
                "Fashion & Beauty",
                "Music",
                "Faith & Spirituality",
                "Climate & Environment",
                "Science",
                "Literature",
                "Fiction",
                "Health & Wellness",
                "Design",
                "Travel",
                "Parenting",
                "Philosophy",
                "Comics",
                "International",
                "Crypto",
                "History",
                "Humor",
                "Education",
                "Film & TV",
                "Home & Garden",
                "Games"
              ]
            }
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Only keep newsletters whose name, description or author bio contains one of these words, e.g. \"real estate\", \"AI\", \"marketing\".",
            "items": {
              "type": "string"
            }
          },
          "publicationUrls": {
            "title": "Specific newsletters",
            "type": "array",
            "description": "Newsletter URLs or subdomains to look up directly, e.g. https://www.lennysnewsletter.com or just \"bytebytego\".",
            "items": {
              "type": "string"
            }
          },
          "maxResults": {
            "title": "Max newsletters",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Stop after saving this many newsletters in total.",
            "default": 100
          },
          "minSubscribers": {
            "title": "Minimum subscribers",
            "minimum": 0,
            "type": "integer",
            "description": "Only keep newsletters with at least this many subscribers (based on Substack's public estimate). 0 = no filter.",
            "default": 0
          },
          "paidOnly": {
            "title": "Only newsletters with a paid tier",
            "type": "boolean",
            "description": "Keep only newsletters that offer paid subscriptions.",
            "default": false
          },
          "includeRecentPosts": {
            "title": "Include recent posts",
            "type": "boolean",
            "description": "Also fetch each newsletter's latest posts and compute engagement: average likes & comments per post, posts per month and last post date. Recommended for sponsorship research.",
            "default": true
          },
          "maxPostsPerPublication": {
            "title": "Posts per newsletter",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "How many recent posts to fetch per newsletter when \"Include recent posts\" is on.",
            "default": 10
          },
          "maxPagesPerCategory": {
            "title": "Max pages per category",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Each leaderboard page holds 25 newsletters. Most categories have about 20 pages.",
            "default": 25
          },
          "maxConcurrency": {
            "title": "Max concurrent requests",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Keep this low to stay polite to Substack.",
            "default": 3
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}