{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Trends Scraper ($0.96/1K): Interest & Trending Now",
    "description": "Scrape Google Trends: interest over time, interest by region and city, related queries and topics, comparisons, more than 5 terms on one scale, daily data over years, Trending now per country with news, keyword alerts. Fast, cheap, retries politely. Unofficial.",
    "version": "0.0",
    "x-build-id": "wMBngFKSFbheRrq3I"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/tsutseisoftware~google-trends-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-tsutseisoftware-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/tsutseisoftware~google-trends-scraper/runs": {
      "post": {
        "operationId": "runs-sync-tsutseisoftware-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/tsutseisoftware~google-trends-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-tsutseisoftware-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": {
          "searchTerms": {
            "title": "Search terms",
            "type": "array",
            "description": "One search term or topic per line (a topic is its Google ID, e.g. /m/02vqfm for the topic \"Coffee\"). Terms separated by commas in one line (\"coffee, tea, matcha\") are compared on one scale with the comparison mode \"Each line is one comparison\". Each term in each location is one report (one result).",
            "items": {
              "type": "string"
            }
          },
          "compareMode": {
            "title": "Comparison",
            "enum": [
              "none",
              "line",
              "all",
              "geos"
            ],
            "type": "string",
            "description": "How the terms are put on Google's 0-100 scale. Google compares at most 5 terms in one chart; \"All terms on one common scale\" goes beyond that by chaining an anchor term across batches (see the README for the method and its error; extra charge \"Calibrated term\").",
            "default": "none"
          },
          "anchorTerm": {
            "title": "Anchor term (common scale)",
            "type": "string",
            "description": "Optional, for \"All terms on one common scale\": the term that links the batches. Empty = picked automatically (the least popular term of the first batch whose peak is at least 20)."
          },
          "termsListUrl": {
            "title": "Terms from a Google Sheet or CSV URL",
            "type": "string",
            "description": "Optional: a Google Sheet shared with \"Anyone with the link\", or a direct link to a CSV or text file. The first column holds the terms (a header row such as \"keyword\" is skipped); a row with several cells is one comparison line. Added to \"Search terms\"."
          },
          "startUrls": {
            "title": "Google Trends URLs",
            "type": "array",
            "description": "Optional: explore URLs (https://trends.google.com/trends/explore?q=bitcoin,ethereum&geo=US&date=today%205-y) are read with their terms, location, time range, category and search type; \"Trending now\" URLs (https://trends.google.com/trending?geo=US&hours=24) give the trending list of that country.",
            "items": {
              "type": "string"
            }
          },
          "trendingCountries": {
            "title": "Trending now: countries",
            "type": "array",
            "description": "Optional: read the \"Trending now\" list of these countries (country codes such as US, GB, DE, CZ). Every trending search is one result: search volume, growth, start time, related searches, categories and news articles.",
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Max results",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum number of results saved in the run (term reports and trending searches). You pay per result. 0 = no limit.",
            "default": 100
          },
          "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",
              "custom"
            ],
            "type": "string",
            "description": "The period of the charts. Google decides the step of the points by the length: per minute up to 4 hours, hourly up to 7 days, daily up to 270 days, weekly up to 5 years, monthly beyond.",
            "default": "today 12-m"
          },
          "customTimeRange": {
            "title": "Custom time range",
            "type": "string",
            "description": "With \"Custom\": two dates \"2024-01-01 2024-12-31\" (from 2004-01-01) or two hours \"2026-11-01T00 2026-11-07T23\" (at most 7 days, hourly or finer)."
          },
          "geo": {
            "title": "Location",
            "type": "array",
            "description": "Country (US, DE, CZ), subregion (US-CA, GB-ENG, DE-BY) or US metro (US-NY-501) codes. Empty = worldwide. Several locations: each term is read for each of them (or compared across them with the comparison \"Each term compared across the locations\").",
            "items": {
              "type": "string"
            }
          },
          "category": {
            "title": "Category",
            "enum": [
              "0",
              "3",
              "47",
              "44",
              "22",
              "12",
              "5",
              "7",
              "71",
              "8",
              "45",
              "65",
              "11",
              "13",
              "958",
              "19",
              "16",
              "299",
              "14",
              "66",
              "29",
              "533",
              "174",
              "18",
              "20",
              "67"
            ],
            "type": "string",
            "description": "Limit the searches to a Google Trends category (e.g. \"Shopping\" for product searches).",
            "default": "0"
          },
          "categoryId": {
            "title": "Category number (subcategory)",
            "minimum": 0,
            "type": "integer",
            "description": "Optional: any category number of Google Trends (the \"cat\" in an explore URL, e.g. 1227 for \"Sports Coaching & Training\"); overrides \"Category\". 0 = use \"Category\"."
          },
          "searchType": {
            "title": "Search type",
            "enum": [
              "web",
              "images",
              "news",
              "youtube",
              "shopping"
            ],
            "type": "string",
            "description": "Which Google search the interest comes from.",
            "default": "web"
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Language of names in the results (regions, topics), e.g. en-US, de, cs, pt-BR.",
            "default": "en-US"
          },
          "timezoneOffsetMinutes": {
            "title": "Time zone offset",
            "minimum": -720,
            "maximum": 840,
            "type": "integer",
            "description": "Offset of your time zone from UTC in minutes (UTC+1 = 60, UTC-5 = -300). Days and hours of the charts start in this time zone; dates in the results carry the offset. 0 = UTC.",
            "default": 0
          },
          "dataTypes": {
            "title": "Data to read",
            "type": "array",
            "description": "What each report contains. Each kind of data is one request per term, so fewer kinds make the run faster; the price per report is the same. Related topics: Google currently returns none to automated requests (the field stays empty, see the README), and for comparisons it has none at all.",
            "items": {
              "type": "string",
              "enum": [
                "interestOverTime",
                "interestByRegion",
                "relatedQueries",
                "relatedTopics"
              ],
              "enumTitles": [
                "Interest over time",
                "Interest by region",
                "Related queries (top and rising)",
                "Related topics (top and rising)"
              ]
            },
            "default": [
              "interestOverTime",
              "interestByRegion",
              "relatedQueries"
            ]
          },
          "regionResolution": {
            "title": "Region resolution",
            "enum": [
              "auto",
              "COUNTRY",
              "REGION",
              "DMA",
              "CITY"
            ],
            "type": "string",
            "description": "Level of \"Interest by region\".",
            "default": "auto"
          },
          "includeLowSearchVolume": {
            "title": "Include low search volume regions",
            "type": "boolean",
            "description": "Also list regions with too little data (value 0, hasData false), like the checkbox on the website.",
            "default": false
          },
          "dailyData": {
            "title": "Daily data over long periods",
            "type": "boolean",
            "description": "For ranges longer than 270 days (12 months, 5 years, custom dates): read the range in 270-day windows of daily data and put them on one scale (anchored to Google's weekly series of the whole range; see the README). Extra charge \"Daily data window\" for every window; 2 requests per window.",
            "default": false
          },
          "outputFormat": {
            "title": "Output format",
            "enum": [
              "nested",
              "flat",
              "both"
            ],
            "type": "string",
            "description": "\"Flat\" is for Excel and CSV: the dataset gets one summary row per term (no lists) and the key-value store gets interest-over-time.csv, interest-by-region.csv, related-queries.csv and related-topics.csv with one row per data point (links in the Output tab). No extra charge.",
            "default": "nested"
          },
          "trendingHours": {
            "title": "Trending now: time window",
            "enum": [
              "4",
              "24",
              "48",
              "168"
            ],
            "type": "string",
            "description": "How far back the trending searches go.",
            "default": "24"
          },
          "trendingCategory": {
            "title": "Trending now: category",
            "enum": [
              "0",
              "1",
              "2",
              "3",
              "20",
              "4",
              "5",
              "6",
              "7",
              "8",
              "9",
              "10",
              "11",
              "13",
              "14",
              "15",
              "16",
              "17",
              "18",
              "19"
            ],
            "type": "string",
            "description": "Only trends of this category.",
            "default": "0"
          },
          "trendingActiveOnly": {
            "title": "Trending now: only active trends",
            "type": "boolean",
            "description": "Skip trends that have already ended.",
            "default": false
          },
          "trendingSortBy": {
            "title": "Trending now: sort by",
            "enum": [
              "relevance",
              "searchVolume",
              "increase",
              "recency"
            ],
            "type": "string",
            "description": "Order of the trends (and which ones stay with a limit per country).",
            "default": "relevance"
          },
          "maxTrendsPerCountry": {
            "title": "Trending now: max per country",
            "minimum": 0,
            "type": "integer",
            "description": "Keep at most this many trends of each country. 0 = all of them (often 100-450).",
            "default": 0
          },
          "includeTrendingNews": {
            "title": "Trending now: news articles",
            "type": "boolean",
            "description": "Add the news articles Google shows for the trends (from Google's trending feed, which covers the newest trends of the country; one more request per country, no extra charge).",
            "default": true
          },
          "onlyNewTrends": {
            "title": "Monitoring: only new trends",
            "type": "boolean",
            "description": "Trending now: save only trends not reported by an earlier run with the same Monitoring key (a trend not seen for 3 days counts as new again). Every country list read costs the small \"Monitoring check\" fee (see Pricing).",
            "default": false
          },
          "watchKeywords": {
            "title": "Monitoring: keyword watch (only alerts)",
            "type": "boolean",
            "description": "Search terms: save a term only when it has an alert: its interest jumped (see \"alert on a change of\") or it has a rising related query that earlier runs did not see. The first run saves every term as the baseline. A term checked without an alert is not saved and costs the small \"Monitoring check\" fee.",
            "default": false
          },
          "alertChangePercent": {
            "title": "Watch: alert on a change of",
            "minimum": 0,
            "type": "integer",
            "description": "Alert when the average of the last N points differs from the N points before by at least this many percent (up or down). 0 = no alert on changes.",
            "default": 50
          },
          "alertWindowPoints": {
            "title": "Watch: compare the last N points",
            "minimum": 0,
            "type": "integer",
            "description": "N of the comparison. 0 = automatic: 7 days, 24 hours, 4 weeks or 3 months by the time range.",
            "default": 0
          },
          "alertOnRisingQueries": {
            "title": "Watch: alert on new rising queries",
            "enum": [
              "any",
              "breakout",
              "off"
            ],
            "type": "string",
            "description": "Alert when a related query appears among the rising ones that earlier runs did not see.",
            "default": "any"
          },
          "monitoringKey": {
            "title": "Monitoring: key",
            "type": "string",
            "description": "Name of the saved state. Use a different key for each watched list. Empty = \"default\". The value is stored encrypted."
          },
          "slackWebhookUrl": {
            "title": "Notifications: Slack webhook URL",
            "type": "string",
            "description": "Incoming webhook of your Slack channel (https://hooks.slack.com/services/...). Stored encrypted."
          },
          "discordWebhookUrl": {
            "title": "Notifications: Discord webhook URL",
            "type": "string",
            "description": "Webhook of your Discord channel (https://discord.com/api/webhooks/...). In Discord: channel settings → Integrations → Webhooks → Copy Webhook URL. Stored encrypted."
          },
          "telegramBotToken": {
            "title": "Notifications: Telegram bot token",
            "type": "string",
            "description": "Token of your Telegram bot (from @BotFather). Used with \"Telegram chat ID\". Stored encrypted."
          },
          "telegramChatId": {
            "title": "Notifications: Telegram chat ID",
            "type": "string",
            "description": "Chat, group or channel ID the bot writes to (e.g. -1001234567890)."
          },
          "webhookUrl": {
            "title": "Notifications: webhook URL",
            "type": "string",
            "description": "Any HTTPS URL (Zapier, Make, n8n, your server): gets a POST with JSON {title, summary, totalSaved, runUrl, datasetUrl, items}."
          },
          "whatsappAccessToken": {
            "title": "Notifications: WhatsApp access token",
            "type": "string",
            "description": "Access token of the WhatsApp Cloud API of your Meta business account, used with \"WhatsApp phone number ID\" and \"WhatsApp recipient number\" (step by step in the README, section \"WhatsApp notifications: setup\"). For scheduled runs use a permanent token of a system user: Business settings → System users → Generate token, with the permissions whatsapp_business_messaging and whatsapp_business_management; the token of WhatsApp → API Setup expires within hours. Stored encrypted."
          },
          "whatsappPhoneNumberId": {
            "title": "Notifications: WhatsApp phone number ID",
            "type": "string",
            "description": "ID of your WhatsApp business number that sends the message (not the number itself), e.g. 106540352242922. In your Meta app: WhatsApp → API Setup → Phone number ID."
          },
          "whatsappTo": {
            "title": "Notifications: WhatsApp recipient number",
            "type": "string",
            "description": "Phone number that gets the message, in international format with the country code (e.g. +420601234567); up to 5 numbers separated by commas or new lines, each gets its own message and the notification is charged once per run. A test number of Meta sends only to numbers you added and confirmed under API Setup → To. Stored encrypted."
          },
          "whatsappTemplateName": {
            "title": "Notifications: WhatsApp template name",
            "type": "string",
            "description": "Name of your approved message template (WhatsApp Manager → Message templates, e.g. apify_results), recommended: WhatsApp delivers a template message at any time. Its body gets the run summary with the first results in {{1}} and the dataset link in {{2}} (a template with only {{1}} gets both in {{1}}). Empty: a plain text message, which WhatsApp delivers only when the recipient wrote to your business number in the last 24 hours, so a scheduled run usually needs a template. Meta charges your business account for template messages (step by step in the README, section \"WhatsApp notifications: setup\")."
          },
          "whatsappTemplateLanguage": {
            "title": "Notifications: WhatsApp template language",
            "type": "string",
            "description": "Language code of the template exactly as WhatsApp Manager → Message templates shows it next to the template, e.g. en_US, en_GB, cs, sk, pl or de. Used only with \"WhatsApp template name\".",
            "default": "en_US"
          },
          "notificationLimit": {
            "title": "Notifications: max results per message",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "How many results are listed in one notification (the rest as \"…and N more\").",
            "default": 10
          },
          "notifyOnlyChanges": {
            "title": "Notifications: only when something was saved",
            "type": "boolean",
            "description": "Send nothing when the run saved nothing (e.g. a monitoring run without new trends or alerts).",
            "default": true
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "No proxy by default: Google Trends answers datacenter IPs at a polite pace. With Apify Proxy each batch of 20 reports uses its own IP (never a new IP to repeat a refused request).",
            "default": {
              "useApifyProxy": false
            }
          },
          "sendErrorReports": {
            "title": "Send error reports",
            "type": "boolean",
            "description": "When a run fails, send the developer a short error report: the error and your input with secrets left out (tokens, webhooks and e-mails are hidden). Your results are never sent. Reports are deleted after at most 120 hours. Turn off to send nothing.",
            "default": true
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}