{
  "openapi": "3.0.1",
  "info": {
    "title": "Substack Scraper - Discover Newsletters, Posts & Authors",
    "description": "Search all of Substack by keyword to discover newsletters, then scrape full publication data, post archives, and author metadata. The only Substack actor with cross-platform discovery — find every AI newsletter, crypto blog, or niche publication in seconds.",
    "version": "0.1",
    "x-build-id": "cLh7rmGH5MDnuPCzb"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/undivided_alpenglow~substack-intelligence/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-undivided_alpenglow-substack-intelligence",
        "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/undivided_alpenglow~substack-intelligence/runs": {
      "post": {
        "operationId": "runs-sync-undivided_alpenglow-substack-intelligence",
        "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/undivided_alpenglow~substack-intelligence/run-sync": {
      "post": {
        "operationId": "run-sync-undivided_alpenglow-substack-intelligence",
        "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": "Mode",
            "enum": [
              "discovery",
              "publication",
              "category"
            ],
            "type": "string",
            "description": "What do you want to do?",
            "default": "discovery"
          },
          "searchQueries": {
            "title": "Search queries (discovery mode)",
            "type": "array",
            "description": "Keywords or topics to search for across Substack. One query per line.",
            "default": [
              "artificial intelligence"
            ],
            "items": {
              "type": "string"
            }
          },
          "publicationUrls": {
            "title": "Publication URLs (publication mode)",
            "type": "array",
            "description": "URLs of publications to scrape (e.g. https://stratechery.com or https://noahpinion.substack.com).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "category": {
            "title": "Category (category mode)",
            "enum": [
              "Technology",
              "Business",
              "Finance",
              "Crypto",
              "Culture",
              "News",
              "U.S. Politics",
              "World Politics",
              "Science",
              "Health & Wellness",
              "Climate & Environment",
              "Food & Drink",
              "Art & Illustration",
              "Music",
              "Literature",
              "Fiction",
              "Faith & Spirituality",
              "Design",
              "Travel",
              "Parenting",
              "Philosophy",
              "Comics",
              "History",
              "Humor",
              "Education",
              "Film & TV",
              "Home & Garden",
              "Fashion & Beauty",
              "International",
              "Sports"
            ],
            "type": "string",
            "description": "Which Substack category leaderboard to browse.",
            "default": "Technology"
          },
          "maxItemsPerQuery": {
            "title": "Max publications per query",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "How many publications to return per search query or category.",
            "default": 100
          },
          "maxPostsPerPublication": {
            "title": "Max posts per publication",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "In publication mode, how many recent posts to scrape per publication.",
            "default": 50
          },
          "includeFullBody": {
            "title": "Include full post body (costs more)",
            "type": "boolean",
            "description": "Fetch each post's full HTML body. Slower and costs more per post. Off = metadata only.",
            "default": false
          },
          "includePaywalledPreview": {
            "title": "Include paywalled post previews",
            "type": "boolean",
            "description": "Include paywalled posts, with their free preview text as the body. Full paid bodies cannot be scraped. Turn OFF to skip paywalled posts entirely (they are not returned at all).",
            "default": true
          },
          "minSubscribers": {
            "title": "Minimum subscribers (discovery mode)",
            "minimum": 0,
            "type": "integer",
            "description": "Filter out publications below this subscriber count. Note: ~50% of publications hide their count and will be skipped when this is >0.",
            "default": 0
          },
          "language": {
            "title": "Language filter (discovery & category modes)",
            "type": "string",
            "description": "Only return publications in this language, as a two-letter code (en, es, fr, de, …). Publications that don't report a language are skipped when this is set. Leave empty to return all languages.",
            "default": ""
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Datacenter proxy by default (included on every plan). Substack lightly rate-limits by IP — switch to residential proxies for large runs if your plan includes them.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}