{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Maps CEE Supplier Shortlist Builder",
    "description": "Build evidence-based local supplier shortlists from Google Maps for CEE procurement and sales teams. Transparent readiness scoring, risk flags, CEE language support, and optional BYOK AI summaries.",
    "version": "0.3",
    "x-build-id": "CqLEOhsPBaXwysaXe"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/kondasviktor~google-maps-cee-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-kondasviktor-google-maps-cee-scraper",
        "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/kondasviktor~google-maps-cee-scraper/runs": {
      "post": {
        "operationId": "runs-sync-kondasviktor-google-maps-cee-scraper",
        "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/kondasviktor~google-maps-cee-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-kondasviktor-google-maps-cee-scraper",
        "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": [
          "searchTerms",
          "location",
          "countryCode"
        ],
        "properties": {
          "searchTerms": {
            "title": "Search terms",
            "type": "array",
            "description": "Local-service supplier keywords (e.g. fogászat, dental clinic, catering). Combine local-language and English terms for best CEE coverage.",
            "items": {
              "type": "string"
            }
          },
          "location": {
            "title": "Location",
            "type": "string",
            "description": "City or region (e.g. Budapest, Hungary)."
          },
          "countryCode": {
            "title": "Country code",
            "type": "string",
            "description": "ISO 3166-1 alpha-2 country code (HU, RO, PL, CZ, SK, AT)."
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Google Maps UI language (en, hu, ro, pl, cs, sk, de).",
            "default": "en"
          },
          "maxResultsPerSearch": {
            "title": "Max results per search term",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum places to collect per search term (max 500). Prefill stays low so Apify Store QA finishes under 5 minutes; raise this for production runs.",
            "default": 50
          },
          "includeReviews": {
            "title": "Include reviews",
            "type": "boolean",
            "description": "Extract review snippets for stronger shortlist evidence and optional BYOK AI summaries.",
            "default": false
          },
          "maxReviewsPerPlace": {
            "title": "Max reviews per place",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Cap reviews when includeReviews is enabled.",
            "default": 10
          },
          "minRating": {
            "title": "Minimum rating",
            "minimum": 0,
            "maximum": 5,
            "type": "number",
            "description": "Filter out places below this star rating.",
            "default": 0
          },
          "minReviewCount": {
            "title": "Minimum review count",
            "minimum": 0,
            "type": "integer",
            "description": "Filter out places with fewer reviews.",
            "default": 0
          },
          "enableAIScoring": {
            "title": "Enable AI scoring",
            "type": "boolean",
            "description": "Optional BYOK enrichment: evidence-based supplier summary per place. Requires your LLM API key below.",
            "default": false
          },
          "aiProvider": {
            "title": "AI provider",
            "enum": [
              "auto",
              "gemini",
              "claude",
              "openai",
              "openrouter"
            ],
            "type": "string",
            "description": "LLM provider for AI scoring. Use auto to pick the first available key (Gemini → Claude → OpenAI → OpenRouter).",
            "default": "auto"
          },
          "aiModel": {
            "title": "OpenRouter model",
            "type": "string",
            "description": "OpenRouter model slug when aiProvider is openrouter or auto (OpenRouter leg). Default: google/gemma-4-31b-it:free. Override with any OpenRouter model, e.g. google/gemma-4-26b-a4b-it:free or anthropic/claude-haiku-4.5."
          },
          "geminiApiKey": {
            "title": "Gemini API key",
            "type": "string",
            "description": "Google AI Studio key for AI scoring when aiProvider is gemini or auto."
          },
          "anthropicApiKey": {
            "title": "Anthropic API key",
            "type": "string",
            "description": "Claude API key when aiProvider is claude or auto."
          },
          "openaiApiKey": {
            "title": "OpenAI API key",
            "type": "string",
            "description": "ChatGPT API key when aiProvider is openai or auto."
          },
          "openrouterApiKey": {
            "title": "OpenRouter API key",
            "type": "string",
            "description": "OpenRouter key when aiProvider is openrouter or auto."
          },
          "enableGoogleSheetsExport": {
            "title": "Export to Google Sheets",
            "type": "boolean",
            "description": "Append results to a spreadsheet (requires GOOGLE_SERVICE_ACCOUNT_KEY).",
            "default": false
          },
          "googleSheetsUrl": {
            "title": "Google Sheets URL",
            "type": "string",
            "description": "Spreadsheet URL when export is enabled."
          },
          "outputMode": {
            "title": "Output mode",
            "enum": [
              "standard",
              "procurement",
              "leads"
            ],
            "type": "string",
            "description": "standard = raw fields; procurement = supplier shortlist scoring; leads = contactable lead flag only.",
            "default": "procurement"
          },
          "customGeolocation": {
            "title": "Custom geolocation (GeoJSON)",
            "type": "object",
            "description": "Optional Point, Polygon, or MultiPolygon to override Nominatim lookup."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}