{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Trends Scraper - Trends & Keywords",
    "description": "Analyze Google Trends keywords, compare terms, collect Trending Now data, and monitor stable trend changes for research, SEO, automation, and AI workflows.",
    "version": "1.1",
    "x-build-id": "aTXVqTfEvHQ89e0WT"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ziomixshot~google-trends-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ziomixshot-google-trends-scraper",
        "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/ziomixshot~google-trends-scraper/runs": {
      "post": {
        "operationId": "runs-sync-ziomixshot-google-trends-scraper",
        "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/ziomixshot~google-trends-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-ziomixshot-google-trends-scraper",
        "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": {
          "mode": {
            "title": "Mode",
            "enum": [
              "analyze",
              "compare",
              "trending",
              "monitor"
            ],
            "type": "string",
            "description": "analyze creates one report per term; compare creates one shared timeline; trending returns the current rows; monitor stores a baseline and later returns only NEW, UPDATED, and ENDED changes.",
            "default": "analyze"
          },
          "searchTerms": {
            "title": "Search terms or topic IDs",
            "type": "array",
            "description": "Required for analyze (1–50) and compare (2–5). Enter literal phrases such as ChatGPT or Google topic IDs such as /m/0mkz. Topic IDs aggregate spellings and languages.",
            "items": {
              "type": "string",
              "maxLength": 100
            }
          },
          "dataTypes": {
            "title": "Data in each analyze report",
            "type": "array",
            "description": "Select report surfaces. If at least one surface has data, one report is written and charged; empty surfaces are listed in missingDataTypes. All-empty and technical-error results are free. Compare always uses timeline; trending and monitor ignore this field.",
            "items": {
              "type": "string",
              "enum": [
                "timeline",
                "regions",
                "relatedQueries",
                "suggestions"
              ],
              "enumTitles": [
                "Interest over time",
                "Interest by region",
                "Related queries",
                "Topic suggestions"
              ]
            },
            "default": [
              "timeline",
              "regions",
              "relatedQueries",
              "suggestions"
            ]
          },
          "maxItems": {
            "title": "Maximum result rows",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Caps analyze reports or the Trending Now population. Monitor compares this exact top-N population, so changing the value starts an isolated baseline."
          },
          "timeframe": {
            "title": "Time range",
            "type": "string",
            "description": "Google preset such as now 7-d, today 3-m, today 12-m, today 5-y, or a custom UTC range formatted YYYY-MM-DD YYYY-MM-DD. Related queries require at least 7 days.",
            "default": "today 3-m"
          },
          "geo": {
            "title": "Geography",
            "type": "string",
            "description": "Google Trends geo code: US, PL, US-CA, or empty for worldwide analysis. RSS trending requires a two-letter country.",
            "default": "US"
          },
          "language": {
            "title": "Interface language",
            "type": "string",
            "description": "BCP 47 language tag used by Google, for example en-US or pl-PL.",
            "default": "en-US"
          },
          "category": {
            "title": "Google category ID",
            "minimum": 0,
            "maximum": 999,
            "type": "integer",
            "description": "0 means all categories. Use a Google Trends category ID to disambiguate a term.",
            "default": 0
          },
          "searchProperty": {
            "title": "Google search property",
            "enum": [
              "web",
              "",
              "images",
              "news",
              "youtube",
              "froogle"
            ],
            "type": "string",
            "description": "Separate Google indexes are not comparable with each other. Use web for Web Search; the legacy empty value remains accepted.",
            "default": "web"
          },
          "resolution": {
            "title": "Regional resolution",
            "enum": [
              "COUNTRY",
              "REGION",
              "CITY"
            ],
            "type": "string",
            "description": "Granularity used by interest by region in analyze mode.",
            "default": "REGION"
          },
          "trendingSources": {
            "title": "Trending sources",
            "type": "array",
            "description": "RPC provides up to about 50 trends with growth and relative volume. RSS provides about 10 trends with news articles. Selecting both merges exact normalized titles without conflating their traffic metrics.",
            "items": {
              "type": "string",
              "enum": [
                "rpc",
                "rss"
              ],
              "enumTitles": [
                "Google Trends RPC metrics",
                "Google Trends RSS articles"
              ]
            },
            "default": [
              "rpc",
              "rss"
            ]
          },
          "trendingWindow": {
            "title": "Trending window code",
            "minimum": 4,
            "maximum": 12,
            "type": "integer",
            "description": "RPC recency selector. Supported values are 4, 5, 6, 7, 8 (Rising), 9, 10 (Top), and 12. Google currently returns no RPC payload for 11, so the Actor rejects it. RSS ignores this setting.",
            "default": 8
          },
          "monitorId": {
            "title": "Monitor ID",
            "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
            "minLength": 1,
            "maxLength": 40,
            "type": "string",
            "description": "Stable lowercase slug that identifies one independent monitor, for example pl-daily. Reuse it with the same scope on every scheduled run. Used only in monitor mode.",
            "default": "default"
          },
          "startUrls": {
            "title": "Copied Google Trends URLs",
            "type": "array",
            "description": "Advanced alternative to structured input for analyze, compare, and trending. Monitor mode rejects copied URLs because its population must remain explicit and stable.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}