{
  "openapi": "3.0.1",
  "info": {
    "title": "AI Icebreaker Generator - Cold-Email Opening Lines",
    "description": "Generate one personalized cold-outreach opening line per Google Maps place record using a BYO LLM key chain (Gemini, Groq, OpenRouter). Base mode uses only fields already on the place record (zero fetch). Enriched mode also fetches the homepage and folds a summary into the prompt. Pay-per-result.",
    "version": "1.0",
    "x-build-id": "aGMDLPWqGWVv1ahYH"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/santamaria-automations~ai-icebreaker/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-santamaria-automations-ai-icebreaker",
        "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/santamaria-automations~ai-icebreaker/runs": {
      "post": {
        "operationId": "runs-sync-santamaria-automations-ai-icebreaker",
        "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/santamaria-automations~ai-icebreaker/run-sync": {
      "post": {
        "operationId": "run-sync-santamaria-automations-ai-icebreaker",
        "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": {
          "places": {
            "title": "Places",
            "type": "array",
            "description": "Array of Google Maps place records. Each element is a full place object as emitted by the google-maps-scraper actor (with `title`, `category`, `categories`, `website`, `phone`, `rating`, `review_count`, `description`, `complete_address`, etc.).",
            "items": {
              "type": "object"
            }
          },
          "companies": {
            "title": "Companies (with company_id passthrough)",
            "type": "array",
            "description": "Alternative to `places`. Each entry carries a company_id (echoed on the output row) plus the place record.",
            "items": {
              "type": "object",
              "required": [
                "place"
              ],
              "properties": {
                "company_id": {
                  "title": "Company ID",
                  "type": "string",
                  "description": "Your internal identifier, echoed on the output row so you can join icebreakers back to your source data."
                },
                "place": {
                  "title": "Place",
                  "type": "object",
                  "description": "The Google Maps place record."
                }
              }
            }
          },
          "tone": {
            "title": "Tone",
            "enum": [
              "friendly",
              "professional",
              "casual",
              "direct"
            ],
            "type": "string",
            "description": "Voice of the generated line. `friendly` is warm and professional (default), `professional` is buttoned-up, `casual` is chatty, `direct` is punchy and to-the-point.",
            "default": "friendly"
          },
          "focus": {
            "title": "Focus (optional free-text)",
            "type": "string",
            "description": "Optional free-text guidance passed to the LLM alongside the place record. Steers every line toward your specific outreach angle. Example: 'Focus on their photo count and their newest reviews', or 'Mention that we specialize in local SEO for care homes'."
          },
          "enableEnriched": {
            "title": "Enable Enriched Mode (homepage fetch)",
            "type": "boolean",
            "description": "When true, the actor fetches each business's homepage, condenses it into a short summary, and folds it into the icebreaker prompt. Costs slightly more per row but produces sharper lines. Falls back silently to base mode when the site 404s or hits an anti-bot challenge.",
            "default": false
          },
          "llmProvider": {
            "title": "LLM Provider",
            "enum": [
              "gemini",
              "groq",
              "openrouter"
            ],
            "type": "string",
            "description": "Primary AI provider. Gemini Flash is fastest and has a generous free tier.",
            "default": "gemini"
          },
          "fallbackProvider": {
            "title": "Fallback LLM Provider",
            "enum": [
              "gemini",
              "groq",
              "openrouter"
            ],
            "type": "string",
            "description": "Second-level fallback if the primary provider fails (rate limit, auth error, etc)."
          },
          "fallback2Provider": {
            "title": "Third-Level Fallback",
            "enum": [
              "gemini",
              "groq",
              "openrouter"
            ],
            "type": "string",
            "description": "Third-level fallback if both primary and first fallback fail."
          },
          "llmModel": {
            "title": "LLM Model (optional override)",
            "type": "string",
            "description": "Override the default model. Defaults: Gemini -> gemini-2.0-flash, Groq -> llama-3.3-70b-versatile, OpenRouter -> google/gemini-2.0-flash-001. If your OpenRouter key does not have access to the default paid Gemini model, try a free model like meta-llama/llama-3.1-8b-instruct."
          },
          "geminiApiKey": {
            "title": "Gemini API Key (recommended)",
            "type": "string",
            "description": "Google Gemini Flash. Best quality/cost ratio, generous free tier. Get a key at https://aistudio.google.com/app/apikey"
          },
          "groqApiKey": {
            "title": "Groq API Key (optional)",
            "type": "string",
            "description": "Groq. Ultra-fast inference. Get a key at https://console.groq.com/keys"
          },
          "openrouterApiKey": {
            "title": "OpenRouter API Key (optional)",
            "type": "string",
            "description": "OpenRouter. Access to 100+ models. Get a key at https://openrouter.ai/keys"
          },
          "outputLanguage": {
            "title": "Output Language",
            "type": "string",
            "description": "Language for the generated icebreaker line. Uses standard ISO 639-1 codes. Pass any ISO 639-1 language code: en, de, fr, ja, es, pt, it, ko, zh-CN, ar, nl, pl, sv, da, fi, no, cs, hu, ro, el, tr, th, vi, id, and more. Set to `auto` to match the business's country/language.",
            "default": "en"
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Only used when enriched mode is enabled (for the homepage fetch). Apify proxy works for most sites.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}