{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Trends Scraper & API: Interest, Related, Trending",
    "description": "Reliable Google Trends data: interest over time, interest by region, related queries and topics, and Trending Now. Pay-per-event, no browser, partial results still succeed.",
    "version": "1.0",
    "x-build-id": "9WAZz5JtT2R52M8gb"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/sunburst077~google-trends-reliable/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-sunburst077-google-trends-reliable",
        "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/sunburst077~google-trends-reliable/runs": {
      "post": {
        "operationId": "runs-sync-sunburst077-google-trends-reliable",
        "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/sunburst077~google-trends-reliable/run-sync": {
      "post": {
        "operationId": "run-sync-sunburst077-google-trends-reliable",
        "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": {
          "searchTerms": {
            "title": "Search terms",
            "type": "array",
            "description": "Keywords or topics to analyze. Each item is one request. Turn on Compare comma-separated terms to put up to 5 keywords on one shared 0–100 chart. Required unless you pass startUrls, a public spreadsheetId, or enable Trending Now.",
            "default": [
              "bitcoin"
            ],
            "items": {
              "type": "string"
            }
          },
          "isMultiple": {
            "title": "Compare comma-separated terms",
            "type": "boolean",
            "description": "When enabled, commas inside one search-terms line split it into a comparison group of up to 5 keywords (same as adding terms on trends.google.com). Extra keywords are batched into further groups of 5.",
            "default": false
          },
          "startUrls": {
            "title": "Google Trends URLs",
            "type": "array",
            "description": "Paste explore URLs from trends.google.com. Each URL's q, geo, date, cat, and gprop values override the form fields for that job.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "spreadsheetId": {
            "title": "Public Google Sheet ID",
            "type": "string",
            "description": "Optional. Load terms from a public sheet (first column, row 1 treated as a header). Accepted for drop-in compatibility with other Trends actors."
          },
          "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": "Predefined Google Trends period. Ignored when a custom range is set. Empty means the past 12 months.",
            "default": "today 12-m"
          },
          "customTimeRange": {
            "title": "Custom time range",
            "type": "string",
            "description": "Overrides Time range. Format: YYYY-MM-DD YYYY-MM-DD, for example 2024-01-01 2024-12-31."
          },
          "geo": {
            "title": "Geo",
            "enum": [
              "",
              "US",
              "GB",
              "DE",
              "FR",
              "IT",
              "ES",
              "NL",
              "BE",
              "SE",
              "NO",
              "DK",
              "FI",
              "PL",
              "CZ",
              "AT",
              "CH",
              "IE",
              "PT",
              "CA",
              "MX",
              "BR",
              "AR",
              "CL",
              "CO",
              "AU",
              "NZ",
              "IN",
              "JP",
              "KR",
              "SG",
              "HK",
              "TW",
              "ID",
              "TH",
              "VN",
              "PH",
              "MY",
              "ZA",
              "NG",
              "EG",
              "AE",
              "SA",
              "IL",
              "TR",
              "RU",
              "UA",
              "US-CA",
              "US-NY",
              "US-TX",
              "US-FL"
            ],
            "type": "string",
            "description": "Country or region code: US, GB, DE, US-CA, or empty for worldwide. Maps to interestBy / interestBySubregion / interestByCity depending on the resolution.",
            "default": "US"
          },
          "category": {
            "title": "Category",
            "enum": [
              "",
              "0",
              "3",
              "5",
              "7",
              "8",
              "11",
              "12",
              "13",
              "14",
              "16",
              "18",
              "19",
              "20",
              "29",
              "45",
              "47",
              "66",
              "67",
              "71",
              "174",
              "299",
              "533",
              "958"
            ],
            "type": "string",
            "description": "Google Trends category ID. Empty or 0 means all categories.",
            "default": ""
          },
          "property": {
            "title": "Google property",
            "enum": [
              "web",
              "news",
              "images",
              "youtube",
              "froogle"
            ],
            "type": "string",
            "description": "Which Google surface to measure, same as the Web / News / Images / YouTube / Shopping switch on Trends.",
            "default": "web"
          },
          "dataTypes": {
            "title": "Data types",
            "type": "array",
            "description": "Which widgets to fetch. Leave the default for a complete explore pull. Trending Now does not need search terms.",
            "items": {
              "type": "string",
              "enum": [
                "TIMESERIES",
                "GEO",
                "RELATED_QUERIES",
                "RELATED_TOPICS",
                "TRENDING_NOW"
              ],
              "enumTitles": [
                "Interest over time",
                "Interest by region",
                "Related queries (top + rising)",
                "Related topics (top + rising)",
                "Trending now / daily trends"
              ]
            },
            "default": [
              "TIMESERIES",
              "GEO",
              "RELATED_QUERIES"
            ]
          },
          "resolution": {
            "title": "Region resolution",
            "enum": [
              "",
              "COUNTRY",
              "REGION",
              "CITY",
              "DMA"
            ],
            "type": "string",
            "description": "Granularity for interest by region. Auto uses COUNTRY worldwide and REGION inside a country.",
            "default": ""
          },
          "includeLowVolumeGeos": {
            "title": "Include low-volume regions",
            "type": "boolean",
            "description": "Ask Google to include low-search-volume geos in interest-by-region results.",
            "default": false
          },
          "outputMode": {
            "title": "Output mode",
            "enum": [
              "perDataType",
              "combined",
              "flat"
            ],
            "type": "string",
            "description": "perDataType (default): one dataset row per term per widget. combined: one row per term in the familiar nested shape. flat: CSV-friendly one row per time point, region, or related item (billed per row).",
            "default": "perDataType"
          },
          "risingFilter": {
            "title": "Rising queries filter",
            "enum": [
              "strict",
              "balanced",
              "off"
            ],
            "type": "string",
            "description": "Google tags automated sessions USER_TYPE_SCRAPER and mixes unrelated decoy queries (for example 'pet care tips' or 'how to cook pasta') into the rising list of every keyword. strict (default): move known decoys, cross-keyword repeats, and rising queries that share no word with the keyword or its top queries into suspectedDecoys. balanced: move only known decoys and repeats; keep unrelated entries but mark them unverified: true. off: return Google's raw rising list. Nothing is deleted in perDataType or combined mode; flat mode omits decoy rows, so they are not billed.",
            "default": "strict"
          },
          "viewedFrom": {
            "title": "Interface language (hl)",
            "type": "string",
            "description": "Language for Google's formatted labels, for example en-US or de. Also accepted as viewedFrom for drop-in compatibility.",
            "default": "en-US"
          },
          "fetchTrendingNow": {
            "title": "Also fetch Trending Now",
            "type": "boolean",
            "description": "Pull the current Trending Now list for a country. You can run this with no search terms. Uses the public batchexecute RPC, with the RSS feed as fallback.",
            "default": false
          },
          "trendingSearchesCountry": {
            "title": "Trending Now country",
            "type": "string",
            "description": "ISO country code for Trending Now. Defaults to Geo, or US."
          },
          "trendingSearchesTimeframe": {
            "title": "Trending Now window (hours)",
            "enum": [
              "4",
              "24",
              "48",
              "168"
            ],
            "type": "string",
            "description": "4, 24, 48, or 168 (7 days).",
            "default": "24"
          },
          "trendingSearchesMaxItems": {
            "title": "Max trending items",
            "minimum": 0,
            "maximum": 2000,
            "type": "integer",
            "description": "Cap Trending Now rows. 0 means all items Google returned.",
            "default": 50
          },
          "trendingSearchesCategories": {
            "title": "Trending categories",
            "type": "array",
            "description": "Optional numeric category IDs to keep. Filtering is applied client-side; Google's RPC does not filter server-side.",
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Max search jobs",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many search-term groups (URLs included). 0 means no limit.",
            "default": 0
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "How many keyword groups to process at once. Keep at 1 for the highest success rate and lowest 429 risk.",
            "default": 1
          },
          "maxRequestRetries": {
            "title": "Max request retries",
            "minimum": 1,
            "maximum": 12,
            "type": "integer",
            "description": "Retries per HTTP call on 429/5xx, with exponential backoff, jitter, cookie re-warmup, and proxy rotation.",
            "default": 5
          },
          "requestDelayMs": {
            "title": "Delay between requests (ms)",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Minimum pacing between Google Trends calls. 350 ms is a good default.",
            "default": 350
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify Proxy. Default is datacenter (SHADER). The GOOGLE_SERP group only serves www.google.com Search/Shopping and cannot reach trends.google.com — if you select it, the Actor falls back to datacenter, then to direct egress."
          },
          "skipDebugScreen": {
            "title": "Skip debug screenshots",
            "type": "boolean",
            "description": "Accepted for drop-in compatibility. This Actor never opens a browser, so there are no screenshots.",
            "default": true
          },
          "pageLoadTimeoutSecs": {
            "title": "Page load timeout (unused)",
            "minimum": 1,
            "type": "integer",
            "description": "Accepted for drop-in compatibility. This Actor loads no pages.",
            "default": 60
          },
          "mode": {
            "title": "Legacy mode",
            "enum": [
              "",
              "keyword",
              "trending"
            ],
            "type": "string",
            "description": "Accepted for compatibility with keyword/trending mode Actors. trending implies fetchTrendingNow.",
            "default": ""
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}