{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Trends Scraper - Keywords, Regions & Trending",
    "description": "Google Trends scraper: interest over time and by region, related queries and topics, plus today's trending searches for any country. Geo, time, category and property filters. No API key, no proxies to manage.",
    "version": "0.1",
    "x-build-id": "XyAZ4qpePlilJQ373"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/zenomastro~google-trends-reliable/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-zenomastro-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/zenomastro~google-trends-reliable/runs": {
      "post": {
        "operationId": "runs-sync-zenomastro-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/zenomastro~google-trends-reliable/run-sync": {
      "post": {
        "operationId": "run-sync-zenomastro-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",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "explore",
              "trending"
            ],
            "type": "string",
            "description": "Analyze keywords or fetch current trending searches.",
            "default": "explore"
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "One to five terms to compare in Google Trends Explore. For more terms or several comparisons, use the bulk section below.",
            "default": [
              "bitcoin",
              "ethereum"
            ],
            "items": {
              "type": "string"
            }
          },
          "geo": {
            "title": "Geography",
            "type": "string",
            "description": "Country or region code such as US, IT, GB or US-CA. Leave blank for worldwide Explore data. For several locations at once, use the field below.",
            "default": "US"
          },
          "geos": {
            "title": "Several locations (optional)",
            "maxItems": 50,
            "type": "array",
            "description": "Run the same analysis for several locations in one run, one code per line, e.g. US, GB, DE, IT or US-CA (WORLDWIDE for a worldwide search in keyword analysis). Each keyword group, or the trending list, is fetched and charged once per location; values are not rescaled across locations. When set, Geography is ignored. Up to 50.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "timeRange": {
            "title": "Time range",
            "type": "string",
            "description": "Examples: now 1-H, now 7-d, today 1-m, today 3-m, today 12-m, today 5-y, all, or a custom range like 2024-01-01 2024-12-31.",
            "default": "today 3-m"
          },
          "category": {
            "title": "Category",
            "minimum": 0,
            "type": "integer",
            "description": "Google Trends category ID, e.g. 71 for Food & Drink or 7 for Finance (the cat= value in a Google Trends URL). Use 0 for all categories.",
            "default": 0
          },
          "property": {
            "title": "Google property",
            "enum": [
              "",
              "images",
              "news",
              "youtube",
              "froogle"
            ],
            "type": "string",
            "description": "Search surface to analyze: web, image, news, YouTube or Google Shopping searches.",
            "default": ""
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Google Trends interface locale, for example en-US or it-IT.",
            "default": "en-US"
          },
          "timezoneMinutes": {
            "title": "Timezone offset (minutes)",
            "type": "integer",
            "description": "Minutes behind UTC, as Google Trends expects them (its tz parameter): 0 for UTC, 300 for UTC-5 (New York in winter), -60 for UTC+1 (Rome in winter). Affects the dates of hourly and daily points.",
            "default": 0
          },
          "includeInterestOverTime": {
            "title": "Interest over time",
            "type": "boolean",
            "description": "Return the interest-over-time series: one dataset row per date with the 0–100 popularity of every keyword.",
            "default": true
          },
          "includeInterestByRegion": {
            "title": "Interest by region",
            "type": "boolean",
            "description": "Return regional interest: one row per region with the 0–100 popularity of every keyword. Set the level of detail in Region detail below.",
            "default": true
          },
          "includeRelatedQueries": {
            "title": "Related queries",
            "type": "boolean",
            "description": "Return top and rising related searches for every keyword.",
            "default": true
          },
          "includeRelatedTopics": {
            "title": "Related topics",
            "type": "boolean",
            "description": "Return top and rising related topics (with their Knowledge Graph ID in topicMid) for every keyword.",
            "default": true
          },
          "includeKeywordSummary": {
            "title": "Keyword summary (free)",
            "type": "boolean",
            "description": "Add one free keyword_summary row per keyword with Google's average, the peak value and date, the latest complete value, the change versus the start of the period and a rising/stable/falling direction. Needs Interest over time. Not charged.",
            "default": false
          },
          "maxRelated": {
            "title": "Maximum related items",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum top/rising related items returned per widget.",
            "default": 25
          },
          "searchTerms": {
            "title": "Search terms (bulk)",
            "type": "array",
            "description": "Any number of terms. Without an anchor keyword each term is analyzed on its own. With an anchor keyword the terms are compared in batches of 4 plus the anchor, so all of them share one scale. When search terms, keyword groups or Trends URLs are set, the Keywords field is ignored.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "keywordGroups": {
            "title": "Keyword groups",
            "type": "array",
            "description": "Several comparisons in one run. Each line is one comparison of up to 5 comma-separated terms, for example: iphone, samsung galaxy, google pixel. With an anchor keyword, up to 4 terms per line.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "anchorKeyword": {
            "title": "Anchor keyword",
            "type": "string",
            "description": "Optional stable, popular term (for example: weather) added to every search-term batch and keyword group. Rows then also carry scaledValue = value x (anchor in the first group / anchor in this group), so terms from different groups can be compared directly, e.g. to compare more than 5 keywords."
          },
          "trendsUrls": {
            "title": "Google Trends URLs",
            "type": "array",
            "description": "Paste trends.google.com/trends/explore links. Each URL becomes one comparison with its own terms (q), location (geo), period (date), category (cat) and property (gprop). A URL without date uses Google's default of the past 12 months.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "spreadsheetId": {
            "title": "Google Sheet with search terms",
            "type": "string",
            "description": "Optional public Google Sheet (shared as 'Anyone with the link can view'): paste its URL or ID. The first column, below the header row, is added to Search terms, e.g. one product name per row. A #gid=... in the URL picks the tab."
          },
          "maxGroups": {
            "title": "Maximum keyword groups",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum searches per run from search terms, keyword groups, URLs and the Google Sheet; with several locations, every keyword group counts once per location. Each search takes 5 to 18 Google requests, depending on the number of compared terms. Extra groups are skipped and listed in a free notice row.",
            "default": 20
          },
          "regionResolution": {
            "title": "Region resolution",
            "enum": [
              "AUTO",
              "COUNTRY",
              "REGION",
              "DMA",
              "CITY"
            ],
            "type": "string",
            "description": "Level of detail for Interest by region. Countries need a worldwide search (blank geo), regions need a country geo such as US, metro areas (DMA) need a US geo. City maps only return cities that have data.",
            "default": "AUTO"
          },
          "includeLowVolumeRegions": {
            "title": "Include low search volume regions",
            "type": "boolean",
            "description": "Also return values for regions with low search volume (Google's 'Include low search volume regions' option).",
            "default": false
          },
          "skipEmptyRegions": {
            "title": "Skip regions without data",
            "type": "boolean",
            "description": "Do not return Interest by region rows where Google has no data for any keyword. Worldwide maps list about 250 countries, many of them empty for niche terms, so this makes the dataset much smaller. City maps always skip empty rows.",
            "default": false
          },
          "trendingSource": {
            "title": "Trending source",
            "enum": [
              "rss",
              "trendingNow"
            ],
            "type": "string",
            "description": "RSS feed: Google's top trends (usually 10-20) with news articles. Trending Now page: the full list from trends.google.com/trending with search volume, increase %, start/end time, active status, categories and related searches (best effort; falls back to the RSS feed if Google changes the page).",
            "default": "rss"
          },
          "trendingHours": {
            "title": "Trending time window",
            "enum": [
              "4",
              "24",
              "48",
              "168"
            ],
            "type": "string",
            "description": "Trending Now time window. Anything other than 24 hours uses the Trending Now page source.",
            "default": "24"
          },
          "trendingCategories": {
            "title": "Trending categories",
            "uniqueItems": true,
            "type": "array",
            "description": "Only return trends in these categories. Empty means all categories. Uses the Trending Now page source.",
            "items": {
              "type": "string",
              "enum": [
                "autos_vehicles",
                "beauty_fashion",
                "business_finance",
                "climate",
                "entertainment",
                "food_drink",
                "games",
                "health",
                "hobbies_leisure",
                "jobs_education",
                "law_government",
                "other",
                "pets_animals",
                "politics",
                "science",
                "shopping",
                "sports",
                "technology",
                "travel_transportation"
              ],
              "enumTitles": [
                "Autos and Vehicles",
                "Beauty and Fashion",
                "Business and Finance",
                "Climate",
                "Entertainment",
                "Food and Drink",
                "Games",
                "Health",
                "Hobbies and Leisure",
                "Jobs and Education",
                "Law and Government",
                "Other",
                "Pets and Animals",
                "Politics",
                "Science",
                "Shopping",
                "Sports",
                "Technology",
                "Travel and Transportation"
              ]
            },
            "default": []
          },
          "trendingActiveOnly": {
            "title": "Active trends only",
            "type": "boolean",
            "description": "Only return trends that are still active. Uses the Trending Now page source.",
            "default": false
          },
          "trendingLimit": {
            "title": "Trending result limit",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum trending rows per location. The RSS feed usually lists 10-20 trends; the Trending Now page source can return up to 1000.",
            "default": 50
          },
          "requestTimeoutSecs": {
            "title": "Request timeout",
            "minimum": 5,
            "maximum": 45,
            "type": "integer",
            "description": "Maximum seconds per Google request before retrying. Runs also stop starting new searches shortly before the run timeout, so everything already found is saved.",
            "default": 20
          },
          "retries": {
            "title": "Retries",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Maximum attempts for temporary Google errors. Keyword groups Google still refuses are tried once more at the end of the run.",
            "default": 3
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional proxy rotation for rate-limited requests. Direct access is used by default.",
            "default": {
              "useApifyProxy": 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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}