{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Trends Scraper — Interest, Regions, Queries & Trending",
    "description": "Scrape Google Trends: interest over time, interest by country, region or metro, related queries (top and rising) for up to 5 compared terms, plus Trending now searches per country.",
    "version": "0.1",
    "x-build-id": "B84BIRpnD49pxcME6"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/tortuga~google-trends-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-tortuga-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/tortuga~google-trends-scraper/runs": {
      "post": {
        "operationId": "runs-sync-tortuga-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/tortuga~google-trends-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-tortuga-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 per line. To compare terms on one scale like on trends.google.com, put up to 5 on one line separated by commas, e.g. 'python, javascript, rust'. Topic IDs such as /m/05z1_ work too. Each term is one result.",
            "items": {
              "type": "string"
            }
          },
          "geo": {
            "title": "Location",
            "type": "string",
            "description": "Country or region code: US, GB, DE, US-CA (California), GB-SCT, US-NY-501 (New York metro). Leave empty for worldwide."
          },
          "timeRange": {
            "title": "Time range",
            "enum": [
              "today 12-m",
              "now 7-d",
              "now 1-d",
              "today 1-m",
              "today 3-m",
              "today 5-y",
              "all",
              "now 4-H",
              "now 1-H"
            ],
            "type": "string",
            "description": "Period to analyze. Short ranges give hourly or minute points, long ranges weekly or monthly points.",
            "default": "today 12-m"
          },
          "customTimeRange": {
            "title": "Custom time range",
            "type": "string",
            "description": "Overrides Time range. Two dates 'YYYY-MM-DD YYYY-MM-DD', e.g. '2024-01-01 2024-06-30'. For hourly data within 7 days use 'YYYY-MM-DDTHH YYYY-MM-DDTHH'."
          },
          "category": {
            "title": "Category",
            "type": "string",
            "description": "Limit to a Google Trends category, by name ('Food & Drink', 'Shopping', 'Computers & Electronics') or numeric ID (71). Empty = all categories."
          },
          "searchProperty": {
            "title": "Search type",
            "enum": [
              "web",
              "youtube",
              "news",
              "images",
              "shopping"
            ],
            "type": "string",
            "description": "Which Google search to measure: web search, image search, news search, Google Shopping or YouTube search.",
            "default": "web"
          },
          "includeInterestOverTime": {
            "title": "Interest over time",
            "type": "boolean",
            "description": "Timeline of search interest (0-100) with average and peak.",
            "default": true
          },
          "includeInterestByRegion": {
            "title": "Interest by region",
            "type": "boolean",
            "description": "Interest (0-100) by country (worldwide searches) or by subregion (country searches). For compared terms also each term's share per region.",
            "default": true
          },
          "regionResolution": {
            "title": "Region level",
            "enum": [
              "",
              "country",
              "region",
              "metro",
              "city"
            ],
            "type": "string",
            "description": "Breakdown level for interest by region. Automatic = countries for worldwide, subregions (states) for a country. Metro (DMA) exists for the US only; city data is sparse.",
            "default": ""
          },
          "includeLowVolumeRegions": {
            "title": "Include low-volume regions",
            "type": "boolean",
            "description": "Also return regions with little search volume, as the 'Include low search volume regions' switch on Google Trends.",
            "default": false
          },
          "includeRelatedQueries": {
            "title": "Related queries",
            "type": "boolean",
            "description": "Top and rising related searches (rising includes 'Breakout' terms that grew more than 5000%).",
            "default": true
          },
          "includeRelatedTopics": {
            "title": "Related topics",
            "type": "boolean",
            "description": "Top and rising related topics (single-term searches only). Google currently often returns this list empty to automated clients; the term is still saved with all other data.",
            "default": true
          },
          "trendingCountries": {
            "title": "Trending now: countries",
            "type": "array",
            "description": "Country codes (US, GB, DE, IN, BR...) or regions (US-CA) to get the 'Trending now' searches for. Each trending search is one result. Leave empty to skip.",
            "items": {
              "type": "string"
            }
          },
          "trendingHours": {
            "title": "Trending window",
            "enum": [
              "24",
              "4",
              "48",
              "168"
            ],
            "type": "string",
            "description": "Trends that started in the past 4 hours, 24 hours, 48 hours or 7 days.",
            "default": "24"
          },
          "trendingCategory": {
            "title": "Trending 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 in this category.",
            "default": "0"
          },
          "trendingActiveOnly": {
            "title": "Active trends only",
            "type": "boolean",
            "description": "Skip trends that Google marks as no longer active.",
            "default": false
          },
          "maxTrendsPerCountry": {
            "title": "Max trends per country",
            "minimum": 1,
            "type": "integer",
            "description": "Take at most this many trends per country, in Google's order. Empty = all (a 7-day window in the US has 2,000+)."
          },
          "includeNews": {
            "title": "Include news articles",
            "type": "boolean",
            "description": "Add the news articles Google shows for each trend (title, source, URL, time, image). One extra request per 20 trends.",
            "default": false
          },
          "maxNewsPerTrend": {
            "title": "News articles per trend",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many news articles to keep per trend (1-10).",
            "default": 3
          },
          "onlyNewOrChanged": {
            "title": "Only new or changed items",
            "type": "boolean",
            "description": "Remember what earlier runs of this search returned and output only new items or items whose price/status changed. Use with a Schedule; unchanged items are not charged. Here: each trending search is output once, when it first appears. Search-term results are not affected.",
            "default": false
          },
          "monitoringKey": {
            "title": "Monitoring key",
            "type": "string",
            "description": "Name for this watch, so several schedules on the same search stay separate; defaults to a key derived from the search input."
          },
          "startUrls": {
            "title": "Google Trends URLs",
            "type": "array",
            "description": "Optional: paste Google Trends URLs. Explore URLs (trends.google.com/trends/explore?q=...) keep their terms, location, dates, category and search type; trending URLs (trends.google.com/trending?geo=GB&hours=4) add a trending country.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "maxItems": {
            "title": "Max results",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many results in total (search terms + trending searches). Keeps cost predictable.",
            "default": 100
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Apify datacenter proxy works and is the cheapest; each IP gets its own Google cookie and throttled IPs are replaced automatically. If the datacenter IPs keep getting throttled, the run switches to RESIDENTIAL when your plan has it (a few KB per request).",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}