{
  "openapi": "3.0.1",
  "info": {
    "title": "Keyword Search Volume - Google Keyword Planner",
    "description": "Bulk Google keyword search volume from the Google Ads API (Keyword Planner): monthly search volume, 12-month trend, CPC, competition and top-of-page bids for up to thousands of keywords, plus keyword ideas. Any country, region or language. No Google Ads account needed.",
    "version": "1.0",
    "x-build-id": "seWMhaYjvZ5jUergr"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/adyg~keyword-search-volume/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-adyg-keyword-search-volume",
        "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/adyg~keyword-search-volume/runs": {
      "post": {
        "operationId": "runs-sync-adyg-keyword-search-volume",
        "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/adyg~keyword-search-volume/run-sync": {
      "post": {
        "operationId": "run-sync-adyg-keyword-search-volume",
        "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": {
          "keywords": {
            "title": "Keywords",
            "minItems": 1,
            "type": "array",
            "description": "Keywords to look up (one per line). Used as <b>seed keywords</b> when you ask for keyword ideas. Keywords are trimmed, lower-cased and de-duplicated; match-type symbols like <code>[exact]</code> or <code>\"phrase\"</code> and characters Google Ads does not accept are removed. Max 80 characters and 10 words per keyword. Large lists are split into batches automatically.",
            "items": {
              "type": "string"
            }
          },
          "mode": {
            "title": "What to get",
            "enum": [
              "search_volume",
              "keyword_ideas",
              "both"
            ],
            "type": "string",
            "description": "<b>Search volume</b>: metrics for exactly the keywords you enter. <b>Keyword ideas</b>: new related keywords (with the same metrics) generated from your seed keywords, like Google Keyword Planner's 'Discover new keywords'. <b>Both</b>: metrics for your keywords plus ideas.",
            "default": "search_volume"
          },
          "location": {
            "title": "Location (country)",
            "type": "string",
            "description": "Country name (<code>United States</code>, <code>Germany</code>), 2-letter country code (<code>US</code>, <code>GB</code>) or location code (<code>2840</code>). For a state, region or city use the Google Ads location name, e.g. <code>California,United States</code> or <code>London,England,United Kingdom</code> (region/city lookups always use live Google Ads data).",
            "default": "United States"
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Language name (<code>English</code>, <code>Spanish</code>) or code (<code>en</code>, <code>es</code>). Leave empty to use the main language of the location (e.g. German for Germany)."
          },
          "includeMonthlySearches": {
            "title": "Include monthly search history",
            "type": "boolean",
            "description": "Add the month-by-month search volume (last 12 months by default, or the date range below) to every result.",
            "default": true
          },
          "dateFrom": {
            "title": "History from (month)",
            "pattern": "^$|^\\d{4}-\\d{2}(-\\d{2})?$",
            "type": "string",
            "description": "Optional start month of the monthly history, format <code>YYYY-MM</code> (e.g. <code>2024-01</code>). Up to 4 years back. Leave empty for the last 12 months."
          },
          "dateTo": {
            "title": "History to (month)",
            "pattern": "^$|^\\d{4}-\\d{2}(-\\d{2})?$",
            "type": "string",
            "description": "Optional end month of the monthly history, format <code>YYYY-MM</code>. Google publishes data for the previous month only, so later months are capped automatically."
          },
          "ideasMethod": {
            "title": "Keyword ideas method",
            "enum": [
              "keyword_ideas",
              "keyword_suggestions",
              "related_keywords"
            ],
            "type": "string",
            "description": "Only used for keyword ideas. With the <b>Google Ads API</b> data source, ideas come from Keyword Planner's 'Discover new keywords' (up to 20 seed keywords per request) and this setting is ignored. With the <b>keyword database</b>: <b>Keyword Planner-style ideas</b> = keywords about the same topic; <b>Long-tail suggestions</b> = phrases that contain your seed keyword; <b>Related searches</b> = Google's 'related searches' for your seed keyword.",
            "default": "keyword_ideas"
          },
          "maxIdeas": {
            "title": "Max keyword ideas",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Maximum number of keyword ideas to return in total per run. You only pay for ideas that are returned.",
            "default": 100
          },
          "minSearchVolume": {
            "title": "Minimum search volume for ideas",
            "minimum": 0,
            "type": "integer",
            "description": "Skip keyword ideas with a lower average monthly search volume. 0 = keep all ideas that have data.",
            "default": 0
          },
          "dataSource": {
            "title": "Data source",
            "enum": [
              "google_ads",
              "keyword_database",
              "auto"
            ],
            "type": "string",
            "description": "<b>Google Ads API</b> (default): queries Google Ads (Keyword Planner) live, up to 1,000 keywords per request, and returns a row for every keyword Google knows. Adds a small per-request fee (see Pricing). <b>Keyword database</b>: a database built from Google Ads data, refreshed monthly; no request fee, also returns keyword difficulty and search intent, country-level locations only. <b>Auto</b>: keyword database for country-level searches, Google Ads API for regions/cities or languages the database does not cover.",
            "default": "google_ads"
          },
          "googleAdsMode": {
            "title": "Google Ads request mode",
            "enum": [
              "live",
              "queued"
            ],
            "type": "string",
            "description": "Only used when the Google Ads API is queried. <b>Live</b> (default): results in seconds. <b>Queued</b>: cheaper per-request fee, but results usually take a few minutes and can take longer at peak times; the run waits for them. If a queued run times out, run it again with the same input to collect the results without paying the request fee again.",
            "default": "live"
          },
          "queuedMaxWaitMinutes": {
            "title": "Max wait for queued results (minutes)",
            "minimum": 1,
            "maximum": 1440,
            "type": "integer",
            "description": "Queued mode only: how long the run waits for Google Ads results before stopping (it never waits past the run timeout).",
            "default": 120
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}