{
  "openapi": "3.0.1",
  "info": {
    "title": "Substack Newsletter Intelligence: Top Writer Tracker",
    "description": "Track Substack publications by subscriber count, paid vs free posting cadence, comments, and writer profile. Built for ad networks, creator economy VCs, agencies, and writers reverse engineering top performers. Pay per publication.",
    "version": "0.1",
    "x-build-id": "XmwQvlxvfb7hpQ8SX"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapemint~substack-newsletter-intelligence/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapemint-substack-newsletter-intelligence",
        "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/scrapemint~substack-newsletter-intelligence/runs": {
      "post": {
        "operationId": "runs-sync-scrapemint-substack-newsletter-intelligence",
        "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/scrapemint~substack-newsletter-intelligence/run-sync": {
      "post": {
        "operationId": "run-sync-scrapemint-substack-newsletter-intelligence",
        "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": {
          "subdomains": {
            "title": "Substack subdomains",
            "type": "array",
            "description": "Direct subdomain slugs to enrich. Example: [\"noahpinion\", \"platformer\", \"stratechery\"]. Skips discovery and goes straight to the publication.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "publicationUrls": {
            "title": "Publication URLs",
            "type": "array",
            "description": "Direct Substack publication URLs. Examples: [\"https://noahpinion.substack.com\", \"https://www.platformer.news\"]. Custom domains are supported when the publication still serves /about on the same host.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "queries": {
            "title": "Search queries",
            "type": "array",
            "description": "Substack search terms. Each query opens substack.com/search/{term} and harvests publication cards. Example: [\"economics\", \"AI safety\", \"product management\"].",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "fetchRecentPosts": {
            "title": "Fetch recent posts",
            "type": "boolean",
            "description": "Pull the most recent posts per publication from the public archive API. Adds recentPosts[] with title, slug, postDate, audience (everyone vs paid), commentCount, and URL.",
            "default": true
          },
          "maxRecentPosts": {
            "title": "Max recent posts per publication",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "How many recent posts to include when fetchRecentPosts is on.",
            "default": 12
          },
          "fetchAuthorLinks": {
            "title": "Fetch author external links",
            "type": "boolean",
            "description": "Extract external links from the about page (Twitter / X, website, LinkedIn) where the writer lists them publicly.",
            "default": true
          },
          "maxPublications": {
            "title": "Total maximum publications",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Hard cap on publication rows pushed per run. 0 means unlimited.",
            "default": 50
          },
          "maxResultsPerQuery": {
            "title": "Max results per query",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Cap on publications harvested per search query. Substack search renders 25 to 50 cards before lazy load.",
            "default": 25
          },
          "dedupe": {
            "title": "Deduplicate across runs",
            "type": "boolean",
            "description": "Skip subdomains already pushed in previous runs. Keyed on Substack subdomain. Turn off to refresh stale rows on a recurring schedule.",
            "default": true
          },
          "navigationDelayMs": {
            "title": "Delay between navigations (ms)",
            "minimum": 0,
            "maximum": 60000,
            "type": "integer",
            "description": "Pause between page loads. 1000 to 3000 ms is the safe range for Substack.",
            "default": 1500
          },
          "concurrency": {
            "title": "Concurrency",
            "minimum": 1,
            "maximum": 16,
            "type": "integer",
            "description": "Parallel browser pages. Substack is light, 3 to 6 is safe on residential proxy.",
            "default": 4
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify proxy. Substack accepts datacenter for low volume. Switch to residential past a few hundred requests in a short window.",
            "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}