{
  "openapi": "3.0.1",
  "info": {
    "title": "Review Pitch Generator — pre-sales reports",
    "description": "Scrape a business's worst recent Google Maps reviews and generate a ready-to-send sales pitch plus shareable HTML report. Pre-sales automation for Review Radar.",
    "version": "0.7",
    "x-build-id": "1aatvhQhim9fctDxb"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/travelmonitorlab~review-pitch-generator/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-travelmonitorlab-review-pitch-generator",
        "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/travelmonitorlab~review-pitch-generator/runs": {
      "post": {
        "operationId": "runs-sync-travelmonitorlab-review-pitch-generator",
        "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/travelmonitorlab~review-pitch-generator/run-sync": {
      "post": {
        "operationId": "run-sync-travelmonitorlab-review-pitch-generator",
        "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": {
          "placeUrls": {
            "title": "Place URLs",
            "type": "array",
            "description": "Google Maps place URLs (/maps/place/...) of the prospects to analyze",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "query": {
            "title": "Search query (alternative)",
            "type": "string",
            "description": "Google Maps search, e.g. 'restaurants Esch-sur-Alzette' — takes the first maxPlaces results. Ignored if placeUrls is non-empty."
          },
          "maxPlaces": {
            "title": "Max places",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many prospects to analyze",
            "default": 5
          },
          "maxReviewsPerPlace": {
            "title": "Max reviews per place",
            "minimum": 5,
            "maximum": 50,
            "type": "integer",
            "description": "How many recent reviews to scan per business when looking for the worst",
            "default": 15
          },
          "worstThreshold": {
            "title": "Worst threshold (stars)",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Reviews at or below this rating are included in the pitch report",
            "default": 3
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "generate",
              "check-engagement"
            ],
            "type": "string",
            "description": "generate = scrape + pitch + delivery. check-engagement = IMAP reply watch only (no Maps scraping, runs even under Google rate-limit)",
            "default": "generate"
          },
          "telemetryEndpoint": {
            "title": "Telemetry endpoint (optional)",
            "type": "string",
            "description": "Base URL of our tracking receiver (e.g. https://track.example.com). Embeds an HMAC-signed 1px pixel in each HTML report; opens trigger CONVERSION_RECORDED."
          },
          "vertical": {
            "title": "Vertical",
            "enum": [
              "chr",
              "immobilier",
              "sante",
              "artisanat"
            ],
            "type": "string",
            "description": "Sector template for pitch/report: chr (hotels/restaurants), immobilier, sante, artisanat",
            "default": "chr"
          },
          "emailMap": {
            "title": "Email map (optional)",
            "type": "object",
            "description": "Mapping place name or Maps URL -> recipient email for outbound delivery. Only used when sendApproval is true."
          },
          "smtpUser": {
            "title": "SMTP user (optional, secret)",
            "type": "string",
            "description": "Gmail address used to send reports (requires an app password). Secret input."
          },
          "smtpPassword": {
            "title": "SMTP app password (optional, secret)",
            "type": "string",
            "description": "Gmail app password for the SMTP user. Secret input, never logged."
          },
          "sendApproval": {
            "title": "Approve sending (required for outbound)",
            "type": "boolean",
            "description": "Explicit approval gate: without it, NO email is ever sent (reports are generated only)",
            "default": false
          },
          "maxEmailsPerRun": {
            "title": "Max emails per run",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Rate limit: maximum reports emailed in one run (plus 20s inter-send delay and a 20/day global cap)",
            "default": 5
          },
          "dryRun": {
            "title": "Dry run",
            "type": "boolean",
            "description": "Testing mode: skips report publishing and billing events",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "A residential proxy is strongly recommended — Google Maps blocks datacenter IPs."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}