{
  "openapi": "3.0.1",
  "info": {
    "title": "LinkedIn Comment Opportunity Monitor — Questions & Requests",
    "description": "Monitor selected LinkedIn posts for newly observed comments and questions. Export direct comment links, exact phrase evidence and persistent deduplication. Uses separately billed HarvestAPI collection, or process an existing comments dataset.",
    "version": "0.1",
    "x-build-id": "8amxUgHY5uQh8SliN"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/agency-shift~linkedin-comment-opportunity-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-agency-shift-linkedin-comment-opportunity-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/agency-shift~linkedin-comment-opportunity-monitor/runs": {
      "post": {
        "operationId": "runs-sync-agency-shift-linkedin-comment-opportunity-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/agency-shift~linkedin-comment-opportunity-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-agency-shift-linkedin-comment-opportunity-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",
        "required": [
          "sourceMode"
        ],
        "properties": {
          "sourceMode": {
            "title": "Comment source",
            "enum": [
              "comments",
              "dataset"
            ],
            "type": "string",
            "description": "Live comments use paid HarvestAPI collection. Dataset mode reads compatible root comments without starting another scraper.",
            "default": "comments"
          },
          "sourceDatasetId": {
            "title": "Existing comment dataset",
            "type": "string",
            "description": "Required only in dataset mode. An Apify dataset containing compatible LinkedIn comment rows. Only read permission is requested."
          },
          "postedLimit": {
            "title": "Source time window",
            "enum": [
              "any",
              "24h",
              "week",
              "month"
            ],
            "type": "string",
            "description": "Filter passed to the live comments provider. Existing dataset mode does not independently apply this window.",
            "default": "any"
          },
          "includePhrases": {
            "title": "Text must contain any of these phrases",
            "maxItems": 20,
            "type": "array",
            "description": "Optional case-insensitive literal substring rules applied after collection. Output includes exact matched text and offsets. Collection charges apply before filtering.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "excludePhrases": {
            "title": "Exclude text containing these phrases",
            "maxItems": 20,
            "type": "array",
            "description": "Optional case-insensitive literal exclusions. Excluded comments are not charged our comment-record fee; source fees still apply.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "requestsOnly": {
            "title": "Keep question or request language only",
            "type": "boolean",
            "description": "Uses simple English phrase rules and question punctuation, not AI or verified purchase intent. Rhetorical and promotional questions can still match; review the supplied evidence.",
            "default": false
          },
          "mode": {
            "title": "Output mode",
            "enum": [
              "new",
              "snapshot"
            ],
            "type": "string",
            "description": "New mode remembers delivered comment identities. Snapshot emits qualifying observations each scan. Missing comments never imply deletion.",
            "default": "new"
          },
          "monitorName": {
            "title": "Monitor name",
            "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,49}$",
            "type": "string",
            "description": "Reuse a name for recurring scans. Post URL, source and filter changes create a separate baseline. A new name deliberately creates new history.",
            "default": "default"
          },
          "emitInitial": {
            "title": "Output first-run matches",
            "type": "boolean",
            "description": "Disable to save the initial qualifying baseline without comment-record fees. Live-source and platform costs still apply.",
            "default": true
          },
          "maxResults": {
            "title": "Maximum delivered comments per run",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Caps this monitor output. Qualified overflow is saved for the next run before another source scan. Changing this cap does not reset history.",
            "default": 25
          },
          "maxSourceChargeUsd": {
            "title": "Maximum HarvestAPI charge in USD",
            "minimum": 0.01,
            "maximum": 10,
            "type": "number",
            "description": "Separate child-run PPE ceiling, not a total account or parent-platform budget. A source run reaching its limit can stop with incomplete data. No automatic source retries or enrichment.",
            "default": 0.1
          },
          "sourceTimeoutSecs": {
            "title": "Source timeout in seconds",
            "minimum": 60,
            "maximum": 300,
            "type": "integer",
            "description": "Live source timeout is also constrained by the parent time remaining. A failed source does not establish an empty baseline.",
            "default": 180
          },
          "maxHistoryItems": {
            "title": "Maximum remembered and queued comments",
            "minimum": 100,
            "maximum": 50000,
            "type": "integer",
            "description": "History never silently expires or evicts records. At the count or 16 MB size limit, the monitor stops and asks for a new monitor or a higher supported count.",
            "default": 20000
          },
          "maxScanComments": {
            "title": "Maximum source comments examined",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Shared root-comment cap across supplied posts. Each post gets floor(cap/post count). Nested replies are not monitored.",
            "default": 50
          },
          "postUrls": {
            "title": "LinkedIn posts to monitor",
            "maxItems": 5,
            "type": "array",
            "description": "One to five public post URLs. Root comments only; comment/reply URLs are not supported. Each post receives an equal share of maxScanComments.",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}