{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Trends Scraper & API — Trending Now",
    "description": "Google Trends scraper and API: interest over time, by region and city, and rising related queries for any number of keywords, plus Trending now searches with volume, growth % and news. Compare unlimited terms on one scale. Only-new mode for trend alerts. $1 per 1,000 reports.",
    "version": "1.0",
    "x-build-id": "sbTdMEJut0468nBB1"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/automationnation~google-trends-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-automationnation-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/automationnation~google-trends-scraper/runs": {
      "post": {
        "operationId": "runs-sync-automationnation-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/automationnation~google-trends-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-automationnation-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": "Keywords or topics to analyse, one per line, e.g. \"coffee\". Each term gets one report with interest over time, interest by region and city, and related queries and topics. A Google topic ID such as \"/m/07ykbs\" also works.",
            "items": {
              "type": "string"
            }
          },
          "compareAll": {
            "title": "Compare all search terms on one scale",
            "type": "boolean",
            "description": "Put every search term on the same 0–100 scale, like a Google Trends comparison. More than 5 terms are compared in batches that share an anchor term and are rescaled, so any number of terms can be compared.",
            "default": false
          },
          "isMultiple": {
            "title": "Comma-separated terms in one line are compared",
            "type": "boolean",
            "description": "Treat a line such as \"coffee,tea,matcha\" as one comparison, like typing it into Google Trends. Each term still gets its own row. (Same option as apify/google-trends-scraper.)",
            "default": false
          },
          "geo": {
            "title": "Region",
            "type": "string",
            "description": "Country or region code: US, GB, DE, IN, US-CA (California), GB-ENG (England). Leave empty for worldwide.",
            "default": ""
          },
          "geos": {
            "title": "More regions",
            "type": "array",
            "description": "Optional: run every search term in several regions, e.g. [\"US\", \"GB\", \"CA\"]. Each region gets its own reports.",
            "items": {
              "type": "string"
            }
          },
          "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": "Period to analyse. For a custom period use \"Custom time range\".",
            "default": ""
          },
          "customTimeRange": {
            "title": "Custom time range",
            "type": "string",
            "description": "Start and end date separated by a space, e.g. \"2024-01-01 2024-12-31\". Overrides \"Time range\"."
          },
          "category": {
            "title": "Category",
            "enum": [
              "",
              "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 searches to a Google Trends category (helps with ambiguous words such as \"apple\" or \"jaguar\").",
            "default": ""
          },
          "categoryId": {
            "title": "Category ID (any)",
            "minimum": 0,
            "type": "integer",
            "description": "Any Google Trends category ID, including subcategories (e.g. 916 = Coffee & Tea). Overrides \"Category\". Find IDs in a Google Trends URL (&cat=916)."
          },
          "searchType": {
            "title": "Search type",
            "enum": [
              "",
              "images",
              "news",
              "youtube",
              "froogle"
            ],
            "type": "string",
            "description": "Which Google search to measure interest in.",
            "default": ""
          },
          "startUrls": {
            "title": "Google Trends URLs",
            "type": "array",
            "description": "Paste Google Trends links: an explore URL (https://trends.google.com/trends/explore?q=coffee,tea&geo=US) is analysed with its own terms, region, dates, category and search type; a Trending now URL (https://trends.google.com/trending?geo=GB) returns the trending searches.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "spreadsheetId": {
            "title": "Google Sheet with search terms",
            "type": "string",
            "description": "ID or link of a Google Sheet shared as \"Anyone with the link can view\". Search terms are read from the first column."
          },
          "includeInterestOverTime": {
            "title": "Interest over time",
            "type": "boolean",
            "description": "The 0–100 timeline for each term, plus trend direction, change % and peak.",
            "default": true
          },
          "includeInterestByRegion": {
            "title": "Interest by region",
            "type": "boolean",
            "description": "Where each term is searched most: countries (worldwide) or subregions (for a country).",
            "default": true
          },
          "regionResolution": {
            "title": "Region level",
            "enum": [
              "auto",
              "COUNTRY",
              "REGION",
              "CITY",
              "DMA"
            ],
            "type": "string",
            "description": "Level of the region breakdown.",
            "default": "auto"
          },
          "includeCities": {
            "title": "Interest by city",
            "type": "boolean",
            "description": "Also return the city breakdown with coordinates when a region is set.",
            "default": true
          },
          "includeLowVolumeRegions": {
            "title": "Include low-search-volume regions",
            "type": "boolean",
            "description": "Also list regions with little search volume (Google hides them by default).",
            "default": false
          },
          "includeRelatedQueries": {
            "title": "Related queries",
            "type": "boolean",
            "description": "Top and rising related searches, with growth % and \"Breakout\" flags.",
            "default": true
          },
          "includeRelatedTopics": {
            "title": "Related topics",
            "type": "boolean",
            "description": "Top and rising related topics (entities such as brands or places). Google currently withholds related topics from automated sessions, so this is usually empty — related queries are always complete. Single-term searches only.",
            "default": false
          },
          "trendingGeos": {
            "title": "Countries for Trending now",
            "type": "array",
            "description": "Get what's trending right now, like trends.google.com/trending: e.g. [\"US\", \"GB\", \"IN\"]. Each trending search comes with search volume, growth %, start time, related queries and news articles.",
            "items": {
              "type": "string"
            }
          },
          "trendingHours": {
            "title": "Trending in the past (hours)",
            "minimum": 4,
            "maximum": 168,
            "type": "integer",
            "description": "4, 24, 48 or 168 (7 days).",
            "default": 24
          },
          "trendingCategory": {
            "title": "Trending category",
            "enum": [
              "",
              "1",
              "2",
              "3",
              "20",
              "4",
              "5",
              "6",
              "7",
              "8",
              "9",
              "10",
              "11",
              "13",
              "14",
              "15",
              "16",
              "17",
              "18",
              "19"
            ],
            "type": "string",
            "description": "Only trending searches in this category.",
            "default": ""
          },
          "trendingSort": {
            "title": "Sort trending searches by",
            "enum": [
              "relevance",
              "volume",
              "recency",
              "growth"
            ],
            "type": "string",
            "description": "Order of the trending searches.",
            "default": "relevance"
          },
          "trendingMaxItems": {
            "title": "Max trending searches per country",
            "minimum": 0,
            "type": "integer",
            "description": "0 = all (Google lists up to a few hundred per country and time window).",
            "default": 50
          },
          "includeNews": {
            "title": "News articles",
            "type": "boolean",
            "description": "Add the news articles Google shows for each trending search.",
            "default": true
          },
          "newsPerTrend": {
            "title": "News articles per trending search",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Up to 10.",
            "default": 3
          },
          "onlyActiveTrends": {
            "title": "Only active trends",
            "type": "boolean",
            "description": "Skip trending searches that Google marks as ended.",
            "default": false
          },
          "onlyNewTrends": {
            "title": "Only new trends (for scheduled runs)",
            "type": "boolean",
            "description": "Return only trending searches that earlier runs with the same country, time window and category didn't return. Schedule the Actor (e.g. hourly) to get alerts for new trends; repeats aren't charged.",
            "default": false
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Language for Google Trends labels, related topics and dates, e.g. en-US, en-GB, de, fr, es, ja.",
            "default": "en-US"
          },
          "timezoneOffset": {
            "title": "Timezone offset (minutes)",
            "type": "integer",
            "description": "How Google buckets hours and days, in minutes behind UTC: 0 = UTC, 300 = New York (EST), -60 = Berlin (CET).",
            "default": 0
          },
          "maxItems": {
            "title": "Max rows",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many dataset rows (0 = no limit).",
            "default": 0
          },
          "maxConcurrency": {
            "title": "Parallel searches",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many searches run at the same time.",
            "default": 10
          },
          "maxRequestRetries": {
            "title": "Retries per search",
            "minimum": 1,
            "maximum": 11,
            "type": "integer",
            "description": "Each retry uses a new IP address.",
            "default": 7
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Apify Proxy is used by default, with automatic fallback to residential IPs if Google rate-limits. You normally don't need to change this.",
            "default": {
              "useApifyProxy": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}