{
  "openapi": "3.0.1",
  "info": {
    "title": "Substack Scraper — Revenue, Sponsors, Posts & Author Leads",
    "description": "Zero-proxy 128MB Substack scraper for B2B sponsors, agencies, analysts & AI/RAG: 35-category paid/trending/all discovery, Stripe USD paid ARR floor, block & banner sponsor detection, MX/DMARC emails, RAG archives, Notes & comments, weekly watch_diff & HTML dashboard.",
    "version": "0.1",
    "x-build-id": "SaLw9PQGTz01nzcnh"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/maitreya_buddha~substack-scraper-sponsor-revenue-leads/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-maitreya_buddha-substack-scraper-sponsor-revenue-leads",
        "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/maitreya_buddha~substack-scraper-sponsor-revenue-leads/runs": {
      "post": {
        "operationId": "runs-sync-maitreya_buddha-substack-scraper-sponsor-revenue-leads",
        "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/maitreya_buddha~substack-scraper-sponsor-revenue-leads/run-sync": {
      "post": {
        "operationId": "run-sync-maitreya_buddha-substack-scraper-sponsor-revenue-leads",
        "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": {
          "mode": {
            "title": "What do you want to collect?",
            "enum": [
              "newsletter_intelligence",
              "post_sponsor_stream",
              "notes_and_comments"
            ],
            "type": "string",
            "description": "Newsletter Leads ($4/1K): paid revenue floor, sponsors, verified emails & report. Full-Text Posts ($0.40/1K): clean article text & sponsor links. Notes & Comments ($0.25/1K): public Notes & reader discussions.",
            "default": "newsletter_intelligence"
          },
          "categories": {
            "title": "Substack Categories",
            "type": "array",
            "description": "Pick categories to discover top newsletters (e.g., [\"technology\", \"business\", \"finance\", \"culture\"]).",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "searchQueries": {
            "title": "Keyword Search (Optional)",
            "type": "array",
            "description": "Search Substack by topic or niche keywords (e.g., [\"saas\", \"ai agents\", \"ecommerce\"]).",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "publicationUrlsOrHandles": {
            "title": "Specific Newsletter URLs or Handles (Optional)",
            "type": "array",
            "description": "Check specific Substack URLs, custom domains, or handles (e.g., [\"https://newsletter.pragmaticengineer.com\", \"bytebytego\"]).",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "maxPublications": {
            "title": "Maximum Newsletters",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "How many unique Substack newsletters to analyze (1 to 500).",
            "default": 15
          },
          "discoveryBoard": {
            "title": "Category Leaderboard Type",
            "enum": [
              "paid",
              "trending",
              "public_all",
              "both_leaderboards"
            ],
            "type": "string",
            "description": "Paid Bestsellers (top 100 paid), Rising/Trending (top 100 rising), All Public (up to 525 free+paid), or Both Leaderboards.",
            "default": "paid"
          },
          "maxPostsPerPublication": {
            "title": "Max Posts per Newsletter",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Recent posts checked for sponsor signals (5–20) or full archive posts exported in Post Stream mode (1–500).",
            "default": 10
          },
          "includeCleanPostText": {
            "title": "Include Full Clean Post Text (for AI / RAG)",
            "type": "boolean",
            "description": "In Post Stream mode, download full public article text with clean paragraph breaks and token counts.",
            "default": true
          },
          "maxNotesPerAuthor": {
            "title": "Max Notes per Author (Notes & Comments mode)",
            "minimum": 0,
            "maximum": 200,
            "type": "integer",
            "description": "Maximum public Substack Notes to collect per author (0 to 200).",
            "default": 20
          },
          "maxCommentsPerPost": {
            "title": "Max Comments per Post (Notes & Comments mode)",
            "minimum": 0,
            "maximum": 200,
            "type": "integer",
            "description": "Maximum nested reader comments to collect per post (0 to 200).",
            "default": 50
          },
          "upstreamItems": {
            "title": "Rows from Clay / Make / n8n / Another Actor",
            "type": "array",
            "description": "Optional JSON rows with url, subdomain, handle, category, or query fields for automated pipelines.",
            "default": []
          },
          "includeAboutAndDomainEnrich": {
            "title": "Find & Verify Author / Sponsor Emails",
            "type": "boolean",
            "description": "Checks the newsletter's /about page and custom domain contact page, then verifies email deliverability automatically.",
            "default": true
          },
          "outreachPersona": {
            "title": "Outreach Email Style",
            "enum": [
              "sponsor_brand",
              "b2b_agency",
              "pr_media",
              "micro_pe_analyst"
            ],
            "type": "string",
            "description": "Customizes the ready-to-send outreach subject and message to match your goal.",
            "default": "sponsor_brand"
          },
          "onlyWithEmail": {
            "title": "Only Keep Newsletters With Verified Email ($0 Skip Others)",
            "type": "boolean",
            "description": "Skip newsletters without a verified contact email at $0 cost.",
            "default": false
          },
          "onlyWithSponsorSignal": {
            "title": "Only Keep Newsletters Accepting Sponsors ($0 Skip Others)",
            "type": "boolean",
            "description": "Skip newsletters that show no sponsorship, ad, or media-kit links at $0 cost.",
            "default": false
          },
          "excludeDormant": {
            "title": "Hide Inactive 90d+ Newsletters ($0 Skip)",
            "type": "boolean",
            "description": "Skip newsletters that have not published in over 90 days at $0 cost.",
            "default": false
          },
          "minBestsellerTier": {
            "title": "Minimum Paid Subscribers Tier ($0 Skip Below)",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Keep only newsletters with at least this verified paid subscriber badge tier (0, 100, 1000, or 10000).",
            "default": 0
          },
          "watchDiff": {
            "title": "Track Weekly Changes Only ($0 When Unchanged)",
            "type": "boolean",
            "description": "Skips unchanged newsletters at $0 and alerts you when a newsletter adds sponsors, changes pricing, or crosses a subscriber tier.",
            "default": false
          },
          "dedupStoreName": {
            "title": "Change-Tracking Memory Store Name",
            "type": "string",
            "description": "Optional name to isolate weekly tracking history per client or campaign.",
            "default": "substack-intel-watch"
          },
          "crmPreset": {
            "title": "CRM CSV Export Format",
            "enum": [
              "default",
              "instantly",
              "smartlead",
              "hubspot",
              "lemlist"
            ],
            "type": "string",
            "description": "Export flat columns ready for Instantly, Smartlead, HubSpot, or Lemlist (Default keeps all fields).",
            "default": "default"
          },
          "generateDashboardHtml": {
            "title": "Create Visual HTML Executive Report",
            "type": "boolean",
            "description": "Saves a shareable interactive OUTPUT_DASHBOARD.html report you can open in any browser.",
            "default": true
          },
          "webhookUrl": {
            "title": "Slack / Discord / CRM Webhook URL",
            "type": "string",
            "description": "Optional HTTPS webhook URL to receive top sponsor leads and weekly change alerts.",
            "default": ""
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}