{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Trends Scraper - Keywords, Regions & Rising Queries",
    "description": "Scrape Google Trends without an API key. Get interest over time, interest by region, top and rising related queries, related topics, breakout detection, and SEO opportunity scores for Web, News, YouTube, Images, and Shopping.",
    "version": "1.2",
    "x-build-id": "KHu9rQyzSVbsKJtbX"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/groupoject~trendpulse-keyword-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-groupoject-trendpulse-keyword-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/groupoject~trendpulse-keyword-monitor/runs": {
      "post": {
        "operationId": "runs-sync-groupoject-trendpulse-keyword-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/groupoject~trendpulse-keyword-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-groupoject-trendpulse-keyword-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": {
          "keywords": {
            "title": "Keywords",
            "uniqueItems": true,
            "type": "array",
            "description": "List of keywords to analyze. You can also paste keywords as text in the next field.",
            "items": {
              "type": "string"
            }
          },
          "keywordsText": {
            "title": "Keywords as text",
            "type": "string",
            "description": "Paste one keyword per line, or comma-separated. Useful for bulk uploads (hundreds to thousands)."
          },
          "geo": {
            "title": "Country / Geo",
            "type": "string",
            "description": "Google Trends geo code (e.g. US, GB, CA, AU, MA, FR, DE). Use an empty string for Worldwide.",
            "default": "US"
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Language code (e.g. en, fr, es, de).",
            "default": "en"
          },
          "timeRange": {
            "title": "Time range",
            "enum": [
              "now 1-H",
              "now 4-H",
              "now 1-d",
              "now 7-d",
              "today 1-m",
              "today 3-m",
              "today 12-m",
              "today 5-y",
              "all"
            ],
            "type": "string",
            "description": "Google Trends time window.",
            "default": "today 12-m"
          },
          "category": {
            "title": "Category",
            "type": "string",
            "description": "Google Trends category ID (default '0' = all categories).",
            "default": "0"
          },
          "searchType": {
            "title": "Google search surface",
            "enum": [
              "web",
              "images",
              "news",
              "youtube",
              "shopping"
            ],
            "type": "string",
            "description": "Analyze Web Search, Image Search, News Search, YouTube Search, or Google Shopping trends.",
            "default": "web"
          },
          "includeRelatedQueries": {
            "title": "Include related queries",
            "type": "boolean",
            "description": "Fetch top + rising related queries for each keyword.",
            "default": true
          },
          "includeRelatedTopics": {
            "title": "Include related topics",
            "type": "boolean",
            "description": "Fetch related topics (entities) for each keyword.",
            "default": true
          },
          "includeContentAngles": {
            "title": "Include content angle suggestions",
            "type": "boolean",
            "description": "Generate deterministic content angle suggestions based on trend status and related queries.",
            "default": true
          },
          "maxKeywords": {
            "title": "Max keywords",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum number of keywords to process. Excess keywords are truncated with a warning.",
            "default": 500
          },
          "requestDelayMs": {
            "title": "Request delay (ms)",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Delay between requests to avoid rate limiting. Recommended: 800–2000ms.",
            "default": 4000
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Number of keywords processed in parallel. Keep low (1–4) to avoid 429 errors.",
            "default": 1
          },
          "fetchMode": {
            "title": "Fetch mode",
            "enum": [
              "serpapi",
              "apify-scraper",
              "auto",
              "browser",
              "http"
            ],
            "type": "string",
            "description": "How to fetch Google Trends data. HTTP is the fast no-key default. SerpApi and the upstream Apify Actor remain optional fallbacks.",
            "default": "http"
          },
          "serpApiKey": {
            "title": "SerpApi API key",
            "type": "string",
            "description": "Required when fetchMode is 'serpapi'. Get a free key (100 searches/month) at https://serpapi.com. Your key is never logged."
          },
          "browserNavigationTimeoutMs": {
            "title": "Browser navigation timeout (ms)",
            "minimum": 5000,
            "maximum": 300000,
            "type": "integer",
            "description": "Per-keyword navigation timeout in browser mode. Increase for slow proxies.",
            "default": 60000
          },
          "browserWarmupMs": {
            "title": "Browser warm-up dwell (ms)",
            "minimum": 0,
            "maximum": 60000,
            "type": "integer",
            "description": "Extra dwell time after page load to let late XHRs fire. Increase if related-queries are missed.",
            "default": 2000
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Use Apify Proxy (recommended: residential or Google SERP groups for best reliability)."
          },
          "useMockData": {
            "title": "Use mock data (debug only)",
            "type": "boolean",
            "description": "If true AND debugMode is true, use synthetic data instead of fetching Google Trends. Useful for testing the pipeline.",
            "default": false
          },
          "debugMode": {
            "title": "Debug mode",
            "type": "boolean",
            "description": "Enable verbose logging.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}