{
  "openapi": "3.0.1",
  "info": {
    "title": "Newsletter Sponsorship Intelligence — Substack, beehiiv & Ghost",
    "description": "Extract sponsors and ad placements from Substack, beehiiv, and Ghost newsletters. Give it newsletter URLs and get, per issue: the sponsor brand names, the marker phrase (Presented by / Together with / Sponsored by), the sponsor link, and utm_source / utm_campaign. Pure HTTP, no logins, no LLM.",
    "version": "0.0",
    "x-build-id": "9dMTjzb51tBaRoXpM"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/silentshadow55~newsletter-sponsors-actor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-silentshadow55-newsletter-sponsors-actor",
        "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/silentshadow55~newsletter-sponsors-actor/runs": {
      "post": {
        "operationId": "runs-sync-silentshadow55-newsletter-sponsors-actor",
        "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/silentshadow55~newsletter-sponsors-actor/run-sync": {
      "post": {
        "operationId": "run-sync-silentshadow55-newsletter-sponsors-actor",
        "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",
        "required": [
          "newsletterUrls"
        ],
        "properties": {
          "newsletterUrls": {
            "title": "Newsletter URLs",
            "type": "array",
            "description": "One or more newsletter home/base URLs (e.g. https://www.therundown.ai, https://blog.bytebytego.com, https://www.platformer.news). The actor auto-detects the platform (Substack incl. custom domains, beehiiv, or Ghost) and reads recent issues. Unsupported platforms (custom Next.js sites like Milk Road) return a single 'unsupported_platform' record instead of failing; an unreachable site returns a single 'error' record. An explicitly empty list runs nothing. You are billed per result, so more newsletters x more issues = more items.",
            "items": {
              "type": "string"
            }
          },
          "maxIssuesPerNewsletter": {
            "title": "Max issues per newsletter",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "How many of the most recent issues to read per newsletter (newest first). Each successfully read issue becomes one billed result (failed fetches are not billed; they are counted in the summary's issues_failed). Substack and beehiiv page/backfill to this depth; Ghost is capped at its RSS window (~15 newest issues) — larger values log a warning. Keep this small for a quick scan; raise it for a deeper sponsor history.",
            "default": 3
          },
          "dateFloor": {
            "title": "Only issues on/after this date",
            "pattern": "^$|^[0-9]{4}-[0-9]{2}-[0-9]{2}$",
            "type": "string",
            "description": "Optional ISO date (YYYY-MM-DD). Issues published before this date are skipped, so you can pull just the last month of sponsors instead of a fixed count. Any other format fails the run immediately (before any billing). Leave empty to use maxIssuesPerNewsletter alone."
          },
          "includeSummary": {
            "title": "Include per-newsletter summary record",
            "type": "boolean",
            "description": "Emit one extra item per newsletter (type: 'newsletter_summary') with issues scanned, issues with sponsors, and total sponsor mentions. Handy for dashboards. These summary items are billed like ordinary results (one extra item per newsletter).",
            "default": true
          },
          "requestDelay": {
            "title": "Delay between requests (seconds)",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Polite pause between HTTP requests to the same publication. 1-2 seconds is respectful and is what was verified during development. Lower values risk rate-limiting; there is no CAPTCHA/WAF evasion.",
            "default": 2
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxies for the HTTP requests. Substack is Cloudflare-fronted and beehiiv uses a CDN, so datacenter IPs (the default Apify Proxy) usually work but can occasionally see challenges. If you get blocked, switch this to the RESIDENTIAL proxy group. Ghost sites are self-hosted and are fine on datacenter.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": []
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}