{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Trends Scraper — Reliable & Fast (No Browser)",
    "description": "Google Trends interest over time, by region and related queries for hundreds of keywords, comparisons of up to 5 terms, and Trending Now with news. JSON endpoints, auto-retries and residential fallback. Pay only for keywords with data.",
    "version": "0.2",
    "x-build-id": "vphhuD2XP0qVQJVYq"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/griffie~google-trends-reliable-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-griffie-google-trends-reliable-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/griffie~google-trends-reliable-scraper/runs": {
      "post": {
        "operationId": "runs-sync-griffie-google-trends-reliable-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/griffie~google-trends-reliable-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-griffie-google-trends-reliable-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": {
          "searchTerms": {
            "title": "Search terms",
            "type": "array",
            "description": "One keyword per line, e.g. <code>coffee</code> or <code>iphone 17</code>. Any language works (日本語, Deutsch, عربي…). Each term gets its own report. Duplicates (case-insensitive) are removed automatically and never charged twice. To compare terms on one scale use <b>Compare terms</b> instead.",
            "items": {
              "type": "string"
            }
          },
          "comparisonGroups": {
            "title": "Compare terms (up to 5 per line)",
            "type": "array",
            "description": "Each line is one comparison of up to 5 comma-separated terms, e.g. <code>coca cola, pepsi</code> — exactly like the Compare box on Google Trends. All terms share one 0–100 scale. Each term in a group counts as one keyword report.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Google Trends URLs",
            "type": "array",
            "description": "Paste explore URLs from your browser, e.g. <code>https://trends.google.com/trends/explore?q=bitcoin&geo=US&date=today%203-m</code>. The q, geo, date, cat and gprop parameters are used; other settings below apply to everything else.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "spreadsheetId": {
            "title": "Google Sheet or CSV URL",
            "type": "string",
            "description": "A Google Sheet ID or URL (shared as <i>Anyone with the link can view</i>, or a <i>Publish to web</i> link), or any public CSV URL. Search terms are read from the first column (or the column set below). A specific tab is used when the URL contains <code>gid=</code>."
          },
          "spreadsheetColumn": {
            "title": "Sheet column",
            "type": "string",
            "description": "Header name (e.g. <code>keyword</code>) or 1-based column number. Empty = first column."
          },
          "spreadsheetHasHeader": {
            "title": "Sheet has a header row",
            "type": "boolean",
            "description": "Skip the first row of the sheet/CSV.",
            "default": true
          },
          "geo": {
            "title": "Location",
            "type": "string",
            "description": "Empty = Worldwide. A 2-letter country code (<code>US</code>, <code>GB</code>, <code>DE</code>), a region (<code>US-CA</code>, <code>GB-ENG</code>) or a US metro area (<code>US-CA-807</code>). Unknown codes are reported as <i>invalid</i> and not charged."
          },
          "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 picks the granularity: minutes for 1–4 hours, hourly for 1–7 days, daily up to ~9 months, weekly up to 5 years, monthly beyond.",
            "default": "today 12-m"
          },
          "customTimeRange": {
            "title": "Custom time range",
            "type": "string",
            "description": "Overrides Time range. <code>YYYY-MM-DD YYYY-MM-DD</code> (e.g. <code>2024-01-01 2024-12-31</code>), from 2004-01-01 on. Hourly windows within the last 7 days: <code>2026-10-20T08 2026-10-21T08</code>."
          },
          "category": {
            "title": "Category",
            "minimum": 0,
            "type": "integer",
            "description": "Google Trends category id; 0 = all categories. Examples: 3 Arts & Entertainment, 5 Computers & Electronics, 7 Finance, 71 Food & Drink, 45 Health, 18 Shopping, 20 Sports, 67 Travel. Unknown ids fail fast with a clear message.",
            "default": 0
          },
          "property": {
            "title": "Search type",
            "enum": [
              "",
              "images",
              "news",
              "froogle",
              "youtube"
            ],
            "type": "string",
            "description": "Which Google search property to measure.",
            "default": ""
          },
          "includeInterestOverTime": {
            "title": "Interest over time",
            "type": "boolean",
            "description": "0–100 values over the time range, with dates in UTC and in your time zone.",
            "default": true
          },
          "includeInterestByRegion": {
            "title": "Interest by region",
            "type": "boolean",
            "description": "Countries (Worldwide), regions/states (country) or metros/cities, 0–100.",
            "default": true
          },
          "regionResolution": {
            "title": "Region level",
            "enum": [
              "",
              "COUNTRY",
              "REGION",
              "DMA",
              "CITY"
            ],
            "type": "string",
            "description": "Google's default is countries for Worldwide and regions for a country.",
            "default": ""
          },
          "includeLowSearchVolumeRegions": {
            "title": "Include low-volume regions",
            "type": "boolean",
            "description": "Also list regions where Google has too little data (value 0, hasData false). Off = same list as the Google Trends website.",
            "default": false
          },
          "comparisonPerKeywordRegions": {
            "title": "Per-term regions in comparisons",
            "type": "boolean",
            "description": "For comparisons, also fetch each term's own region breakdown (one extra request per term).",
            "default": false
          },
          "includeRelatedQueries": {
            "title": "Related queries",
            "type": "boolean",
            "description": "Top and rising related searches (25 each), with Breakout flags.",
            "default": true
          },
          "includeRelatedTopics": {
            "title": "Related topics",
            "type": "boolean",
            "description": "Google currently returns an empty related-topics list to all signed-out visitors — including real browsers on home connections — so this is usually empty (<code>relatedTopicsStatus: notProvidedByGoogle</code>). It fills in automatically if Google turns it back on. Never affects status or price.",
            "default": true
          },
          "trendingNowGeos": {
            "title": "Trending Now countries",
            "type": "array",
            "description": "Country codes (e.g. <code>US</code>, <code>GB</code>, <code>IN</code>) to fetch the live Trending Now list: term, search volume, % increase, start/end time, categories, related searches and up to 3 news articles per trend.",
            "items": {
              "type": "string"
            }
          },
          "trendingNowHours": {
            "title": "Trending window",
            "enum": [
              "4",
              "24",
              "48",
              "168"
            ],
            "type": "string",
            "description": "Time window of the Trending Now list.",
            "default": "24"
          },
          "maxTrendingPerGeo": {
            "title": "Max trends per country",
            "minimum": 0,
            "type": "integer",
            "description": "0 = all (the US list often has 300–600 trends). Charged per trend.",
            "default": 0
          },
          "includeTrendingNews": {
            "title": "Trending news articles",
            "type": "boolean",
            "description": "Add up to 3 news articles (title, URL, source, published time, image) to each trend.",
            "default": true
          },
          "outputFormat": {
            "title": "Output format",
            "enum": [
              "perKeyword",
              "flat"
            ],
            "type": "string",
            "description": "<b>One row per search term</b>: everything for a term in one item (like other Google Trends scrapers) — smallest dataset, best for APIs/JSON. <b>Flat</b>: separate rows for each date, region and related query (<code>recordType</code> column) — best for spreadsheets and BI tools.",
            "default": "perKeyword"
          },
          "competitorCompatibleFields": {
            "title": "Add apify/google-trends-scraper field names",
            "type": "boolean",
            "description": "Also output <code>inputUrlOrTerm</code>, <code>searchTerm</code>, <code>interestOverTime_timelineData</code>, <code>interestBySubregion</code>, <code>relatedQueries_top</code>/<code>_rising</code>, <code>relatedTopics_top</code>/<code>_rising</code> etc. in Google's raw format, so existing integrations keep working. One-row-per-term format only.",
            "default": false
          },
          "maxItems": {
            "title": "Max search terms",
            "minimum": 0,
            "type": "integer",
            "description": "Process at most this many queries (0 = no limit). You can also set \"Max cost per run\" in Run options; the run stops cleanly when it is reached and unprocessed terms are not charged.",
            "default": 0
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Interface language (hl) for formatted dates and Trending Now news, e.g. <code>en-US</code>, <code>de</code>, <code>ja</code>.",
            "default": "en-US"
          },
          "timezoneOffset": {
            "title": "Time zone offset (minutes)",
            "minimum": -840,
            "maximum": 840,
            "type": "integer",
            "description": "Google's convention: minutes <b>west</b> of UTC. 0 = UTC, 480 = US Pacific (PST), 420 = PDT, 300 = US Eastern (EST), -60 = Central Europe (CET), -330 = India. Affects <code>localTime</code> and <code>formattedTime</code>; <code>date</code> is always UTC. Google's data points themselves don't change with the time zone.",
            "default": 0
          },
          "maxConcurrency": {
            "title": "Parallel queries",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Queries processed at the same time. 3–5 is the sweet spot; higher values trigger more Google rate-limiting.",
            "default": 3
          },
          "maxRetries": {
            "title": "Max retries per request",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "Each retry uses a fresh IP and cookies, with backoff.",
            "default": 8
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Default Apify datacenter proxy is enough for most runs. RESIDENTIAL is the most reliable. GOOGLE_SERP cannot reach Google Trends.",
            "default": {
              "useApifyProxy": true
            }
          },
          "fallbackToResidential": {
            "title": "Fall back to residential proxy",
            "type": "boolean",
            "description": "If Google keeps rate-limiting the datacenter IPs, switch to RESIDENTIAL automatically for the rest of the run (only if your plan includes it).",
            "default": true
          },
          "debugLog": {
            "title": "Debug log",
            "type": "boolean",
            "description": "Log every retry.",
            "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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}