{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Reviews Agency Client & SLA Manager",
    "description": "Rank clients and branches by risk, assign account owners, surface response-SLA breaches, and generate separate agency and client reports.",
    "version": "0.5",
    "x-build-id": "pfrC5iBlNHn5vkXZo"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/versant_nautilus~google-reviews-multi-location-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-versant_nautilus-google-reviews-multi-location-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/versant_nautilus~google-reviews-multi-location-monitor/runs": {
      "post": {
        "operationId": "runs-sync-versant_nautilus-google-reviews-multi-location-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/versant_nautilus~google-reviews-multi-location-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-versant_nautilus-google-reviews-multi-location-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": [
          "monitorId",
          "lookbackDays",
          "maxReviewsPerLocation",
          "negativeRatingThreshold",
          "responseSlaHours",
          "aiProvider"
        ],
        "properties": {
          "portfolios": {
            "title": "Client portfolios",
            "maxItems": 100,
            "type": "array",
            "description": "Recommended for agencies. Add each client, its account owner, response SLA, and Google Maps branches. Do not combine this with the single-client locations field.",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "clientName",
                "locations"
              ],
              "properties": {
                "clientId": {
                  "title": "Stable client ID",
                  "description": "Optional machine ID. Leave blank to derive it from the client name.",
                  "type": "string",
                  "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,79}$",
                  "minLength": 1,
                  "maxLength": 80
                },
                "clientName": {
                  "title": "Client name",
                  "description": "Client, franchise, or brand shown in agency and client reports.",
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 160
                },
                "accountManager": {
                  "title": "Account owner",
                  "description": "Agency teammate responsible for follow-up.",
                  "type": "string",
                  "maxLength": 160
                },
                "industry": {
                  "title": "Industry",
                  "description": "Optional industry context for this client.",
                  "type": "string",
                  "maxLength": 160
                },
                "responseSlaHours": {
                  "title": "Response SLA",
                  "description": "Hours allowed to answer a negative review for this client.",
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 720,
                  "default": 48
                },
                "locations": {
                  "title": "Client locations",
                  "description": "Exact Google Maps branches monitored for this client.",
                  "type": "array",
                  "minItems": 1,
                  "maxItems": 500,
                  "items": {
                    "type": "object",
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "title": "Branch name",
                        "description": "Human-friendly branch label used in reports.",
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 160
                      },
                      "url": {
                        "title": "Exact Google Maps URL",
                        "description": "Exact place or share URL for this branch.",
                        "type": "string",
                        "minLength": 8
                      },
                      "placeId": {
                        "title": "Google Place ID",
                        "description": "Stable Google identifier for this branch.",
                        "type": "string",
                        "minLength": 8
                      }
                    }
                  }
                }
              }
            },
            "default": []
          },
          "locations": {
            "title": "Locations for one client",
            "maxItems": 500,
            "type": "array",
            "description": "Compatibility mode for one client. Supply one exact Google Maps place/share URL or Place ID per branch. Do not combine this with client portfolios.",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "name": {
                  "title": "Branch name",
                  "description": "Label used in the agency report.",
                  "type": "string",
                  "editor": "textfield",
                  "minLength": 1,
                  "maxLength": 160
                },
                "url": {
                  "title": "Exact Google Maps URL",
                  "description": "Place or share link for one branch.",
                  "type": "string",
                  "editor": "textfield",
                  "minLength": 8
                },
                "placeId": {
                  "title": "Google Place ID",
                  "description": "Stable Google identifier for one branch.",
                  "type": "string",
                  "editor": "textfield",
                  "minLength": 8
                }
              }
            },
            "default": []
          },
          "allowSearchUrls": {
            "title": "Allow Google Maps search URLs",
            "type": "boolean",
            "description": "Advanced: search URLs may return multiple or unintended businesses. Keep this off for branch monitoring.",
            "default": false
          },
          "inlineReviews": {
            "title": "Inline reviews (development or existing-data mode)",
            "type": "array",
            "description": "Optional review objects. When supplied, the upstream scraper is not called.",
            "items": {
              "type": "object"
            },
            "default": []
          },
          "monitorId": {
            "title": "Agency monitoring workspace ID",
            "minLength": 3,
            "maxLength": 80,
            "type": "string",
            "description": "Stable internal ID for this agency workspace or client. Reuse it on scheduled runs so the Actor can identify new and changed reviews.",
            "default": "default-monitor"
          },
          "firstRunMode": {
            "title": "First run behavior",
            "enum": [
              "emitAll",
              "baselineOnly"
            ],
            "type": "string",
            "description": "Emit all recent reviews for a useful first report, or only save a baseline.",
            "default": "emitAll"
          },
          "lookbackDays": {
            "title": "Review lookback window",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "Fetch reviews from this many days in the past. Use an overlap to avoid missing reviews.",
            "default": 8
          },
          "maxReviewsPerLocation": {
            "title": "Maximum reviews per location",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Safety cap for each location in one run.",
            "default": 250
          },
          "negativeRatingThreshold": {
            "title": "Negative review threshold",
            "minimum": 1,
            "maximum": 4,
            "type": "integer",
            "description": "Reviews at or below this rating are treated as negative.",
            "default": 2
          },
          "responseSlaHours": {
            "title": "Default response SLA",
            "minimum": 1,
            "maximum": 720,
            "type": "integer",
            "description": "Default SLA for single-client mode and for portfolios that do not specify their own SLA.",
            "default": 48
          },
          "upstreamMaxChargeUsd": {
            "title": "Maximum upstream scraper charge",
            "minimum": 0.01,
            "maximum": 1000,
            "type": "number",
            "description": "Optional hard cap passed to the Google Maps Reviews Scraper run.",
            "default": 5
          },
          "aiProvider": {
            "title": "AI provider",
            "enum": [
              "none",
              "openrouter",
              "vertex"
            ],
            "type": "string",
            "description": "Choose deterministic-only analysis, OpenRouter, or Vertex AI Gemini.",
            "default": "none"
          },
          "aiModel": {
            "title": "AI model",
            "type": "string",
            "description": "Leave blank for the provider default.",
            "default": ""
          },
          "openRouterApiKey": {
            "title": "OpenRouter API key",
            "type": "string",
            "description": "Optional when the Actor developer provides an included key. Use a restricted key with a spending limit."
          },
          "vertexProjectId": {
            "title": "Google Cloud project ID",
            "type": "string",
            "description": "Required for Vertex AI unless configured by the Actor developer.",
            "default": ""
          },
          "vertexLocation": {
            "title": "Vertex AI location",
            "type": "string",
            "description": "Region used for Gemini requests.",
            "default": "us-central1"
          },
          "vertexServiceAccountJson": {
            "title": "Google Cloud service-account JSON",
            "type": "string",
            "description": "Optional secret credential for Vertex AI. Prefer a dedicated least-privilege service account."
          },
          "maxAiReviews": {
            "title": "Maximum AI reviews per run",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Hard limit that protects inference spend.",
            "default": 100
          },
          "aiAnalyzeAllRatings": {
            "title": "Analyze positive reviews with AI",
            "type": "boolean",
            "description": "Off by default. Negative and neutral reviews usually contain the most actionable information.",
            "default": false
          },
          "industry": {
            "title": "Industry",
            "type": "string",
            "description": "Used to give the AI relevant operational context.",
            "default": "local business"
          },
          "reportTitle": {
            "title": "Report title",
            "type": "string",
            "description": "White-label title shown at the top of the HTML report.",
            "default": "Agency Review Portfolio Operations Report"
          },
          "brandName": {
            "title": "Agency name",
            "type": "string",
            "description": "Optional agency or team name shown as the report preparer.",
            "default": ""
          },
          "clientName": {
            "title": "Single-client name",
            "type": "string",
            "description": "Used only with the single-client locations field. Multi-client mode takes client names from client portfolios.",
            "default": ""
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}