{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Trends Scraper",
    "description": "Get Google Trends data for any keyword: interest over time, interest by region, related queries and trend stats, plus the Trending Now searches. Export to JSON, CSV or Excel.",
    "version": "0.0",
    "x-build-id": "vWOc5so4usPrigrBN"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nice_dev~google-trends-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nice_dev-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/nice_dev~google-trends-scraper/runs": {
      "post": {
        "operationId": "runs-sync-nice_dev-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/nice_dev~google-trends-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-nice_dev-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": {
          "startUrls": {
            "title": "Google Trends URLs",
            "maxItems": 1000,
            "type": "array",
            "description": "Paste Google Trends pages: an Explore URL (`https://trends.google.com/trends/explore?q=python&geo=US&date=today%2012-m`, its keywords, country, time range, category and search type are used as they are; several keywords give one comparison) or a Trending Now URL (`https://trends.google.com/trending?geo=US&hours=24`, its category and active-only setting kept too).",
            "default": [],
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "query": {
            "title": "Keyword",
            "maxLength": 200,
            "type": "string",
            "description": "A search term (`python`) or a Google topic id (`/m/05z1_`). One report per keyword: interest over time, interest by region and related queries."
          },
          "searchQueries": {
            "title": "More keywords",
            "maxItems": 500,
            "uniqueItems": true,
            "type": "array",
            "description": "Several keywords in one run: one report per keyword (times each country below). Added to **Keyword**.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "location": {
            "title": "Country or region",
            "pattern": "^$|^[A-Za-z]{2}(-[A-Za-z0-9]{1,3}){0,2}$",
            "maxLength": 10,
            "type": "string",
            "description": "Google Trends location code: `US`, `GB`, `FR`, a state `US-CA`, a US metro `US-CA-807`. Empty = worldwide.",
            "default": ""
          },
          "locations": {
            "title": "More countries or regions",
            "maxItems": 100,
            "uniqueItems": true,
            "type": "array",
            "description": "Several locations in one run: each keyword is analysed in each location. Added to **Country or region**.",
            "default": [],
            "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",
              "custom"
            ],
            "type": "string",
            "description": "Period of the interest-over-time curve. Google picks the step: minute for 1-4 hours, 8 minutes for 1 day, hour for 7 days, day up to 9 months, week up to 5 years, month for 2004 – present.",
            "default": "today 12-m"
          },
          "customTimeRange": {
            "title": "Custom time range",
            "pattern": "^$|^\\d{4}-\\d{2}-\\d{2}(T\\d{2})? \\d{4}-\\d{2}-\\d{2}(T\\d{2})?$",
            "maxLength": 27,
            "type": "string",
            "description": "Used when **Time range** is Custom: `2024-01-01 2024-06-30` (days) or `2025-03-01T10 2025-03-03T10` (hours, UTC, under 8 days)."
          },
          "category": {
            "title": "Category",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Google Trends category id (0 = all categories; e.g. 71 = Food & Drink, 7 = Finance, 5 = Computers & Electronics). The id is the `cat` value in the address of an Explore page; the result names it in `categoryName`. With a category and no keyword, you get the category's own curve and related queries.",
            "default": 0
          },
          "property": {
            "title": "Search type",
            "enum": [
              "",
              "images",
              "news",
              "froogle",
              "youtube"
            ],
            "type": "string",
            "description": "Which Google search the data comes from.",
            "default": ""
          },
          "resolveTopics": {
            "title": "Analyse the Google topic of each keyword",
            "type": "boolean",
            "description": "Look up each keyword's Google topic (e.g. `tesla` → Tesla, Automotive company) and analyse the topic instead of the exact search term: it counts all the ways people search for it, in every language. The topic found is in topicId / topicTitle / topicType. A keyword with no topic is analysed as a search term. Not applied to a comparison: its keywords are compared as typed.",
            "default": false
          },
          "timezoneOffsetMinutes": {
            "title": "Time zone offset",
            "minimum": -840,
            "maximum": 720,
            "type": "integer",
            "description": "Minutes WEST of UTC, as Google expects it: 0 = UTC, 300 = New York (UTC-5), -60 = Paris (UTC+1). Only the `formattedTime` text of each point follows it (`5:00 AM` instead of `10:00 AM`): the points, their days and every date in the results stay in UTC.",
            "default": 0
          },
          "language": {
            "title": "Language",
            "maxLength": 10,
            "type": "string",
            "description": "Language of the region names and of the Trending Now searches (`en-US`, `fr`, `de`, `es`…).",
            "default": "en-US"
          },
          "compareKeywords": {
            "title": "Compare the keywords on one scale",
            "type": "boolean",
            "description": "Instead of one report per keyword (each on its own 0-100 scale), compare all the keywords of a location on ONE common scale: averages, winner and region leaders. Up to 5 keywords are compared by Google directly; beyond 5 (50 at most), the first keyword is used as an anchor in every group of 5 and the values are rescaled to it: put a popular one first. One row per location: each keyword in it counts as one result in Max results and is charged as one compared keyword. A single keyword gets its normal report.",
            "default": false
          },
          "includeInterestOverTime": {
            "title": "Interest over time",
            "type": "boolean",
            "description": "The 0-100 curve, point by point, with average, peak, latest value and trend direction. A comparison always holds its curve: it is what the comparison is.",
            "default": true
          },
          "includeInterestByRegion": {
            "title": "Interest by region",
            "type": "boolean",
            "description": "0-100 interest per country, state, metro or city (see **Region level**).",
            "default": true
          },
          "regionResolution": {
            "title": "Region level",
            "enum": [
              "auto",
              "COUNTRY",
              "REGION",
              "DMA",
              "CITY"
            ],
            "type": "string",
            "description": "Level of **Interest by region**. Auto = the level Google gives the place: countries for worldwide, regions inside a country, metro areas inside a US state. A level you pick is sent as it is: Google refuses the ones a place has none of (countries inside a country, regions inside a state). Cities: Google gives values for the largest markets only (others have no value).",
            "default": "auto"
          },
          "includeLowVolumeRegions": {
            "title": "Keep regions without data",
            "type": "boolean",
            "description": "Keep the regions where Google has too little data, with value `null` (never 0).",
            "default": false
          },
          "includeRelatedQueries": {
            "title": "Related queries",
            "type": "boolean",
            "description": "Top 25 and rising 25 related queries, with their score or growth (`Breakout` = more than +5000%).",
            "default": true
          },
          "trendingGeos": {
            "title": "Trending Now countries",
            "maxItems": 150,
            "uniqueItems": true,
            "type": "array",
            "description": "Country codes (`US`, `GB`, `FR`, `JP`…): each gives its Trending Now list. Empty = no Trending Now.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "trendingHours": {
            "title": "Trending Now period",
            "enum": [
              "4",
              "24",
              "48",
              "168"
            ],
            "type": "string",
            "description": "Trends started in the last 4, 24, 48 hours or 7 days (≈ 80 / 330 / 780 / 2,000 searches for the US).",
            "default": "24"
          },
          "trendingCategories": {
            "title": "Trending Now categories",
            "type": "array",
            "description": "Keep only these categories. Empty = all.",
            "items": {
              "type": "string",
              "enum": [
                "1",
                "2",
                "3",
                "4",
                "5",
                "6",
                "7",
                "8",
                "9",
                "10",
                "11",
                "13",
                "14",
                "15",
                "16",
                "17",
                "18",
                "19",
                "20"
              ],
              "enumTitles": [
                "Autos and Vehicles",
                "Beauty and Fashion",
                "Business and Finance",
                "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",
                "Climate"
              ]
            },
            "default": []
          },
          "trendingActiveOnly": {
            "title": "Active trends only",
            "type": "boolean",
            "description": "Keep only the searches that are still trending (no end time yet).",
            "default": false
          },
          "minSearchVolume": {
            "title": "Minimum search volume",
            "minimum": 0,
            "maximum": 100000000,
            "type": "integer",
            "description": "Keep only the trending searches with at least this many searches (Google's estimate: 200, 1000, 10000…). 0 = all.",
            "default": 0
          },
          "includeTrendingNews": {
            "title": "News articles of each trend (paid option)",
            "type": "boolean",
            "description": "Add the news articles Google shows for each trending search (title, link, source, date, image). Charged per trending search with articles (see Pricing).",
            "default": false
          },
          "maxItems": {
            "title": "Max results",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Maximum number of results for the whole run (keyword reports, compared keywords and trending searches). 0 = no limit.",
            "default": 100
          },
          "maxItemsPerQuery": {
            "title": "Max results per source",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Cap for EACH source (a keyword × location, a comparison, a Trending Now country), so that the first one cannot use up **Max results**. Each keyword of a comparison counts as one result. 0 = no cap.",
            "default": 0
          },
          "postedAfter": {
            "title": "Started after",
            "type": "string",
            "description": "Only the trending searches that started on or after this date: `2026-10-01`, or a period before now such as `6 hours`, `2 days` (API: full ISO date-times work too)."
          },
          "postedBefore": {
            "title": "Started before",
            "type": "string",
            "description": "Only the trending searches that started before this date (same formats as **Started after**)."
          },
          "excludeKeywords": {
            "title": "Exclude keywords",
            "maxItems": 50,
            "uniqueItems": true,
            "type": "array",
            "description": "Drop the trending searches whose title contains one of these words (case and accents ignored).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "onlyNew": {
            "title": "Only new results",
            "type": "boolean",
            "description": "Skip what a previous run (same **Memory key**) already delivered: trending searches already seen, and keyword reports whose data has not moved since (same last data point). Skipped results are not saved and not charged. First run = everything is new.",
            "default": false
          },
          "stateKey": {
            "title": "Memory key",
            "pattern": "^[a-zA-Z0-9_-]{1,64}$",
            "maxLength": 64,
            "type": "string",
            "description": "Name of the memory used by **Only new results**. Give each schedule / task its own key (e.g. `us-trending`). Letters, digits, `-` and `_`.",
            "default": "default"
          },
          "resetState": {
            "title": "Reset the memory",
            "type": "boolean",
            "description": "Forget everything remembered under this **Memory key** before the run: this run returns (and charges) everything again. Untick it afterwards.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify Proxy or your own proxies. Keep the default: it is included in the price. The residential Apify proxy is not available.",
            "default": {
              "useApifyProxy": true
            }
          },
          "requestsPerSession": {
            "title": "Requests per IP",
            "minimum": 5,
            "maximum": 100,
            "type": "integer",
            "description": "Requests sent through one proxy IP before switching to a fresh one. Keep the default.",
            "default": 40
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Maximum number of requests processed in parallel (each on its own IP).",
            "default": 4
          },
          "maxRequestsPerMinute": {
            "title": "Max requests per minute",
            "minimum": 10,
            "maximum": 1000,
            "type": "integer",
            "description": "Most requests to Google in any 60 seconds, all of them counted. Lower it if the log shows HTTP 429.",
            "default": 120
          },
          "minRequestIntervalMs": {
            "title": "Min delay between requests",
            "minimum": 0,
            "maximum": 60000,
            "type": "integer",
            "description": "Smallest gap between two requests, in milliseconds. 0 = no gap.",
            "default": 0
          },
          "maxRequestRetries": {
            "title": "Max request retries",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "Retries per request before it is marked as failed. A request Google turns away (HTTP 429) is retried on a new IP without using up these retries.",
            "default": 5
          },
          "debugLog": {
            "title": "Debug log",
            "type": "boolean",
            "description": "Include debug messages in the run log.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}