{
  "openapi": "3.0.1",
  "info": {
    "title": "Substack Publication, Post & Comment Monitor",
    "description": "Discover public Substack publications and posts, export publication, author, post and public-comment rows, and monitor compatible snapshots without AI interpretation.",
    "version": "0.5",
    "x-build-id": "xe9o4Xpk8qkeByydl"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/luminar~substack-publication-post-comment-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-luminar-substack-publication-post-comment-monitor",
        "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/luminar~substack-publication-post-comment-monitor/runs": {
      "post": {
        "operationId": "runs-sync-luminar-substack-publication-post-comment-monitor",
        "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/luminar~substack-publication-post-comment-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-luminar-substack-publication-post-comment-monitor",
        "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": {
          "workflow": {
            "title": "🎯 What do you want to collect?",
            "enum": [
              "discover_topics",
              "publication_archive",
              "exact_posts",
              "public_comments"
            ],
            "type": "string",
            "description": "Choose the buyer job first. It controls which target field is required, which source pages are opened, and which result types can be returned.",
            "default": "discover_topics"
          },
          "keywords": {
            "title": "Topics or keywords",
            "maxItems": 10,
            "type": "array",
            "description": "Required only for topic discovery. Enter up to 10 topics; each creates a separate target and its own coverage receipt. Ignored by the other workflows.",
            "items": {
              "type": "string",
              "maxLength": 120
            }
          },
          "publicationUrls": {
            "title": "Publication URLs or domains",
            "maxItems": 1000,
            "type": "array",
            "description": "Required only for Publication archive. Paste up to 1,000 Substack URLs, subdomains, or public custom domains. Each becomes a canonical HTTPS target with its own coverage receipt.",
            "items": {
              "type": "string",
              "maxLength": 2048
            }
          },
          "postUrls": {
            "title": "Post URLs",
            "maxItems": 10000,
            "type": "array",
            "description": "Required for Exact posts and Public comments. Paste up to 10,000 canonical public `/p/` post URLs and keep maxPosts at least as high as the target count. Comment collection opens only public comment data linked to these posts.",
            "items": {
              "type": "string",
              "maxLength": 2048
            }
          },
          "maxPublications": {
            "title": "Maximum publication rows",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Global ceiling for publication rows, including contextual publication rows linked to exact posts. Raise it with large exact-post batches; reaching it produces CAPPED coverage, never false completeness.",
            "default": 10
          },
          "maxPosts": {
            "title": "Maximum post rows",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Global ceiling for post rows across all targets. For Exact posts or Public comments it must cover every supplied post URL. A small value is the fastest useful first run; reaching the ceiling produces CAPPED coverage when more posts may exist.",
            "default": 25
          },
          "maxCommentsPerPost": {
            "title": "Maximum comments per post",
            "minimum": 1,
            "maximum": 250,
            "type": "integer",
            "description": "Used only when comments are requested. Limits public comments and replies for each post; a visible next page or cursor makes that comment target CAPPED.",
            "default": 50
          },
          "maxTotalComments": {
            "title": "Maximum comment rows",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Global comment and reply ceiling across the run. Comment rows add source work and use their own result event when pricing is active.",
            "default": 250
          },
          "dateFrom": {
            "title": "Published on or after",
            "pattern": "^$|^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Optional inclusive YYYY-MM-DD filter for post publication time. This can turn source-complete traversal into FILTERED coverage for the requested result set."
          },
          "dateTo": {
            "title": "Published on or before",
            "pattern": "^$|^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Optional inclusive YYYY-MM-DD filter. It must not be earlier than Published on or after."
          },
          "contentTypes": {
            "title": "Content types",
            "maxItems": 5,
            "uniqueItems": true,
            "type": "array",
            "description": "Leave empty for every source-exposed type. Selecting values filters normalized posts; an unknown source type remains explicit rather than guessed.",
            "items": {
              "type": "string",
              "enum": [
                "article",
                "podcast",
                "video",
                "thread",
                "note"
              ],
              "enumTitles": [
                "Article",
                "Podcast",
                "Video",
                "Thread",
                "Note"
              ]
            }
          },
          "contentAccessFilter": {
            "title": "Public access state",
            "enum": [
              "any",
              "full_public",
              "free_preview",
              "truncated",
              "paywalled_unavailable"
            ],
            "type": "string",
            "description": "Filters by what the public source actually exposed. Paywalled unavailable means metadata or preview may be public while the paid body remains unavailable.",
            "default": "any"
          },
          "minimumEngagement": {
            "title": "Minimum public engagement",
            "minimum": 0,
            "maximum": 1000000000,
            "type": "integer",
            "description": "Keeps posts whose source-exposed reactions + comments + restacks meet this total. It is a deterministic numeric filter, not a quality or trend score.",
            "default": 0
          },
          "outputMode": {
            "title": "Output mode",
            "enum": [
              "current",
              "changes"
            ],
            "type": "string",
            "description": "Current returns normalized rows. Changes seeds the first compatible run without a NEW flood, then emits deterministic title, body-access, rank, and public-metric changes on sequential repeats.",
            "default": "current"
          },
          "monitorId": {
            "title": "Monitor label",
            "maxLength": 80,
            "type": "string",
            "description": "Optional human label included in the state scope. Use a stable label when you intentionally maintain separate monitors over otherwise identical inputs."
          },
          "includeUnchanged": {
            "title": "Include unchanged audit rows",
            "type": "boolean",
            "description": "Used only in Changes mode. Returns free UNCHANGED change rows for auditing; they do not become paid change events.",
            "default": false
          },
          "maxTrackedItems": {
            "title": "Maximum tracked entities",
            "minimum": 1,
            "maximum": 40000,
            "type": "integer",
            "description": "Used only for Changes. Leave empty to match the requested publication + post + comment scope automatically, or set an explicit ceiling up to 40,000. Contextual author rows do not create disappearance events."
          },
          "includeBody": {
            "title": "Include public post body",
            "type": "boolean",
            "description": "Opens or parses post detail where needed and returns clean public HTML/text. Exact posts enable this automatically. Paid or private body text is never requested or reconstructed.",
            "default": false
          },
          "includePublication": {
            "title": "Include publication rows",
            "type": "boolean",
            "description": "Returns normalized publication metadata linked to delivered posts when the public source exposes it.",
            "default": true
          },
          "includeAuthors": {
            "title": "Include author rows",
            "type": "boolean",
            "description": "Returns public author/byline rows. It does not infer private email addresses or subscriber identities.",
            "default": true
          },
          "includeComments": {
            "title": "Include public comments and replies",
            "type": "boolean",
            "description": "Requests public comment/reply rows for delivered posts. Public comments workflow enables this automatically; unavailable or unverified comment access is PARTIAL, not empty.",
            "default": false
          },
          "includeRawSource": {
            "title": "Include bounded raw source object",
            "type": "boolean",
            "description": "Adds a bounded rawSource object for debugging. Leave off for clean JSON/CSV/Excel rows; internal upload/transcoding keys are not promoted into the default schema.",
            "default": false
          },
          "maxBuyerChargeUsd": {
            "title": "Maximum buyer charge",
            "minimum": 0.01,
            "maximum": 150,
            "type": "number",
            "description": "Fail before source work when the projected current pricing vector could exceed this ceiling. This is the buyer-charge guard, not an infrastructure-cost estimate.",
            "default": 5
          },
          "maxRequests": {
            "title": "Internal request ceiling",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Internal source-request guard sized for the declared exact-target workload. This is a ceiling, not a request target; small row defaults still stop early.",
            "default": 50000
          },
          "maxSourceBytes": {
            "title": "Internal source-byte ceiling",
            "minimum": 100000,
            "maximum": 2000000000,
            "type": "integer",
            "description": "Internal cumulative response-byte guard for deliberate bulk work. This ceiling does not make a small run fetch extra data.",
            "default": 2000000000
          },
          "maxStateBytes": {
            "title": "Internal state-byte ceiling",
            "minimum": 100000,
            "maximum": 64000000,
            "type": "integer",
            "description": "Internal serialized-state guard sized for the declared 40,000-entity maximum.",
            "default": 64000000
          },
          "maxRuntimeSecs": {
            "title": "Internal runtime ceiling",
            "minimum": 30,
            "maximum": 10800,
            "type": "integer",
            "description": "Internal source-work runtime guard for deliberate bulk runs; ordinary small runs return as soon as their requested scope is complete.",
            "default": 10800
          },
          "requestTimeoutSecs": {
            "title": "Internal request timeout",
            "minimum": 5,
            "maximum": 120,
            "type": "integer",
            "description": "Internal per-request timeout.",
            "default": 30
          },
          "retryAttempts": {
            "title": "Internal retry attempts",
            "minimum": 1,
            "maximum": 3,
            "type": "integer",
            "description": "Internal bounded retry policy.",
            "default": 2
          },
          "requestIntervalMs": {
            "title": "Internal request pacing",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Internal fair-access pacing in milliseconds.",
            "default": 250
          },
          "_luminarQaFaultStage": {
            "title": "Private QA fault stage",
            "type": "string",
            "description": "Hidden fail-closed QA hook. Accepted only for the exact registered private QA Actor and immutable build tag."
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}