{
  "openapi": "3.0.1",
  "info": {
    "title": "📰 Media Pitch Leads & Journalist Source Request Monitor",
    "description": "Monitor real-time journalist source requests and PR pitch leads across SourceBottle and verified journalist feeds (journa.host). Features publication authority tier scoring (Tier 1 DR 80+), urgency countdowns, contact email extraction, and instant Discord/Slack alert webhooks.",
    "version": "0.1",
    "x-build-id": "yo9R5hjg59IpVc3gB"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/automation_studio~media-pitch-leads-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-automation_studio-media-pitch-leads-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/automation_studio~media-pitch-leads-scraper/runs": {
      "post": {
        "operationId": "runs-sync-automation_studio-media-pitch-leads-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/automation_studio~media-pitch-leads-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-automation_studio-media-pitch-leads-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": {
          "sources": {
            "title": "📡 Monitored Data Feeds",
            "type": "array",
            "description": "Select the live media and journalist sources to scan for active pitch opportunities.",
            "items": {
              "type": "string",
              "enum": [
                "sourcebottle",
                "journahost",
                "mastodon"
              ],
              "enumTitles": [
                "SourceBottle (12 Structured Industry Categories & Verified Outlets)",
                "journa.host (Verified Editorial & Journalist Fediverse Network)",
                "mastodon.social (Federated #journorequest & #prrequest Live Stream)"
              ]
            },
            "default": [
              "sourcebottle",
              "journahost",
              "mastodon"
            ]
          },
          "sourcebottleIndustries": {
            "title": "📂 SourceBottle Industry Categories",
            "type": "array",
            "description": "Select industry sectors to scan on SourceBottle. All 12 industries are enabled by default for maximum lead volume.",
            "items": {
              "type": "string",
              "enum": [
                "61",
                "62",
                "63",
                "64",
                "65",
                "66",
                "67",
                "68",
                "69",
                "70",
                "71",
                "72"
              ],
              "enumTitles": [
                "Business & Finance (61)",
                "Education & Non-Profit (62)",
                "Environment & Agriculture (63)",
                "Entertainment & Arts (64)",
                "Health & Wellbeing (65)",
                "Lifestyle (66)",
                "Professional Services (67)",
                "Public Relations & Marketing (68)",
                "Retail & Consumer Goods (69)",
                "Technology (70)",
                "Travel & Tourism (71)",
                "General Interest (72)"
              ]
            },
            "default": [
              "61",
              "62",
              "63",
              "64",
              "65",
              "66",
              "67",
              "68",
              "69",
              "70",
              "71",
              "72"
            ]
          },
          "keywords": {
            "title": "🔍 Topic & Publication Keywords",
            "type": "array",
            "description": "Filter by target topics, industries, or specific media outlets (e.g., 'finance', 'AI', 'startup', 'Forbes', 'health'). Matches against publication name, summary, and requirements. Leave empty to capture all leads.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "publicationTiers": {
            "title": "🏆 Publication Authority Tier Filter",
            "type": "array",
            "description": "Filter opportunities by media authority tier. Leave empty to capture all tiers.",
            "items": {
              "type": "string",
              "enum": [
                "TIER_1_TOP_MEDIA",
                "TIER_2_MID_MEDIA",
                "TIER_3_NICHE"
              ],
              "enumTitles": [
                "Tier 1: Top-Tier National & Global Media (DR 80+ e.g., Forbes, WSJ, BBC, Bloomberg, TechCrunch)",
                "Tier 2: Mid-Tier Industry Publications & Regional Dailies (DR 50-79)",
                "Tier 3: Specialized Niche Media, Podcasts & Blogs"
              ]
            },
            "default": []
          },
          "onlyOpenDeadlines": {
            "title": "⏳ Only Active / Open Deadlines",
            "type": "boolean",
            "description": "Exclude requests whose pitch deadlines have already passed.",
            "default": true
          },
          "minHoursRemaining": {
            "title": "⏱️ Minimum Hours Remaining",
            "minimum": 0,
            "maximum": 168,
            "type": "integer",
            "description": "Filter out requests that expire in less than this number of hours. Set to 0 to include all active requests.",
            "default": 0
          },
          "maxRequests": {
            "title": "📊 Max Pitch Opportunities",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Maximum total media requests to return across all sources.",
            "default": 200
          },
          "onlyNewRequests": {
            "title": "🔄 Only New Opportunities (Stateful Deduplication)",
            "type": "boolean",
            "description": "Uses Apify Key-Value Store to track previously seen request IDs. When enabled, scheduled runs will ONLY return fresh leads that have not been delivered before.",
            "default": true
          },
          "webhookUrl": {
            "title": "🔔 Instant Pitch Alert Webhook (Discord / Slack)",
            "type": "string",
            "description": "Optional: Discord or Slack incoming webhook URL to receive instant, formatted alert cards whenever new journalist requests match your criteria."
          },
          "webhookUrgentOnly": {
            "title": "🚨 Alert on Urgent & Tier 1 Opportunities Only",
            "type": "boolean",
            "description": "When enabled, webhooks will only trigger for Tier 1 publications (DR 80+) or Critical (<12 hours) deadlines.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Apify Proxy Configuration",
            "type": "object",
            "description": "Public journalist feeds do not require proxies by default. Enable Apify Proxy if running frequent high-volume sweeps.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}