{
  "openapi": "3.0.1",
  "info": {
    "title": "Substack Scraper | Public Full Text, Archives & Comments",
    "description": "Extract public Substack posts, readable text, author and publication metadata, nested comments and archive date filters. Track content access and source coverage explicitly. Search articles by keyword through the public Posts search interface.",
    "version": "0.1",
    "x-build-id": "KJnp3J1ohaJ6S2TGk"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/peerless_columbine~substack-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-peerless_columbine-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/peerless_columbine~substack-scraper/runs": {
      "post": {
        "operationId": "runs-sync-peerless_columbine-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/peerless_columbine~substack-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-peerless_columbine-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": {
          "urls": {
            "title": "Publication or article URLs",
            "type": "array",
            "description": "Add publication homepages, archive URLs, or individual article URLs. Supports Substack subdomains and custom domains. Use keywords below to discover articles across publications. Provide at least one URL or keyword.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "maxPostsPerNewsletter": {
            "title": "Maximum posts per publication",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum matching posts returned from each publication URL after filters. Use 0 to remove this result cap; request and time limits still apply. This limit does not restrict keyword search results.",
            "default": 100
          },
          "keywords": {
            "title": "Search keywords",
            "type": "array",
            "description": "Find public articles across Substack by topic, even without publication URLs. Results follow the public article search ranking, not newsletter-name lookup. Each keyword has its own result limit; complete coverage of every publication is not guaranteed.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "maxSearchResultsPerKeyword": {
            "title": "Maximum posts per keyword",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum matching posts emitted for each keyword after filters and run-wide deduplication (1–100). Separate from the limit for publication URLs.",
            "default": 20
          },
          "includeContent": {
            "title": "Include public article content",
            "type": "boolean",
            "description": "Return original publicly available HTML and readable text. When disabled, bodyHtml is null and readable text is empty. When enabled, paid, hidden or locked bodies remain empty; public metadata and previews may still be available.",
            "default": true
          },
          "includePublicationInfo": {
            "title": "Include publication details",
            "type": "boolean",
            "description": "Include available publication name, owner details, language, public subscriber labels and subscription plans. When disabled, publicationName, publicationUrl, subscriberCount and publication are null. Unpublished values remain null.",
            "default": true
          },
          "includeComments": {
            "title": "Include public comments",
            "type": "boolean",
            "description": "Collect accessible public comments and nested replies in the source default order. The comment limit counts parents and replies together. Deleted, moderated or otherwise hidden comments are excluded; any visible count gap is reported.",
            "default": false
          },
          "maxCommentsPerPost": {
            "title": "Maximum comments per post",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum comments including all nested replies. 0 removes the output limit; source visibility still applies.",
            "default": 20
          },
          "contentType": {
            "title": "Post type",
            "enum": [
              "all",
              "newsletter",
              "podcast",
              "thread"
            ],
            "type": "string",
            "description": "Filter by the exact source post type.",
            "default": "all"
          },
          "onlyFree": {
            "title": "Only free posts",
            "type": "boolean",
            "description": "Keep only posts whose current audience is everyone, with no unlock or hidden flag.",
            "default": false
          },
          "startDate": {
            "title": "Published on or after",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Keep posts published on or after this date, including the whole UTC day. Format: YYYY-MM-DD. Applies to both URL collection and keyword search."
          },
          "endDate": {
            "title": "Published on or before",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Keep posts published on or before this date, including the whole UTC day. Format: YYYY-MM-DD. Leave blank for no upper date bound."
          },
          "pageSize": {
            "title": "Archive page size",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Requested archive page size; actual response lengths determine offsets.",
            "default": 20
          },
          "maxRequests": {
            "title": "Maximum source requests",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Global request-attempt budget including retries and redirects; stopping is reported in SUMMARY.",
            "default": 1000
          },
          "requestDelaySeconds": {
            "title": "Delay between requests (seconds)",
            "minimum": 0.1,
            "maximum": 60,
            "type": "number",
            "description": "Minimum delay between HTTP requests. Concurrency is one.",
            "default": 0.4
          },
          "requestTimeoutSeconds": {
            "title": "Request timeout (seconds)",
            "minimum": 1,
            "maximum": 120,
            "type": "number",
            "description": "Per-request wall-clock timeout.",
            "default": 30
          },
          "maxRunSeconds": {
            "title": "Maximum collection time (seconds)",
            "minimum": 1,
            "maximum": 86400,
            "type": "number",
            "description": "Whole-run time limit; a partial result is reported when reached.",
            "default": 600
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}