{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Search Console, GA4, Clarity & Bing MCP Server",
    "description": "Google Search Console MCP server with GA4, Clarity and Bing Webmaster Tools: ask Claude, ChatGPT or Cursor about rankings, traffic, conversions and UX issues.",
    "version": "1.3",
    "x-build-id": "jcOmMQOcesoczjCq6"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/muhammadafzal~gsc-ga4-clarity-mcp-server/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-muhammadafzal-gsc-ga4-clarity-mcp-server",
        "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/muhammadafzal~gsc-ga4-clarity-mcp-server/runs": {
      "post": {
        "operationId": "runs-sync-muhammadafzal-gsc-ga4-clarity-mcp-server",
        "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/muhammadafzal~gsc-ga4-clarity-mcp-server/run-sync": {
      "post": {
        "operationId": "run-sync-muhammadafzal-gsc-ga4-clarity-mcp-server",
        "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": {
          "googleCredentialsJson": {
            "title": "Google credentials JSON",
            "type": "string",
            "description": "Credentials that can read your Search Console and GA4 properties: {\"client_id\",\"client_secret\",\"refresh_token\"} from your own OAuth client, or a whole service-account key file. If Search Console and GA4 use different refresh tokens, paste both as a list: [{...},{...}]. Leave empty if you only use Clarity. NOT your Google password."
          },
          "clarityApiToken": {
            "title": "Microsoft Clarity API token",
            "type": "string",
            "description": "Data Export token from your Clarity project (Settings > Data Export > Generate new API token; project admins only). For several projects, enter one 'label=token' per line, for example 'shop=eyJ...'. Leave empty if you only use Google."
          },
          "googleApiKey": {
            "title": "Google API key (PageSpeed and Core Web Vitals)",
            "type": "string",
            "description": "Optional key for the page_speed tool. In the Google Cloud console enable the 'PageSpeed Insights API' and the 'Chrome UX Report API', create an API key (APIs & Services > Credentials) and restrict it to those two APIs. Without it, lab runs use Google's shared quota (often used up) and Core Web Vitals field data is unavailable. Google does not charge for these APIs."
          },
          "bingApiKey": {
            "title": "Bing Webmaster API key",
            "type": "string",
            "description": "Optional key for the bing_* tools (Bing search performance, URL index status, crawl health, inbound links, keyword demand and sitemaps). In Bing Webmaster Tools open Settings > API Access, accept the terms and choose Generate API Key. One key covers every site verified in that Bing account; Bing can import verified sites from Google Search Console. Bing does not charge for the API."
          },
          "defaultSiteUrl": {
            "title": "Default Search Console property",
            "type": "string",
            "description": "Property the tools use when the assistant does not name one, for example 'sc-domain:example.com' or 'https://www.example.com/'. Optional: with a single property it is picked automatically."
          },
          "defaultGa4PropertyId": {
            "title": "Default GA4 property ID",
            "type": "string",
            "description": "Numeric GA4 property ID, for example '123456789' (Admin > Property details). NOT the G- measurement ID. Optional: with a single property it is picked automatically."
          },
          "allowWrites": {
            "title": "Allow writes",
            "type": "boolean",
            "description": "Lets the assistant change data: submit or remove sitemaps and add or remove Search Console properties (needs credentials with the full webmasters scope); create, update or delete GA4 annotations, key events and custom dimensions or metrics (needs the analytics.edit scope and the Editor role); and submit or remove Bing sitemaps, submit URLs to Bing and add, verify or remove Bing sites (needs the Bing API key). Off by default, so the server only reads data and the write tools are not listed. Deletes also need confirm: true from the assistant.",
            "default": false
          },
          "mode": {
            "title": "Run mode (for normal runs, not the MCP server)",
            "enum": [
              "checkAccess",
              "clarityArchive"
            ],
            "type": "string",
            "description": "What a normal (non-server) run does. 'checkAccess' tests the credentials and lists your properties, free. 'clarityArchive' saves the last 24 hours of Clarity data so clarity_history can read older days; schedule it daily just after 00:00 UTC.",
            "default": "checkAccess"
          },
          "clarityArchiveDimensionSets": {
            "title": "Clarity archive breakdowns",
            "maxItems": 9,
            "type": "array",
            "description": "Breakdowns saved by each clarityArchive run, one Clarity call each (Clarity allows 10 per project per day). '(none)' is the whole-site total; 'Source,Medium' combines up to three of Browser, Device, Country/Region, OS, Source, Medium, Campaign, Channel, URL.",
            "default": [
              "(none)",
              "URL",
              "Device",
              "Country/Region",
              "Channel",
              "Source,Medium"
            ],
            "items": {
              "type": "string"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}