{
  "openapi": "3.0.1",
  "info": {
    "title": "Substack Scraper — Newsletters, Posts & Creator Leads",
    "description": "Scrape Substack: search newsletters by keyword, browse category leaderboards, pull full publication profiles (subscribers, paid pricing, podcast), posts, authors and the recommendation network. Turn creators into leads with contact emails. Monitoring mode. No API key, no browser.",
    "version": "0.1",
    "x-build-id": "QIdwooYHoFn5xL7Nb"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapesage~substack-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapesage-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/scrapesage~substack-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapesage-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/scrapesage~substack-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapesage-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": {
          "searchQueries": {
            "title": "Search queries (keywords)",
            "type": "array",
            "description": "Keywords to search Substack publications, e.g. <code>artificial intelligence</code>, <code>marketing</code>, <code>crypto</code>. Each query returns matching newsletters with full profiles. Combine with categories and start URLs.",
            "items": {
              "type": "string"
            }
          },
          "categories": {
            "title": "Category leaderboards",
            "type": "array",
            "description": "Browse top-ranked publications in these categories (the Substack leaderboard). Use names like <code>Technology</code>, <code>Business</code>, <code>Finance</code>, <code>Culture</code>, <code>U.S. Politics</code>, <code>Food &amp; Drink</code>, <code>Sports</code>, or a numeric category id.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Start URLs (publications, posts or authors)",
            "type": "array",
            "description": "Direct Substack URLs: a publication (<code>https://newsletter.substack.com</code> or a custom domain), a post (<code>.../p/the-slug</code>), or an author profile (<code>https://substack.com/@handle</code>). Mixed lists are fine.",
            "items": {
              "type": "string"
            }
          },
          "maxPublications": {
            "title": "Max publications",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Cap the number of unique publications collected across all search queries and categories. Start URLs are always processed.",
            "default": 100
          },
          "includePosts": {
            "title": "Include posts",
            "type": "boolean",
            "description": "For each publication, also emit its recent posts (title, date, audience, reactions, restacks, comments, word count, podcast info).",
            "default": false
          },
          "maxPostsPerPublication": {
            "title": "Max posts per publication",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "How many recent posts to return per publication when 'Include posts' is on.",
            "default": 20
          },
          "includePostContent": {
            "title": "Include full post content",
            "type": "boolean",
            "description": "Add the full post body (HTML and plain text) to each post record. Increases dataset size; leave off for metadata-only.",
            "default": false
          },
          "includeRecommendations": {
            "title": "Include recommendation network",
            "type": "boolean",
            "description": "Add the publications each newsletter recommends (the Substack growth/recommendation graph) as a 'recommends' array on the publication record.",
            "default": false
          },
          "includeAuthorProfiles": {
            "title": "Include author profiles",
            "type": "boolean",
            "description": "Emit one author record per unique creator (bio, follower count, subscriber band, bestseller tier, external links, all their publications). Also used for author start URLs.",
            "default": false
          },
          "enrichContactEmails": {
            "title": "Enrich creator leads (contact emails)",
            "type": "boolean",
            "description": "Crawl the publication's own website (custom domain home + about/contact, max 3 pages) for contact emails, phone and extra social links. Substack does not expose emails — this is the only way to get them. Adds a lead score.",
            "default": false
          },
          "onlyPaidPublications": {
            "title": "Only paid publications",
            "type": "boolean",
            "description": "Keep only publications that offer a paid subscription (they have monetization budget and sponsorship intent).",
            "default": false
          },
          "minFreeSubscribers": {
            "title": "Minimum free subscribers",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only publications with at least this many free subscribers (Substack publishes a free-subscriber count for most newsletters). 0 = no filter.",
            "default": 0
          },
          "monitorMode": {
            "title": "Monitoring mode — only new records",
            "type": "boolean",
            "description": "Remember publications and posts already returned and emit ONLY ones not seen in previous runs — ideal for scheduled runs that track new newsletters or new posts. Works alongside Apify Schedules.",
            "default": false
          },
          "monitorStoreName": {
            "title": "Monitor store name",
            "type": "string",
            "description": "Named key-value store that holds the 'already seen' ids for monitoring mode. Use a different name per tracked target to keep histories separate.",
            "default": "substack-monitor"
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Maximum parallel requests. Substack's public endpoints are tolerant; 5 is a safe, fast default.",
            "default": 5
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxy settings. Substack serves clean JSON from datacenter IPs, so the default Apify proxy is plenty.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}