{
  "openapi": "3.0.1",
  "info": {
    "title": "Substack Scraper - Find Newsletters, Posts & Comments",
    "description": "[$2.00 / 1K] Find Substack newsletters by category leaderboard or search, then scrape their posts, comments, authors and clean text. Ranked results, no URL list needed, no start fee.",
    "version": "0.1",
    "x-build-id": "bKppr5DcepHzx798l"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/webdata_labs~substack-intelligence-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-webdata_labs-substack-intelligence-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/webdata_labs~substack-intelligence-scraper/runs": {
      "post": {
        "operationId": "runs-sync-webdata_labs-substack-intelligence-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/webdata_labs~substack-intelligence-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-webdata_labs-substack-intelligence-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": {
          "urls": {
            "title": "Newsletter or post URLs",
            "type": "array",
            "description": "Public Substack URLs to collect. Both *.substack.com and custom publication domains are supported. Optional if you use Discovery below.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "categories": {
            "title": "Substack categories",
            "type": "array",
            "description": "Pull the ranked leaderboard for each selected Substack category. Substack serves at most 525 publications per category and ranking.",
            "items": {
              "type": "string",
              "enum": [
                "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"
              ]
            },
            "default": []
          },
          "leaderboardRanking": {
            "title": "Leaderboard ranking",
            "enum": [
              "all",
              "paid",
              "free"
            ],
            "type": "string",
            "description": "Which leaderboard ordering to read. 'Paid' is a genuinely different ranking of the same category, not a filter of 'All'.",
            "default": "all"
          },
          "searchQueries": {
            "title": "Search phrases",
            "type": "array",
            "description": "Find publications by keyword, for topics that do not map onto one category. Each phrase is searched separately.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxPublicationsPerSource": {
            "title": "Maximum publications per category or phrase",
            "minimum": 1,
            "maximum": 525,
            "type": "integer",
            "description": "How many publications to take from each category or search phrase. The source ceiling is 525 per category and ranking.",
            "default": 25
          },
          "discoveryOnly": {
            "title": "Only return the publication list",
            "type": "boolean",
            "description": "Return the ranked publications and stop, without collecting each newsletter's posts. Much faster and cheaper when you only need the list.",
            "default": false
          },
          "maxPostsPerNewsletter": {
            "title": "Maximum posts per newsletter",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum matching posts returned for each publication. Use 0 to collect the complete public archive.",
            "default": 50
          },
          "sortOrder": {
            "title": "Archive order",
            "enum": [
              "new",
              "top"
            ],
            "type": "string",
            "description": "Collect the newest posts first or the publication's top posts first.",
            "default": "new"
          },
          "contentType": {
            "title": "Content type",
            "enum": [
              "all",
              "newsletter",
              "podcast",
              "thread"
            ],
            "type": "string",
            "description": "Return every post type or only newsletters, podcasts, or Substack threads.",
            "default": "all"
          },
          "startDate": {
            "title": "Published on or after",
            "type": "string",
            "description": "Optional ISO date or timestamp. A YYYY-MM-DD value includes that entire UTC day."
          },
          "endDate": {
            "title": "Published on or before",
            "type": "string",
            "description": "Optional ISO date or timestamp. A YYYY-MM-DD value includes that entire UTC day."
          },
          "onlyFree": {
            "title": "Only free posts",
            "type": "boolean",
            "description": "Exclude subscriber-only and paid posts from the result dataset.",
            "default": false
          },
          "includeKeywords": {
            "title": "Include keywords",
            "type": "array",
            "description": "Keep posts whose title, subtitle, description, preview, or tags contain at least one phrase. Matching is case-insensitive.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "excludeKeywords": {
            "title": "Exclude keywords",
            "type": "array",
            "description": "Drop posts whose title, subtitle, description, preview, or tags contain any listed phrase.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "includeContent": {
            "title": "Include public post content",
            "type": "boolean",
            "description": "Fetch public post pages to extract the body. Paid post bodies are never returned.",
            "default": true
          },
          "contentFormat": {
            "title": "Content formats",
            "enum": [
              "html",
              "text",
              "markdown",
              "html_and_text",
              "all"
            ],
            "type": "string",
            "description": "Choose HTML, clean text, Markdown, or multiple body representations.",
            "default": "html_and_text"
          },
          "includeComments": {
            "title": "Include comments",
            "type": "boolean",
            "description": "Fetch public comments, nested replies, public author handles, reactions, and pinned status for each selected post.",
            "default": false
          },
          "commentOutput": {
            "title": "Comment output",
            "enum": [
              "nested",
              "separate",
              "both"
            ],
            "type": "string",
            "description": "Nest comments inside each post, emit analytics-friendly comment rows, or return both formats.",
            "default": "nested"
          },
          "includePublicationInfo": {
            "title": "Include publication metadata",
            "type": "boolean",
            "description": "Attach public publication identity and audience metadata to results.",
            "default": true
          },
          "publicationOutput": {
            "title": "Publication output",
            "enum": [
              "embedded",
              "separate",
              "both"
            ],
            "type": "string",
            "description": "Embed publication fields in posts, emit one publication row, or return both representations.",
            "default": "embedded"
          },
          "onlyNew": {
            "title": "Only new posts since previous runs",
            "type": "boolean",
            "description": "Remember emitted post IDs for this source and filter combination and suppress them in later runs.",
            "default": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}