{
  "openapi": "3.0.1",
  "info": {
    "title": "Substack Scraper: Newsletters, Posts, Subscribers & Authors",
    "description": "Scrape Substack newsletters and posts without login: subscriber counts, paid plan prices, leaderboard rank, author X/LinkedIn/website links, plus posts with likes, comments and full article text. Find newsletters by keyword or category leaderboard. Fast JSON API, no browser. Pay per result.",
    "version": "1.0",
    "x-build-id": "XFHCkofAqasfWjMIT"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/murch1k~substack-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-murch1k-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/murch1k~substack-scraper/runs": {
      "post": {
        "operationId": "runs-sync-murch1k-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/murch1k~substack-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-murch1k-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": {
          "startUrls": {
            "title": "Newsletter, post or profile URLs",
            "type": "array",
            "description": "Any mix of newsletter URLs (<code>https://name.substack.com</code> or a custom domain like <code>https://www.lennysnewsletter.com</code>), post URLs (<code>.../p/post-slug</code>), author profiles (<code>https://substack.com/@handle</code>) or a bare subdomain like <code>astralcodexten</code>.",
            "items": {
              "type": "string"
            }
          },
          "searchQueries": {
            "title": "Find newsletters by keyword",
            "type": "array",
            "description": "Searches Substack writers (e.g. <code>marketing</code>, <code>AI startups</code>) and scrapes the newsletter of each match. Up to <b>Max newsletters per source</b> per keyword.",
            "items": {
              "type": "string"
            }
          },
          "categories": {
            "title": "Category leaderboards",
            "type": "array",
            "description": "Scrape the top newsletters of Substack categories. Slugs: technology, business, finance, culture, us-politics, world-politics, news, science, health, crypto, education, design, food, travel, sports, music, art, history, philosophy, fiction, literature, parenting, faith, climate, humor, comics, fashionandbeauty, film-and-tv, games, home-garden, international, health-politics.",
            "items": {
              "type": "string"
            }
          },
          "leaderboardType": {
            "title": "Leaderboard type",
            "enum": [
              "paid",
              "all"
            ],
            "type": "string",
            "description": "<b>Bestsellers</b> = top paid newsletters (max 25 per category). <b>Rising / all</b> = the broader list of up to ~525 newsletters per category.",
            "default": "paid"
          },
          "maxNewslettersPerSource": {
            "title": "Max newsletters per source",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Limit of newsletters taken from each search keyword or category.",
            "default": 25
          },
          "includeNewsletterDetails": {
            "title": "Output newsletter records",
            "type": "boolean",
            "description": "One record per newsletter: subscriber count, paid plan prices, leaderboard rank, podcast/RSS feed, author name, bio and handle.",
            "default": true
          },
          "enrichAuthors": {
            "title": "Add author social links",
            "type": "boolean",
            "description": "Adds the author's X/Twitter, LinkedIn, YouTube, website and other links plus follower count (one extra request per newsletter).",
            "default": true
          },
          "scrapePosts": {
            "title": "Output posts",
            "type": "boolean",
            "description": "Scrape posts of every newsletter (title, URL, date, likes, comments, restacks, word count, paywall status, tags, authors).",
            "default": true
          },
          "maxPostsPerNewsletter": {
            "title": "Max posts per newsletter",
            "minimum": -1,
            "type": "integer",
            "description": "Newest posts first. <code>0</code> = no posts, <code>-1</code> = the whole archive.",
            "default": 20
          },
          "postedAfter": {
            "title": "Only posts published after",
            "type": "string",
            "description": "Date like <code>2026-01-01</code> or a relative period like <code>30 days</code>, <code>2 weeks</code>, <code>1 year</code>. Empty = no date filter."
          },
          "includeContent": {
            "title": "Include full article text",
            "type": "boolean",
            "description": "Adds <code>contentHtml</code> and <code>contentText</code> to each post. Free posts get the full text; paywalled posts get the public preview. One extra request per free post.",
            "default": false
          },
          "maxResults": {
            "title": "Max results (cost cap)",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many records in total (newsletters + posts). <code>0</code> = no limit.",
            "default": 0
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Parallel requests. Substack's newsletter APIs are fast; requests to substack.com itself (search, leaderboards, profiles) are automatically paced.",
            "default": 10
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Substack rate-limits cloud IPs. The default Apify datacenter proxy lets the actor switch IP instantly when that happens, which makes runs several times faster. Turn it off only for small runs.",
            "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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}