{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Maps Bad Review Lead Scraper & Cold Outreach Bot",
    "description": "Scrapes Google Maps businesses with recent 1-3 star reviews (1-28 days), extracts contact emails & socials from websites, and dispatches automated reputation management pitch emails.",
    "version": "1.0",
    "x-build-id": "EXEdudGdNUeaptdel"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/awake_orchestra_trb~google-maps-review-outreach-actor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-awake_orchestra_trb-google-maps-review-outreach-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/awake_orchestra_trb~google-maps-review-outreach-actor/runs": {
      "post": {
        "operationId": "runs-sync-awake_orchestra_trb-google-maps-review-outreach-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/awake_orchestra_trb~google-maps-review-outreach-actor/run-sync": {
      "post": {
        "operationId": "run-sync-awake_orchestra_trb-google-maps-review-outreach-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": [
          "searchQueries"
        ],
        "properties": {
          "searchQueries": {
            "title": "Search Queries",
            "type": "array",
            "description": "Google Maps search queries (e.g. 'Dentists in Zurich', 'Restaurants in Geneva', 'Plumbers in London').",
            "default": [
              "Biel/Bienne Moving companies",
              "Thun Car repair shops",
              "Winterthur Property management companies",
              "Aarau Renovation contractors",
              "St. Gallen Cleaning companies",
              "Lugano Auto repair shops",
              "Fribourg Hair salons",
              "Neuchâtel Dentists",
              "Sion Roofing contractors",
              "Chur Real estate agencies"
            ],
            "items": {
              "type": "string"
            }
          },
          "maxPlacesPerQuery": {
            "title": "Max Places Per Query",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum number of business listings to scrape per search query. The bot waits for the query to settle and auto-scrolls until the end of Google Maps results.",
            "default": 200
          },
          "maxBrowsers": {
            "title": "Number of Parallel Browsers (Windows)",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many browser windows to run simultaneously. Each browser processes a different search query in parallel for maximum speed.",
            "default": 2
          },
          "maxConcurrency": {
            "title": "Concurrent Tabs (Per Browser)",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many tabs each browser window opens concurrently to inspect businesses, crawl emails, and send pitch emails.",
            "default": 2
          },
          "targetStars": {
            "title": "Target Star Ratings",
            "type": "array",
            "description": "Review star ratings to consider as negative / hot leads (e.g. 1, 2, 3).",
            "default": [
              1,
              2,
              3
            ]
          },
          "maxReviewAgeDays": {
            "title": "Max Review Age (Days)",
            "minimum": 1,
            "maximum": 90,
            "type": "integer",
            "description": "Only consider reviews posted within this many days (e.g. 28 days = past 4 weeks).",
            "default": 28
          },
          "minBadReviews": {
            "title": "Min Bad Reviews Count",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Minimum count of recent bad reviews needed to qualify a business as a hot lead.",
            "default": 1
          },
          "maxBadReviewsToCapture": {
            "title": "Max Bad Reviews to Capture Per Business",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Maximum number of recent bad reviews to extract and include in the pitch email.",
            "default": 4
          },
          "extractSocials": {
            "title": "Extract Social Media Profiles",
            "type": "boolean",
            "description": "Crawl the business website for Instagram, Facebook, LinkedIn, Twitter/X, and YouTube links.",
            "default": true
          },
          "extractPhones": {
            "title": "Extract Phone Numbers",
            "type": "boolean",
            "description": "Extract official phone numbers from Google Maps and website contact pages.",
            "default": true
          },
          "emailFindingDepth": {
            "title": "Email Crawling Depth",
            "enum": [
              "fast",
              "deep"
            ],
            "type": "string",
            "description": "Speed vs depth when scanning website for contact emails.",
            "default": "deep"
          },
          "enableEmailOutreach": {
            "title": "Enable Email Outreach",
            "type": "boolean",
            "description": "If enabled, the Actor will dispatch pitch emails to the extracted business emails.",
            "default": true
          },
          "dryRun": {
            "title": "Dry Run / Simulation Mode",
            "type": "boolean",
            "description": "If checked, simulates email sending without actually sending emails. Ideal for testing and previewing lead outputs.",
            "default": false
          },
          "smtpAccounts": {
            "title": "SMTP Accounts (Multi-Account Rotation)",
            "type": "array",
            "description": "List of Gmail or custom SMTP accounts for rotating cold email outreach.",
            "default": [
              {
                "email": "shahji90k@gmail.com",
                "app_password": "hgck udow kgdn fzpo",
                "host": "smtp.gmail.com",
                "port": 587,
                "daily_limit": 200
              }
            ]
          },
          "senderName": {
            "title": "Sender Name",
            "type": "string",
            "description": "Name of the sender displayed in outreach emails.",
            "default": "Reputation Management"
          },
          "emailSubject": {
            "title": "Email Subject Template",
            "type": "string",
            "description": "Email subject line. Supports {{business_name}} variable.",
            "default": "Negative Review Removal Service for {{business_name}}"
          },
          "emailTemplateHtml": {
            "title": "Email Template (HTML)",
            "type": "string",
            "description": "HTML version of pitch email. Variables: {{business_name}}, {{sender_name}}, {{review_links}}, {{review_count}}, {{stars_summary}}.",
            "default": "<!DOCTYPE html><html><body style=\"font-family: Arial, sans-serif; line-height: 1.6; color: #222; max-width: 600px; padding: 15px;\"><p>Hello <strong>{{business_name}} Team</strong>,</p><p>We have noticed some recent negative reviews on your Google profile. We can completely remove them for you.<br><strong>You only pay AFTER successful removal!</strong></p><p><strong>Review links:</strong></p><ol style=\"padding-left: 20px;\">{{review_links}}</ol><br><p>Best regards,<br><strong>{{sender_name}}</strong></p></body></html>"
          },
          "emailTemplateText": {
            "title": "Email Template (Plain Text)",
            "type": "string",
            "description": "Plain-text fallback version of pitch email.",
            "default": "Hello {{business_name}} Team,\n\nWe have noticed some recent negative reviews on your Google profile. We can completely remove them for you.\nYou only pay AFTER successful removal!\n\nReview links:\n{{review_links}}\n\nBest regards,\n{{sender_name}}"
          },
          "sendDelaySeconds": {
            "title": "Outreach Delay (Seconds)",
            "minimum": 0,
            "maximum": 60,
            "type": "integer",
            "description": "Delay in seconds between sending outreach emails to avoid spam filters.",
            "default": 3
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Apify Proxy or custom proxies to avoid Google IP blocking / captchas. (Leave useApifyProxy: false when running locally).",
            "default": {
              "useApifyProxy": false
            }
          },
          "language": {
            "title": "Google Maps Language",
            "type": "string",
            "description": "Language parameter for Google Maps UI ('en' for English, 'de' for German, 'fr' for French, 'es' for Spanish).",
            "default": "en"
          },
          "headless": {
            "title": "Headless Browser",
            "type": "boolean",
            "description": "Run browser headlessly (required for Apify cloud execution).",
            "default": true
          },
          "googleSessionCookies": {
            "title": "Google Session Cookies (Optional JSON)",
            "type": "string",
            "description": "JSON array of Google session cookies to bypass sign-in prompts if needed."
          },
          "webhookUrl": {
            "title": "Webhook URL (Optional)",
            "type": "string",
            "description": "Optional HTTP POST webhook URL triggered for every hot lead found."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}