{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Trends Scraper - Regions, Related & Trending Now",
    "description": "Get Google Trends data for any keyword: interest over time, interest by region and city, related and breakout searches, side-by-side comparisons with share of search, plus the full Trending Now list with search volume and growth. Adds trend direction, momentum, year-over-year change and seasonality.",
    "version": "1.0",
    "x-build-id": "b9j7LffrlmqNBGsOr"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/trakk~google-trends-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-trakk-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/trakk~google-trends-scraper/runs": {
      "post": {
        "operationId": "runs-sync-trakk-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/trakk~google-trends-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-trakk-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": {
          "mode": {
            "title": "What do you want to collect?",
            "enum": [
              "keywords",
              "trendingNow"
            ],
            "type": "string",
            "description": "Keyword trends analyses your search terms. Trending now lists the searches that are rising right now in the selected countries, with search volume and growth.",
            "default": "keywords"
          },
          "searchTerms": {
            "title": "Search terms",
            "type": "array",
            "description": "Words or phrases to analyse, one per line. You can also paste a Google Trends explore URL; its terms, country, period and category are used. Used in Keyword trends mode.",
            "items": {
              "type": "string"
            }
          },
          "compareTerms": {
            "title": "Compare terms on one chart",
            "type": "boolean",
            "description": "Put the terms on the same 0-100 scale, exactly like the Google Trends comparison view. Adds share of search, the winner and which term leads in each region. Google compares up to 5 terms at once; with more terms the first term is added to every group as an anchor and all terms are ranked on one scale.",
            "default": false
          },
          "countries": {
            "title": "Countries",
            "type": "array",
            "description": "Leave empty for Worldwide (Keyword trends) or United States (Trending now). Select several countries to get a separate result for each one in a single run.",
            "items": {
              "type": "string",
              "enum": [
                "AR",
                "AU",
                "AT",
                "BD",
                "BE",
                "BR",
                "BG",
                "CA",
                "CL",
                "CN",
                "CO",
                "HR",
                "CZ",
                "DK",
                "EG",
                "EE",
                "FI",
                "FR",
                "DE",
                "GH",
                "GR",
                "HK",
                "HU",
                "IN",
                "ID",
                "IE",
                "IL",
                "IT",
                "JP",
                "KZ",
                "KE",
                "LV",
                "LT",
                "MY",
                "MX",
                "MA",
                "NL",
                "NZ",
                "NG",
                "NO",
                "PK",
                "PE",
                "PH",
                "PL",
                "PT",
                "RO",
                "RU",
                "SA",
                "RS",
                "SG",
                "SK",
                "SI",
                "ZA",
                "KR",
                "ES",
                "SE",
                "CH",
                "TW",
                "TH",
                "TR",
                "UA",
                "AE",
                "GB",
                "US",
                "VN"
              ],
              "enumTitles": [
                "Argentina",
                "Australia",
                "Austria",
                "Bangladesh",
                "Belgium",
                "Brazil",
                "Bulgaria",
                "Canada",
                "Chile",
                "China",
                "Colombia",
                "Croatia",
                "Czechia",
                "Denmark",
                "Egypt",
                "Estonia",
                "Finland",
                "France",
                "Germany",
                "Ghana",
                "Greece",
                "Hong Kong",
                "Hungary",
                "India",
                "Indonesia",
                "Ireland",
                "Israel",
                "Italy",
                "Japan",
                "Kazakhstan",
                "Kenya",
                "Latvia",
                "Lithuania",
                "Malaysia",
                "Mexico",
                "Morocco",
                "Netherlands",
                "New Zealand",
                "Nigeria",
                "Norway",
                "Pakistan",
                "Peru",
                "Philippines",
                "Poland",
                "Portugal",
                "Romania",
                "Russia",
                "Saudi Arabia",
                "Serbia",
                "Singapore",
                "Slovakia",
                "Slovenia",
                "South Africa",
                "South Korea",
                "Spain",
                "Sweden",
                "Switzerland",
                "Taiwan",
                "Thailand",
                "Turkey",
                "Ukraine",
                "United Arab Emirates",
                "United Kingdom",
                "United States",
                "Vietnam"
              ]
            }
          },
          "timeRange": {
            "title": "Time period",
            "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": "The period Google Trends covers. Short periods give hourly or daily points, long periods give weekly or monthly points.",
            "default": "today 12-m"
          },
          "customTimeRange": {
            "title": "Custom period (optional)",
            "pattern": "^$|^\\d{4}-\\d{2}-\\d{2} \\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Exact dates instead of a preset period, written as start and end: 2025-01-01 2025-06-30. Overrides Time period."
          },
          "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 analysis to searches in one category, for example to separate Apple the company (Computers & Electronics) from apple the fruit (Food & Drink).",
            "default": "0"
          },
          "searchType": {
            "title": "Search type",
            "enum": [
              "web",
              "images",
              "news",
              "youtube",
              "froogle"
            ],
            "type": "string",
            "description": "Which Google search property to measure. YouTube search shows video demand, Google Shopping shows product demand.",
            "default": "web"
          },
          "searchAsTopic": {
            "title": "Analyse as a topic instead of exact words",
            "type": "boolean",
            "description": "Google Trends topics group every spelling, language and synonym of the same thing (for example Bitcoin the cryptocurrency). Turn on for a broader, language-independent measure. The matched topic is shown in the result.",
            "default": false
          },
          "includeRegions": {
            "title": "Interest by region",
            "type": "boolean",
            "description": "Add where the term is most popular: states or provinces for a country, countries for Worldwide.",
            "default": true
          },
          "includeCities": {
            "title": "Interest by city and metro area",
            "type": "boolean",
            "description": "Add the cities with the highest interest, with coordinates. For the United States, metro areas (DMA) are added too.",
            "default": false
          },
          "includeRelatedQueries": {
            "title": "Related searches",
            "type": "boolean",
            "description": "Add the top and rising related searches, with breakout searches (growth above 5000%) highlighted.",
            "default": true
          },
          "trendingHours": {
            "title": "Trending in the past",
            "enum": [
              "4",
              "24",
              "48",
              "168"
            ],
            "type": "string",
            "description": "How far back Trending now looks. The past 24 hours usually returns 300-500 trends per country, the past 7 days several thousand.",
            "default": "24"
          },
          "trendingCategories": {
            "title": "Trending categories",
            "type": "array",
            "description": "Keep only trends in these categories. Leave empty for all categories.",
            "items": {
              "type": "string",
              "enum": [
                "1",
                "2",
                "3",
                "20",
                "4",
                "5",
                "6",
                "7",
                "8",
                "9",
                "10",
                "11",
                "13",
                "14",
                "15",
                "16",
                "17",
                "18",
                "19"
              ],
              "enumTitles": [
                "Autos and Vehicles",
                "Beauty and Fashion",
                "Business and Finance",
                "Climate",
                "Entertainment",
                "Food and Drink",
                "Games",
                "Health",
                "Hobbies and Leisure",
                "Jobs and Education",
                "Law and Government",
                "Other",
                "Pets and Animals",
                "Politics",
                "Science",
                "Shopping",
                "Sports",
                "Technology",
                "Travel and Transportation"
              ]
            }
          },
          "minSearchVolume": {
            "title": "Minimum search volume",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only trends with at least this many searches in the period, for example 10000. Leave empty to keep all."
          },
          "onlyActiveTrends": {
            "title": "Only trends that are still rising",
            "type": "boolean",
            "description": "Skip trends that Google marks as finished.",
            "default": false
          },
          "maxTrends": {
            "title": "Max trends per country",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Upper limit of trending searches saved for each country, in Google's ranking order.",
            "default": 50
          },
          "includeNews": {
            "title": "Attach news articles",
            "type": "boolean",
            "description": "Attach the news articles Google shows next to the top trends.",
            "default": true
          },
          "trackChanges": {
            "title": "Track changes since the last run",
            "type": "boolean",
            "description": "For scheduled runs: each result shows what changed since the previous run with the same settings (interest, trend direction, new breakout searches, new winner), and Trending now marks trends that are new. History is kept in your own Apify account.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}