{
  "openapi": "3.0.1",
  "info": {
    "title": "Substack Publications Scraper — Newsletter Directory & Spons",
    "description": "Scrape Substack publications from category leaderboards, keyword search, or exact URLs: author, X/Twitter handle, audience bucket, paid plan price, language, and launch date. Optional posting cadence and engagement. Monitor for newly listed newsletters.",
    "version": "0.1",
    "x-build-id": "Oa9oICEe0YhJHBvRs"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/spotless_studios~substack-publications-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-spotless_studios-substack-publications-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/spotless_studios~substack-publications-scraper/runs": {
      "post": {
        "operationId": "runs-sync-spotless_studios-substack-publications-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/spotless_studios~substack-publications-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-spotless_studios-substack-publications-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": {
          "categories": {
            "title": "Categories",
            "type": "array",
            "description": "Substack categories to scan, e.g. Technology, Business, Finance. Leave empty (with no search queries or publication URLs) to scan every category. Each category exposes up to ~525 publications from its leaderboard.",
            "items": {
              "type": "string"
            }
          },
          "ranking": {
            "title": "Leaderboard",
            "enum": [
              "all",
              "paid"
            ],
            "type": "string",
            "description": "Which category leaderboard to read: all publications, or paid publications only.",
            "default": "all"
          },
          "searchQueries": {
            "title": "Search queries",
            "type": "array",
            "description": "Find publications by keyword (name, topic, author). Each query returns up to ~70 matches, so add several queries for wider coverage.",
            "items": {
              "type": "string"
            }
          },
          "publicationUrls": {
            "title": "Specific publications",
            "type": "array",
            "description": "Look up exact publications by URL, @handle, or domain, e.g. https://example.substack.com or @example.",
            "items": {
              "type": "string"
            }
          },
          "languages": {
            "title": "Languages",
            "type": "array",
            "description": "Keep publications written in any of these languages, using codes like en, es, de.",
            "items": {
              "type": "string"
            }
          },
          "publicationTypes": {
            "title": "Publication types",
            "type": "array",
            "description": "Keep any of: newsletter, podcast.",
            "items": {
              "type": "string"
            }
          },
          "paidOnly": {
            "title": "Paid subscriptions enabled only",
            "type": "boolean",
            "description": "Keep publications that currently accept paid subscriptions.",
            "default": false
          },
          "minAudienceOrderOfMagnitude": {
            "title": "Minimum audience size bucket",
            "minimum": 1,
            "type": "integer",
            "description": "Substack publishes audience as buckets (hundreds, thousands, tens of thousands...). Enter 1000 to keep publications at \"thousands\" or above, 10000 for \"tens of thousands\" or above. Publications with no published audience figure are dropped."
          },
          "minMonthlyPriceUsd": {
            "title": "Min monthly price (USD)",
            "minimum": 0,
            "type": "number",
            "description": "Cheapest regular monthly paid plan, in US dollars. Publications priced in other currencies are dropped when this is set."
          },
          "maxMonthlyPriceUsd": {
            "title": "Max monthly price (USD)",
            "minimum": 0,
            "type": "number",
            "description": "Cheapest regular monthly paid plan, in US dollars."
          },
          "launchedAfter": {
            "title": "Launched after",
            "type": "string",
            "description": "Keep publications whose first post is on or after this date (YYYY-MM-DD). Useful for spotting new newsletters."
          },
          "launchedBefore": {
            "title": "Launched before",
            "type": "string",
            "description": "Keep publications whose first post is on or before this date (YYYY-MM-DD)."
          },
          "requireOwnerTwitter": {
            "title": "Require author X/Twitter handle",
            "type": "boolean",
            "description": "Keep only publications whose author lists an X/Twitter handle.",
            "default": false
          },
          "requireSupportEmail": {
            "title": "Require support email",
            "type": "boolean",
            "description": "Keep only publications that publish a support email. Most do not, so expect few results.",
            "default": false
          },
          "includeActivity": {
            "title": "Include publishing activity",
            "type": "boolean",
            "description": "Reads each publication's newest posts to add latest post date, posts per month, average reactions and comments, average length, and paid-post share. Billed as an add-on per saved publication.",
            "default": false
          },
          "activityPosts": {
            "title": "Posts to analyse",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "How many of the newest posts to read per publication (1-50). Counts such as posts in the last 90 days are limited to this window.",
            "default": 12
          },
          "minPostsPerMonth": {
            "title": "Min posts per month",
            "minimum": 0,
            "type": "number",
            "description": "Keep publications that publish at least this often. Turns on publishing activity."
          },
          "maxDaysSinceLastPost": {
            "title": "Max days since last post",
            "minimum": 0,
            "type": "integer",
            "description": "Drop dormant publications: keep only those that posted within this many days. Turns on publishing activity."
          },
          "includeKeywords": {
            "title": "Include keywords",
            "type": "array",
            "description": "Keep publications whose name, tagline, about text, services, industries, or skills contain these words. /regex/ supported.",
            "items": {
              "type": "string"
            }
          },
          "excludeKeywords": {
            "title": "Exclude keywords",
            "type": "array",
            "description": "Drop publications containing any of these words or /regex/.",
            "items": {
              "type": "string"
            }
          },
          "keywordMatch": {
            "title": "Include keyword logic",
            "enum": [
              "any",
              "all"
            ],
            "type": "string",
            "description": "Require any or all include keywords.",
            "default": "any"
          },
          "onlyNewItems": {
            "title": "Only new publications (monitoring mode)",
            "type": "boolean",
            "description": "Remember publications from previous runs and save only ones not seen before.",
            "default": false
          },
          "stateKey": {
            "title": "Monitor name",
            "type": "string",
            "description": "Separate memory per saved search.",
            "default": "default"
          },
          "maxResults": {
            "title": "Max publications",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Stop after saving this many publications.",
            "default": 50
          },
          "outputPreset": {
            "title": "Data preset",
            "enum": [
              "full",
              "lean",
              "contacts"
            ],
            "type": "string",
            "description": "Quickly choose how much data to save per record: full record, lean summary, or contact & social links only.",
            "default": "full"
          },
          "outputFields": {
            "title": "Output fields",
            "type": "array",
            "description": "Save only these fields, in this order (e.g. name, website, country, tier, minimumBudgetUsd, hourlyDesignRateUsd, profileUrl). Supports nested dot-paths (e.g. makers.username). Empty keeps all fields from the selected preset.",
            "items": {
              "type": "string"
            }
          },
          "excludeFields": {
            "title": "Exclude fields",
            "type": "array",
            "description": "Remove specific fields (or nested dot-paths) from each saved record to keep datasets compact.",
            "items": {
              "type": "string"
            }
          },
          "includeEmptyFields": {
            "title": "Keep empty / null fields",
            "type": "boolean",
            "description": "When turned off, strips null, empty strings, empty arrays, and empty objects from every saved record.",
            "default": true
          },
          "requiredFields": {
            "title": "Required non-empty fields",
            "type": "array",
            "description": "Only save (and only pay for) records where every listed field or dot-path has a non-empty value (e.g. website, inquiryEmail).",
            "items": {
              "type": "string"
            }
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Pages fetched in parallel.",
            "default": 6
          },
          "maxRequestRetries": {
            "title": "Max retries",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Retries per request.",
            "default": 4
          },
          "requestTimeoutSecs": {
            "title": "Request timeout (seconds)",
            "minimum": 5,
            "maximum": 180,
            "type": "integer",
            "description": "Timeout per request.",
            "default": 45
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Optional; not usually needed.",
            "default": {
              "useApifyProxy": false
            }
          },
          "proxyEscalation": {
            "title": "Auto-escalate proxies when blocked",
            "type": "boolean",
            "description": "If the site blocks the run, automatically step up from a direct connection to Apify datacenter proxy, then residential proxy, only for the blocked site. Turn off to use exactly the proxy above.",
            "default": 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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}