{
  "openapi": "3.0.1",
  "info": {
    "title": "Substack Newsletter & Creator Leads Scraper (Emails & Socials)",
    "description": "Find B2B sponsorship & outreach leads on Substack. Extracts exact subscriber counts, bestseller tiers, public emails, LinkedIn/X profiles, posting cadence, engagement metrics, and sponsorship fit scores.",
    "version": "1.0",
    "x-build-id": "0VRgwZVT67ecpBTPd"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/untiring_trustworthiness~substack-newsletter-leads-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-untiring_trustworthiness-substack-newsletter-leads-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/untiring_trustworthiness~substack-newsletter-leads-scraper/runs": {
      "post": {
        "operationId": "runs-sync-untiring_trustworthiness-substack-newsletter-leads-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/untiring_trustworthiness~substack-newsletter-leads-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-untiring_trustworthiness-substack-newsletter-leads-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": {
          "keywords": {
            "title": "Search Keywords",
            "type": "array",
            "description": "Keywords or niches to discover Substack newsletters (e.g., 'B2B SaaS', 'AI agents', 'fintech', 'cybersecurity', 'ecommerce').",
            "default": [
              "B2B SaaS",
              "AI agents"
            ],
            "items": {
              "type": "string"
            }
          },
          "categories": {
            "title": "Substack Categories (Optional)",
            "type": "array",
            "description": "Browse official Substack category leaderboards (e.g., 'technology', 'business', 'finance', 'culture', 'health-politics', 'design', 'crypto'). Leave empty if searching only by keywords.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "leaderboardTab": {
            "title": "Category Leaderboard Type",
            "enum": [
              "rising",
              "paid",
              "all"
            ],
            "type": "string",
            "description": "Which leaderboard ranking to pull when Categories are specified.",
            "default": "rising"
          },
          "seedUrls": {
            "title": "Seed Substack URLs or Handles (Optional)",
            "type": "array",
            "description": "Direct Substack URLs (e.g., 'https://blog.bytebytego.com', 'https://lenny.substack.com') or creator handles (e.g., 'bytebytego'). Great when combined with 'Expand Similar Newsletters'.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "expandRecommendations": {
            "title": "Snowball Similar Newsletters (Recommendations Graph)",
            "type": "boolean",
            "description": "Automatically discover peer newsletters recommended by the publications found in your search. Highly effective for building deep niche sponsorship lists.",
            "default": true
          },
          "minSubscribers": {
            "title": "Minimum Subscribers Filter",
            "minimum": 0,
            "type": "integer",
            "description": "Only return newsletters with at least this many reported subscribers (set to 0 to include newsletters that hide exact subscriber counts).",
            "default": 0
          },
          "onlyActiveDays": {
            "title": "Active Within Last N Days",
            "minimum": 0,
            "type": "integer",
            "description": "Filter out abandoned newsletters! Only keep publications that published a post within the last N days (set to 0 to disable).",
            "default": 90
          },
          "onlyWithOutreachChannel": {
            "title": "Require Actionable Outreach Channel",
            "type": "boolean",
            "description": "Only output (and bill for) leads that have at least one verified outreach channel: public email, LinkedIn, X/Twitter, or external website.",
            "default": false
          },
          "maxResults": {
            "title": "Max Leads to Extract",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum number of enriched newsletter leads to output. Free Apify plan trial users are capped at 15 leads per run.",
            "default": 50
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}