{
  "openapi": "3.0.1",
  "info": {
    "title": "Substack Scraper — Full-Text Posts & Comments by Keyword",
    "description": "Search Substack by keyword or paste post URLs and export each article's full public text, author, publication, date, word count, likes and comment threads. For research, newsletter marketing and AI datasets. $0.80 per 1,000 posts with full text and comments included.",
    "version": "0.2",
    "x-build-id": "moqcWMInzaCZ4P2BV"
  },
  "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": "Substack URLs, one per line. A publication homepage or /archive URL (e.g. https://www.oneusefulthing.org or https://www.lennysnewsletter.com/archive) returns its posts newest first, up to maxPostsPerNewsletter. A post URL (e.g. https://www.oneusefulthing.org/p/some-post) returns that one post. Custom domains and *.substack.com both work. Author profile pages (substack.com/@name) are not supported.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "maxPostsPerNewsletter": {
            "title": "Maximum posts per publication",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum posts returned per publication URL, after filters, e.g. 25. 0 = no cap (request and time limits still apply). Does not affect keywords.",
            "default": 100
          },
          "keywords": {
            "title": "Search keywords",
            "type": "array",
            "description": "Topics to search across all of Substack, one per line, e.g. \"AI agents\" or \"personal finance\". Results follow Substack's own search ranking. Each keyword returns up to maxSearchResultsPerKeyword posts.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "maxSearchResultsPerKeyword": {
            "title": "Maximum posts per keyword",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum posts per keyword, 1–100 (default 20), e.g. 10.",
            "default": 20
          },
          "includeContent": {
            "title": "Include public article content",
            "type": "boolean",
            "description": "true (default) = include the post body as HTML and plain text. Paid or locked posts only have their public preview. false = metadata only.",
            "default": true
          },
          "includePublicationInfo": {
            "title": "Include publication details",
            "type": "boolean",
            "description": "true (default) = add the publication's name, URL, author, language, subscriber label and plans to each post.",
            "default": true
          },
          "includeComments": {
            "title": "Include public comments",
            "type": "boolean",
            "description": "true = also collect public comments and replies for each post (up to maxCommentsPerPost). Default false.",
            "default": false
          },
          "maxCommentsPerPost": {
            "title": "Maximum comments per post",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum comments per post, replies included (default 20), e.g. 50. 0 = no cap. Only used when includeComments is true.",
            "default": 20
          },
          "contentType": {
            "title": "Post type",
            "enum": [
              "all",
              "newsletter",
              "podcast",
              "thread"
            ],
            "type": "string",
            "description": "Keep only one post type: all (default), newsletter, podcast or thread.",
            "default": "all"
          },
          "onlyFree": {
            "title": "Only free posts",
            "type": "boolean",
            "description": "true = keep only posts that are free for everyone (skips paid/subscriber-only posts). Example: true.",
            "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 (UTC), format YYYY-MM-DD, e.g. 2026-01-01. Leave empty for no lower bound."
          },
          "endDate": {
            "title": "Published on or before",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Keep posts published on or before this date (UTC), format YYYY-MM-DD, e.g. 2026-06-30. Leave empty for no upper bound."
          },
          "pageSize": {
            "title": "Archive page size",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Posts requested per archive page (default 20). Substack accepts at most 25; larger values are reduced to 25.",
            "default": 20
          },
          "maxRequests": {
            "title": "Maximum source requests",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Safety cap on HTTP requests for the whole run, retries included (default 1000).",
            "default": 1000
          },
          "requestDelaySeconds": {
            "title": "Delay between requests (seconds)",
            "minimum": 0.1,
            "maximum": 60,
            "type": "number",
            "description": "Pause between requests in seconds (default 0.4). Requests are sent one at a time.",
            "default": 0.4
          },
          "requestTimeoutSeconds": {
            "title": "Request timeout (seconds)",
            "minimum": 1,
            "maximum": 120,
            "type": "number",
            "description": "Seconds to wait for one response (default 30).",
            "default": 30
          },
          "maxRunSeconds": {
            "title": "Maximum collection time (seconds)",
            "minimum": 1,
            "maximum": 86400,
            "type": "number",
            "description": "Stop collecting after this many seconds (default 600) and keep what was collected.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}