{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Trends Scraper: Unlimited Keywords + Daily History",
    "description": "Google Trends without the 5-keyword limit: compare 50+ keywords on one scale, get years of daily data, and receive momentum, YoY growth, seasonality and breakout insights plus a visual HTML report. Related queries, regions, YouTube, News, Shopping and Trending Now included.",
    "version": "0.1",
    "x-build-id": "c6f8ba9cObZnsoyEh"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/registryfeeds~google-trends-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-registryfeeds-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/registryfeeds~google-trends-scraper/runs": {
      "post": {
        "operationId": "runs-sync-registryfeeds-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/registryfeeds~google-trends-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-registryfeeds-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?",
            "enum": [
              "keywords",
              "trending"
            ],
            "type": "string",
            "description": "<b>Compare keywords</b>: interest over time, insights, related queries and regions for your keywords. <b>Trending now</b>: what people are searching for right now in a country.",
            "default": "keywords"
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Search terms to analyze. No 5-keyword limit: every keyword is placed on one shared 0-100 scale, so 50 keywords compare as fairly as 2.",
            "default": [
              "coffee",
              "tea",
              "matcha"
            ],
            "items": {
              "type": "string"
            }
          },
          "trendsUrl": {
            "title": "Or paste a Google Trends URL",
            "type": "string",
            "description": "Paste the address of any comparison you set up on trends.google.com/trends/explore. Its search terms, regions, time range, category and search type are used, and the fields below are ignored. Example: https://trends.google.com/trends/explore?q=coffee,tea&geo=US&date=today%205-y"
          },
          "geo": {
            "title": "Country or region",
            "type": "string",
            "description": "Two-letter country code (US, GB, DE), a region code (US-CA, GB-ENG), or leave empty for worldwide.",
            "default": "US"
          },
          "compareGeos": {
            "title": "Compare across regions",
            "type": "array",
            "description": "Compare the same keywords across several countries or states, all on one shared 0-100 scale (Google itself allows 5 per comparison; this has no limit). Use codes like US, GB, DE or US-CA, US-TX. Each keyword and region pair becomes one series. Leave empty to use the single region above.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "timeRange": {
            "title": "Time range",
            "enum": [
              "now 1-d",
              "now 7-d",
              "today 1-m",
              "today 3-m",
              "today 12-m",
              "today 5-y",
              "all",
              "custom"
            ],
            "type": "string",
            "description": "Period to analyze. Choose \"Custom dates\" to set your own start and end.",
            "default": "today 5-y"
          },
          "startDate": {
            "title": "Start date (custom range)",
            "type": "string",
            "description": "YYYY-MM-DD. Used only with \"Custom dates\"."
          },
          "endDate": {
            "title": "End date (custom range)",
            "type": "string",
            "description": "YYYY-MM-DD. Used only with \"Custom dates\". Defaults to today."
          },
          "dailyResolution": {
            "title": "Daily data for long ranges",
            "type": "boolean",
            "description": "Google only returns daily points for ranges up to about 9 months and switches to weekly or monthly beyond that. Turn this on to get one continuous daily series for any range, stitched from overlapping windows. Uses more requests.",
            "default": false
          },
          "searchProperty": {
            "title": "Search type",
            "enum": [
              "",
              "youtube",
              "news",
              "images",
              "froogle"
            ],
            "type": "string",
            "description": "Which Google search to measure.",
            "default": ""
          },
          "searchCategory": {
            "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 interest to searches in one category, for example \"apple\" in Food & Drink rather than the company.",
            "default": "0"
          },
          "category": {
            "title": "Category ID",
            "minimum": 0,
            "type": "integer",
            "description": "Numeric Google Trends category id (kept for API compatibility; the Category field above is easier). Used when Category is \"All categories\".",
            "default": 0
          },
          "includeRelatedQueries": {
            "title": "Related queries (top + rising)",
            "type": "boolean",
            "description": "Queries people also searched for, including rising ones Google marks as Breakout.",
            "default": true
          },
          "includeRelatedTopics": {
            "title": "Related topics",
            "type": "boolean",
            "description": "Topics people also searched for.",
            "default": false
          },
          "includeRegions": {
            "title": "Interest by region",
            "type": "boolean",
            "description": "Where each keyword is most popular.",
            "default": true
          },
          "regionResolution": {
            "title": "Region detail",
            "enum": [
              "REGION",
              "CITY",
              "DMA",
              "COUNTRY"
            ],
            "type": "string",
            "description": "Granularity for interest by region.",
            "default": "REGION"
          },
          "includeForecast": {
            "title": "Forecast the next 3 months",
            "type": "boolean",
            "description": "Adds a 3-month forecast per keyword with its expected error. The method (seasonal pattern, same period last year, or recent level) is chosen per keyword by testing each on that keyword's own past. Needs about 2 years of history, so it is skipped for shorter ranges and low-volume keywords.",
            "default": true
          },
          "outputTimelineRows": {
            "title": "Also output one row per date",
            "type": "boolean",
            "description": "Adds long-format rows (keyword, date, value) for charts and spreadsheets, in addition to one summary row per keyword. Each row is billed as a result.",
            "default": false
          },
          "generateReport": {
            "title": "Visual HTML report",
            "type": "boolean",
            "description": "Builds an interactive-looking dashboard (charts, insight cards, breakout queries, top regions) and saves it as REPORT in the key-value store.",
            "default": true
          },
          "trendingGeo": {
            "title": "Trending now: country",
            "type": "string",
            "description": "Country code for Trending now mode, for example US, GB, IN, BR.",
            "default": "US"
          },
          "maxKeywords": {
            "title": "Maximum keywords",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Safety cap on how many keywords one run analyzes.",
            "default": 100
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "The Actor connects directly first and switches to this proxy only if Google starts rate-limiting. Residential proxies are the most reliable for very large runs.",
            "default": {
              "useApifyProxy": true
            }
          },
          "selfTest": {
            "title": "Self-test (maintenance)",
            "type": "boolean",
            "description": "Used by the daily health check. Runs a fixed known-good case and fails the run if the output looks wrong.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}