{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Keyword Planner MCP",
    "description": "Generate bounded Google Ads keyword ideas or historical metrics through DataForSEO. Returns normalized rows with source, targeting, monthly volume, competition, bid ranges, trend, timestamp, and terminal outcome records.",
    "version": "0.1",
    "x-build-id": "Yn3fV1A7h0GY5K706"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/khadinakbar~google-keyword-planner-mcp/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-khadinakbar-google-keyword-planner-mcp",
        "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/khadinakbar~google-keyword-planner-mcp/runs": {
      "post": {
        "operationId": "runs-sync-khadinakbar-google-keyword-planner-mcp",
        "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/khadinakbar~google-keyword-planner-mcp/run-sync": {
      "post": {
        "operationId": "run-sync-khadinakbar-google-keyword-planner-mcp",
        "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": [
          "keywords"
        ],
        "properties": {
          "operation": {
            "title": "Operation",
            "enum": [
              "keyword_ideas",
              "historical_metrics"
            ],
            "type": "string",
            "description": "Choose `keyword_ideas` to expand up to 20 seed terms, or `historical_metrics` to retrieve metrics for up to 1000 known terms. Both use current Google Ads keyword data through DataForSEO.",
            "default": "keyword_ideas"
          },
          "keywords": {
            "title": "Keywords or seed terms",
            "minItems": 1,
            "maxItems": 1000,
            "type": "array",
            "description": "For `keyword_ideas`, provide 1–20 seed terms. For `historical_metrics`, provide 1–1000 known terms. Each term must be 1–80 characters and at most 10 words. Near-exact variants can be combined by the upstream Google Ads data source.",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 80
            }
          },
          "locationCode": {
            "title": "DataForSEO location code",
            "minimum": 1,
            "type": "integer",
            "description": "Optional DataForSEO Google Ads location code. For example, 2840 is the United States. Leave blank for worldwide targeting. Set only one location selector."
          },
          "locationName": {
            "title": "DataForSEO location name",
            "type": "string",
            "description": "Optional full DataForSEO Google Ads location name, such as `London,England,United Kingdom`. Set only one location selector."
          },
          "locationCoordinate": {
            "title": "Location coordinate",
            "type": "string",
            "description": "Optional latitude,longitude location selector. Set only one location selector; the provider uses the containing country."
          },
          "languageCode": {
            "title": "Search language",
            "minLength": 2,
            "maxLength": 10,
            "type": "string",
            "description": "DataForSEO Google Ads language code, such as `en` or `es`. Defaults to `en`. This is not a country selector.",
            "default": "en"
          },
          "searchPartners": {
            "title": "Include Google search partners",
            "type": "boolean",
            "description": "Include Google search partners in the provider request. Defaults to false, which targets Google Search.",
            "default": false
          },
          "includeAdultKeywords": {
            "title": "Include adult keywords",
            "type": "boolean",
            "description": "Request adult-associated terms from the provider. Google Ads may still return no data for restricted terms. Defaults to false.",
            "default": false
          },
          "sortBy": {
            "title": "Idea sort order",
            "enum": [
              "relevance",
              "search_volume",
              "competition_index",
              "low_top_of_page_bid",
              "high_top_of_page_bid"
            ],
            "type": "string",
            "description": "Used only for `keyword_ideas`. Sorts the upstream ideas before this Actor returns the bounded result set.",
            "default": "relevance"
          },
          "maxResults": {
            "title": "Maximum returned rows",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum normalized rows written to the dataset. Defaults to 100 and caps at 1000. The provider can find more ideas; `providerResultCount` and `resultsTruncated` preserve that boundary.",
            "default": 100
          },
          "dateFrom": {
            "title": "Historical data start date",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Optional `YYYY-MM-DD` start date for Google Ads historical metrics, up to four years back. Omit for the provider's default period. Applies to both operations."
          },
          "dateTo": {
            "title": "Historical data end date",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Optional `YYYY-MM-DD` end date for Google Ads historical metrics. It cannot be later than yesterday; omit for the provider's default period. Applies to both operations."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}