{
  "openapi": "3.0.1",
  "info": {
    "title": "Keyword Research for AI Agents: Google Trends + Autocomplete",
    "description": "Keyword ideas from Google Autocomplete (a-z and question expansion) plus Google Trends 12-month interest, direction and rising queries, in one compact JSON per keyword with a plain-English summary. Works as an MCP tool. No API key. Errors are free.",
    "version": "0.1",
    "x-build-id": "IBYQyKJbJhxesrJH0"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/cleandata-labs~seo-keyword-research-for-agents/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-cleandata-labs-seo-keyword-research-for-agents",
        "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/cleandata-labs~seo-keyword-research-for-agents/runs": {
      "post": {
        "operationId": "runs-sync-cleandata-labs-seo-keyword-research-for-agents",
        "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/cleandata-labs~seo-keyword-research-for-agents/run-sync": {
      "post": {
        "operationId": "run-sync-cleandata-labs-seo-keyword-research-for-agents",
        "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": "Seed keywords",
            "type": "array",
            "description": "Short search phrases to research, one result per phrase. Example: [\"electric bike\", \"cargo bike\"]. Max 100 per run; duplicates are ignored.",
            "default": [
              "electric bike"
            ],
            "items": {
              "type": "string"
            }
          },
          "country": {
            "title": "Country",
            "type": "string",
            "description": "2-letter country code for Autocomplete and Trends. Example: \"US\", \"GB\" (\"UK\" also works), \"DE\", \"RO\". Use \"\" for worldwide. Default \"US\".",
            "default": "US"
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Language code for suggestions and question words. Example: \"en\", \"ro\", \"de\", \"pt-BR\". Default \"en\". Match it to the country for best results.",
            "default": "en"
          },
          "timeRange": {
            "title": "Trends time range",
            "enum": [
              "now 7-d",
              "today 1-m",
              "today 3-m",
              "today 12-m",
              "today 5-y",
              "all"
            ],
            "type": "string",
            "description": "Period for the Google Trends interest summary. Default \"today 12-m\" (past 12 months). Use \"today 5-y\" to see seasonality over several years.",
            "default": "today 12-m"
          },
          "customTimeRange": {
            "title": "Custom time range (optional)",
            "type": "string",
            "description": "Optional exact period that overrides timeRange. Format \"YYYY-MM-DD YYYY-MM-DD\", e.g. \"2025-01-01 2025-12-31\"."
          },
          "expansion": {
            "title": "Autocomplete depth",
            "enum": [
              "basic",
              "questions",
              "full"
            ],
            "type": "string",
            "description": "How many Autocomplete lookups per seed. \"basic\" = the seed itself; \"questions\" = also what/how/why/is/can/best + seed and seed + vs/for/near; \"full\" (default) = also seed + a ... z. Deeper = more ideas, slower. Price is the same.",
            "default": "full"
          },
          "includeTrends": {
            "title": "Include Google Trends",
            "type": "boolean",
            "description": "true (default) = add Google Trends interest (average, latest, peak, direction) and top + rising related queries. false = Autocomplete ideas only (faster, cheaper).",
            "default": true
          },
          "compareTopSuggestions": {
            "title": "Compare top suggestions in Trends",
            "minimum": 0,
            "maximum": 4,
            "type": "integer",
            "description": "0-4. Compare the seed with this many top Autocomplete ideas on one shared Trends 0-100 scale, to see which variant people search most. Default 0 (off). Adds 2 Trends requests per seed.",
            "default": 0
          },
          "maxKeywordsPerSeed": {
            "title": "Max keywords per seed",
            "minimum": 5,
            "maximum": 500,
            "type": "integer",
            "description": "Cap on the merged keyword list per seed (5-500). Default 100. Lower it to keep agent context small; Trends queries are always kept.",
            "default": 100
          },
          "outputMode": {
            "title": "Output mode",
            "enum": [
              "compact",
              "flat"
            ],
            "type": "string",
            "description": "\"compact\" (default) = one result per seed with a summary and a nested keyword list. \"flat\" = one dataset row per keyword with the same field names, for CSV. Price is the same.",
            "default": "compact"
          },
          "questionPrefixes": {
            "title": "Custom question words (optional)",
            "type": "array",
            "description": "Optional. Replaces the built-in question words put before the seed. Example: [\"how to\", \"what is\", \"best\"]. Built-in lists exist for en, ro, de, fr, es, it, pt, nl, pl.",
            "items": {
              "type": "string"
            }
          },
          "modifierSuffixes": {
            "title": "Custom modifiers (optional)",
            "type": "array",
            "description": "Optional. Replaces the built-in words put after the seed. Example: [\"vs\", \"for\", \"near me\", \"price\"].",
            "items": {
              "type": "string"
            }
          },
          "autocompleteDelaySecs": {
            "title": "Delay between Autocomplete lookups (s)",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Extra pause between Autocomplete lookups in seconds, 0-10. Default 0 (a built-in ~0.3 s polite pause always applies).",
            "default": 0
          },
          "delayBetweenRequestsSecs": {
            "title": "Delay between Trends requests (s)",
            "minimum": 0,
            "maximum": 30,
            "type": "integer",
            "description": "Pause between Google Trends requests in seconds, 0-30. Default 1. Raise it if you see many retries in the log.",
            "default": 1
          },
          "maxRetries": {
            "title": "Max retries per request",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Retries on rate limits or network errors, 0-10. Default 3. Each retry uses a new session (and a new proxy IP).",
            "default": 3
          },
          "requestTimeoutSecs": {
            "title": "Request timeout (s)",
            "minimum": 5,
            "maximum": 120,
            "type": "integer",
            "description": "Timeout per HTTP request in seconds, 5-120. Default 30.",
            "default": 30
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Default {\"useApifyProxy\": true} (recommended: Google rate-limits busy IPs and retries rotate the IP). If the proxy is refused, the run continues without it.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}