{
  "openapi": "3.0.1",
  "info": {
    "title": "Substack Newsletter Sponsorship Prospect Finder",
    "description": "Substack publications ranked for sponsorship: subscriber count, paid-tier size, plan prices, posting cadence and engagement per 1,000 subscribers.",
    "version": "0.8",
    "x-build-id": "b4ZHxGLWwbR1izaX3"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/datagrit~substack-sponsor-prospector/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-datagrit-substack-sponsor-prospector",
        "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/datagrit~substack-sponsor-prospector/runs": {
      "post": {
        "operationId": "runs-sync-datagrit-substack-sponsor-prospector",
        "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/datagrit~substack-sponsor-prospector/run-sync": {
      "post": {
        "operationId": "run-sync-datagrit-substack-sponsor-prospector",
        "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": {
          "source": {
            "title": "Source",
            "enum": [
              "leaderboard",
              "publications",
              "lookalikes"
            ],
            "type": "string",
            "description": "Where the publications come from. \"leaderboard\" reads the Substack category rankings, \"publications\" analyzes the publications you list, \"lookalikes\" finds publications that the ones you list recommend.",
            "default": "leaderboard"
          },
          "categories": {
            "title": "Categories",
            "type": "array",
            "description": "Leaderboard categories to read when the source is \"leaderboard\". Available: culture, technology, business, us-politics, finance, food, sports, art, world-politics, health-politics, news, fashionandbeauty, music, faith, climate, science, literature, fiction, health, design, travel, parenting, philosophy, comics, international, crypto, history, humor, education, film-and-tv, home-garden, games.",
            "default": [
              "technology"
            ],
            "items": {
              "type": "string"
            }
          },
          "leaderboardType": {
            "title": "Leaderboard type",
            "enum": [
              "all",
              "paid"
            ],
            "type": "string",
            "description": "Which ranking to read: \"all\" is the ranking of all publications of the category, \"paid\" is the ranking of publications with paid subscriptions.",
            "default": "all"
          },
          "maxPerCategory": {
            "title": "Publications to scan per category",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "How many leaderboard positions to scan per category before filters apply. One page of the ranking holds 25 positions.",
            "default": 25
          },
          "publications": {
            "title": "Publications",
            "type": "array",
            "description": "Used when the source is \"publications\": Substack URLs, custom domains or subdomains such as \"lenny\".",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "lookalikesOf": {
            "title": "Seed publications",
            "type": "array",
            "description": "Used when the source is \"lookalikes\": publications whose recommendations are followed to find similar newsletters. Accepts URLs, custom domains or subdomains.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "minSubscribers": {
            "title": "Minimum subscribers",
            "minimum": 0,
            "maximum": 1000000000,
            "type": "integer",
            "description": "Keep publications with at least this many displayed subscribers. Zero disables the filter. Publications that hide their count are dropped when a limit is set.",
            "default": 0
          },
          "maxSubscribers": {
            "title": "Maximum subscribers",
            "minimum": 0,
            "maximum": 1000000000,
            "type": "integer",
            "description": "Keep publications with at most this many displayed subscribers. Zero disables the filter. Publications that hide their count are dropped when a limit is set.",
            "default": 0
          },
          "requirePaidPlan": {
            "title": "Only publications with paid plans",
            "type": "boolean",
            "description": "Keep only publications that have paid subscriptions switched on and a price.",
            "default": false
          },
          "maxMonthlyPriceUsd": {
            "title": "Maximum monthly price (USD)",
            "minimum": 0,
            "maximum": 100000,
            "type": "number",
            "description": "Keep publications whose regular monthly plan costs at most this many US dollars. Zero disables the filter. Publications without a monthly plan are dropped when a limit is set.",
            "default": 0
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Keep publications whose language code starts with this value, for example \"en\" or \"de\". Empty keeps all languages.",
            "default": ""
          },
          "activeWithinDays": {
            "title": "Posted within days",
            "minimum": 0,
            "maximum": 3650,
            "type": "integer",
            "description": "Keep publications whose newest post is at most this many days old. Zero disables the filter.",
            "default": 0
          },
          "minPosts30d": {
            "title": "Minimum posts in 30 days",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "Keep publications that published at least this many posts in the last 30 days. Zero disables the filter.",
            "default": 0
          },
          "maxItems": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Stop after this many publications in total.",
            "default": 20
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional proxy. Leave disabled unless Substack blocks datacenter traffic; residential proxy raises the platform cost of the run.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}