{
  "openapi": "3.0.1",
  "info": {
    "title": "Local AI Presence Monitor — Changes & Alerts",
    "description": "Monitor a local business over time. Detect new Google reviews, rating changes and website AI-readiness changes, keep persistent history and send webhook alerts. API, MCP and x402/USDC ready.",
    "version": "1.0",
    "x-build-id": "xmNQiYgbZn57gPeQi"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/travelmonitorlab~local-ai-presence-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-travelmonitorlab-local-ai-presence-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/travelmonitorlab~local-ai-presence-monitor/runs": {
      "post": {
        "operationId": "runs-sync-travelmonitorlab-local-ai-presence-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/travelmonitorlab~local-ai-presence-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-travelmonitorlab-local-ai-presence-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",
        "properties": {
          "query": {
            "title": "Business search query",
            "type": "string",
            "description": "Optional business name and city used to find the Google Maps profile, for example 'Boulangerie Paul Mersch'. Leave empty for a website-only monitor with no Google proxy usage.",
            "default": ""
          },
          "websiteUrl": {
            "title": "Business website URL",
            "type": "string",
            "description": "Public website URL to monitor for JSON-LD, LocalBusiness and FAQ schema, metadata, llms.txt and AI-crawler robots.txt signals. The default is a small website-only QA scenario.",
            "default": "https://adagasolutions.lu"
          },
          "maxReviews": {
            "title": "Maximum recent reviews",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "Number of recent public Google reviews to compare with persistent state. Higher values can increase run time and proxy usage.",
            "default": 10
          },
          "competitorQueries": {
            "title": "Competitor search queries",
            "maxItems": 3,
            "type": "array",
            "description": "Optional list of up to three competing businesses with city. Each successful profile receives the same Google-profile and recent-review score as the target for a fair comparison. Website AEO is excluded from this comparison.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "scoreDropThreshold": {
            "title": "Score-drop alert threshold",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Create a high-severity alert when the transparent presence score falls by at least this many points since the previous run.",
            "default": 5
          },
          "ratingDropThreshold": {
            "title": "Rating-drop alert threshold",
            "minimum": 0,
            "maximum": 5,
            "type": "number",
            "description": "Create a high-severity alert when the public Google rating falls by at least this amount, for example 0.2 stars.",
            "default": 0.2
          },
          "webhookUrl": {
            "title": "Alert webhook URL",
            "type": "string",
            "description": "Optional HTTPS endpoint receiving a JSON POST when high-severity changes are detected. Compatible with generic automation webhooks. Dry-run never calls this URL."
          },
          "slackConnector": {
            "title": "Slack connector (optional)",
            "type": "string",
            "description": "Authorized MCP connector used to post high-severity alerts outside dry-run. The Actor receives only a connector ID; Slack credentials stay in the proxy."
          },
          "slackChannel": {
            "title": "Slack channel",
            "type": "string",
            "description": "Channel receiving high-severity local-presence alerts.",
            "default": "#general"
          },
          "language": {
            "title": "Google Maps interface language",
            "type": "string",
            "description": "Two-letter interface language used when resolving and reading Google Maps, such as fr, en or de.",
            "default": "fr"
          },
          "dryRun": {
            "title": "Dry run without event charges or webhook delivery",
            "type": "boolean",
            "description": "Run the complete monitoring workflow but skip pay-per-event charges and webhook delivery. Apify compute and proxy usage can still apply.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify proxy used only when query is set. Datacenter is the low-cost default. Select the RESIDENTIAL group if Google Maps blocks the run; residential traffic is billed separately.",
            "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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}