{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Trends Scraper — Interest, Regions & Rising Queries",
    "description": "Google Trends scraper and API alternative: interest over time, interest by region, top & rising related queries and Trending Now for any keyword, country and timeframe. Adds trend direction, peak and seasonality fields. Proxies included, pay per result.",
    "version": "1.0",
    "x-build-id": "T0VdQVyHJ1n5uM0rY"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/umararshad2~google-trends-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-umararshad2-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/umararshad2~google-trends-scraper/runs": {
      "post": {
        "operationId": "runs-sync-umararshad2-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/umararshad2~google-trends-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-umararshad2-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": {
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Search terms to look up on Google Trends (max 100 characters each). Each keyword becomes one result row per country.",
            "items": {
              "type": "string"
            }
          },
          "geos": {
            "title": "Countries / regions",
            "type": "array",
            "description": "Google Trends location codes: a country (\"US\", \"GB\", \"DE\", \"IN\"), a sub-region (\"US-CA\", \"GB-ENG\") or \"worldwide\". Each keyword is scraped for every location. Default: US.",
            "items": {
              "type": "string"
            }
          },
          "timeframe": {
            "title": "Timeframe",
            "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": "Time range of the trend data. Ignored if a custom time range is set below.",
            "default": "today 12-m"
          },
          "customTimeRange": {
            "title": "Custom time range (optional)",
            "pattern": "^$|^\\d{4}-\\d{2}-\\d{2} \\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Exact date range as \"YYYY-MM-DD YYYY-MM-DD\", e.g. \"2025-01-01 2025-12-31\". Overrides the timeframe above."
          },
          "includeRegions": {
            "title": "Include interest by region",
            "type": "boolean",
            "description": "Adds interest by sub-region (e.g. US states) or country (for worldwide). Charged as a keyword insight together with related queries.",
            "default": true
          },
          "regionResolution": {
            "title": "Region resolution",
            "enum": [
              "auto",
              "COUNTRY",
              "REGION",
              "DMA"
            ],
            "type": "string",
            "description": "Granularity of interest by region. \"Auto\" uses Google's default for the location (states for a country, countries for worldwide, metro areas for a US state). Metro (DMA) data exists for the US only.",
            "default": "auto"
          },
          "includeRelatedQueries": {
            "title": "Include related queries (top & rising)",
            "type": "boolean",
            "description": "Adds the top related queries and the rising queries (including \"Breakout\" ones) for each keyword. Charged as a keyword insight together with regions.",
            "default": true
          },
          "compareKeywords": {
            "title": "Compare keywords on one scale",
            "type": "boolean",
            "description": "If on, keywords are compared in groups of up to 5 (like typing them into one Google Trends chart), so values are relative to each other. If off, each keyword is scraped on its own 0–100 scale.",
            "default": false
          },
          "searchProperty": {
            "title": "Search type",
            "enum": [
              "web",
              "images",
              "news",
              "shopping",
              "youtube"
            ],
            "type": "string",
            "description": "Which Google search to measure.",
            "default": "web"
          },
          "category": {
            "title": "Category ID",
            "minimum": 0,
            "type": "integer",
            "description": "Google Trends category ID to narrow the meaning of a keyword (0 = all categories). Examples: 71 = Food & Drink, 18 = Shopping, 12 = Business & Industrial, 5 = Computers & Electronics.",
            "default": 0
          },
          "exploreUrls": {
            "title": "Google Trends explore URLs (optional)",
            "type": "array",
            "description": "Paste URLs copied from trends.google.com/trends/explore. Keywords, location, date, category and search type are read from the URL; up to 5 compared keywords per URL.",
            "items": {
              "type": "string"
            }
          },
          "trendingNowGeos": {
            "title": "Trending Now countries (optional)",
            "type": "array",
            "description": "Country codes to fetch Google Trends \"Trending Now\" (currently trending searches with approximate traffic and news links), e.g. [\"US\", \"GB\", \"IN\"].",
            "items": {
              "type": "string"
            }
          },
          "trendingNowHours": {
            "title": "Trending Now lookback",
            "enum": [
              "4",
              "24",
              "48",
              "168"
            ],
            "type": "string",
            "description": "How far back to look for Trending Now searches. 4 = last 4 hours, 24 = last day, 48 = last 2 days, 168 = last 7 days.",
            "default": "24"
          },
          "maxTrendingPerCountry": {
            "title": "Max Trending Now rows per country",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Cap on how many Trending Now searches to return per country (1–1000). Default 25 keeps the default run fast and cheap.",
            "default": 25
          },
          "trendingActiveOnly": {
            "title": "Only currently trending searches",
            "type": "boolean",
            "description": "If on, drop searches that have already stopped trending within the lookback window.",
            "default": false
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Interface language for region names and related queries (Google's hl parameter), e.g. en-US, de, fr, es.",
            "default": "en-US"
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional. Leave empty: the Actor connects directly and automatically switches to Apify datacenter and then residential proxies if Google rate-limits it. Set this only if you want to force your own proxies."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}