{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Trends Scraper Pro",
    "description": "Google Trends API alternative: compare unlimited keywords on one scale, get daily data for years, regions, related and breakout queries, plus Trending Now with news. Built-in breakout/rising/seasonality detection and forecasts. Pay only for results.",
    "version": "0.0",
    "x-build-id": "ZLsGvBsETNFAN3kQt"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/lsso~google-trends-scraper-pro/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-lsso-google-trends-scraper-pro",
        "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/lsso~google-trends-scraper-pro/runs": {
      "post": {
        "operationId": "runs-sync-lsso-google-trends-scraper-pro",
        "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/lsso~google-trends-scraper-pro/run-sync": {
      "post": {
        "operationId": "run-sync-lsso-google-trends-scraper-pro",
        "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": [
              "explore",
              "trendingNow"
            ],
            "type": "string",
            "description": "**Keyword research**: interest over time, regions, related & breakout queries and trend analysis for your keywords. **Trending Now**: what people are searching right now in one or more countries, with search volume, growth and news.",
            "default": "explore"
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Search terms or Google topic IDs (e.g. `/m/0d6lp`). **No comparison limit**: Google Trends compares at most 8 terms at once and rescales each comparison separately; here any number of keywords are placed on one shared 0–100 scale automatically (anchor calibration), so values are directly comparable across the whole list.",
            "default": [
              "ChatGPT",
              "Gemini",
              "Claude"
            ],
            "items": {
              "type": "string"
            }
          },
          "trendsUrls": {
            "title": "…or paste Google Trends URLs",
            "type": "array",
            "description": "Explore URLs copied from trends.google.com, e.g. `https://trends.google.com/trends/explore?date=today%2012-m&geo=US&q=chatgpt,gemini`. Keywords, location, period, category and search type are read from each URL (overriding the fields below). Handy if you already have a list of Trends links.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "geo": {
            "title": "Location",
            "type": "string",
            "description": "Two-letter country code (`US`, `GB`, `DE`, `KR`, `JP`…) or region code (`US-CA`, `GB-ENG`). Leave empty for worldwide. Invalid codes are rejected with a clear message instead of silently returning worldwide data.",
            "default": ""
          },
          "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"
            ],
            "type": "string",
            "description": "Preset period. Ignored when both *Start date* and *End date* are set.",
            "default": "today 12-m"
          },
          "startDate": {
            "title": "Start date",
            "type": "string",
            "description": "Custom range start (YYYY-MM-DD). Use together with *End date*."
          },
          "endDate": {
            "title": "End date",
            "type": "string",
            "description": "Custom range end (YYYY-MM-DD)."
          },
          "dailyData": {
            "title": "Daily data for long ranges",
            "type": "boolean",
            "description": "Google only gives weekly/monthly points for ranges over ~9 months. Turn this on to get **true daily values** for multi-year ranges: the Actor fetches overlapping windows and stitches them onto one consistent scale (up to 5 keywords). Costs the same per keyword, takes longer.",
            "default": false
          },
          "include": {
            "title": "Include",
            "uniqueItems": true,
            "type": "array",
            "description": "Extra data per keyword.",
            "items": {
              "type": "string",
              "enum": [
                "timeline",
                "regions",
                "relatedQueries"
              ],
              "enumTitles": [
                "Interest over time",
                "Interest by region",
                "Related & rising queries"
              ]
            },
            "default": [
              "timeline",
              "regions",
              "relatedQueries"
            ]
          },
          "outputLayout": {
            "title": "Output layout",
            "enum": [
              "nested",
              "flat"
            ],
            "type": "string",
            "description": "`flat` returns one dataset row per keyword and date (`keyword, date, value, isPartial, status`), ready for spreadsheets and dashboards. Billing is the same (per keyword).",
            "default": "nested"
          },
          "category": {
            "title": "Category ID",
            "minimum": 0,
            "type": "integer",
            "description": "Google Trends category to disambiguate a term, e.g. `0` all, `5` Computers & Electronics, `7` Finance, `16` News, `18` Shopping, `44` Beauty & Fitness, `71` Food & Drink, `3` Arts & Entertainment. Full list: the `cat=` value in a trends.google.com URL.",
            "default": 0
          },
          "property": {
            "title": "Search type",
            "enum": [
              "",
              "images",
              "news",
              "youtube",
              "froogle"
            ],
            "type": "string",
            "description": "Which Google search to measure.",
            "default": ""
          },
          "analytics": {
            "title": "Trend analysis",
            "type": "boolean",
            "description": "Adds a status per keyword (**breakout / rising / stable / peaked / declining**), growth, year-over-year change, momentum, peak date, spike/drop detection, seasonality (busiest and quietest months) and a short forecast with an 80% range.",
            "default": true
          },
          "forecastHorizon": {
            "title": "Forecast points",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "How many future points to forecast (in the series' own resolution: days, weeks or months). Leave empty for a sensible default."
          },
          "monitor": {
            "title": "Monitoring mode (for schedules)",
            "type": "boolean",
            "description": "Remembers the last run for the same keywords + location + time range and reports **status changes** and **new rising queries** since then. Ideal with an Apify schedule and an email/Slack integration.",
            "default": false
          },
          "maxKeywords": {
            "title": "Max keywords",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Safety cap on how many keywords are processed.",
            "default": 200
          },
          "maxRegions": {
            "title": "Max regions per keyword",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "How many regions to return per keyword, sorted by interest.",
            "default": 250
          },
          "trendingGeos": {
            "title": "Countries",
            "type": "array",
            "description": "Country or region codes for Trending Now, e.g. `US`, `GB`, `IN`, `KR`, `JP`, `DE`, `BR`, and sub-national regions such as `US-CA`, `US-NY` or `GB-ENG`.",
            "default": [
              "US"
            ],
            "items": {
              "type": "string"
            }
          },
          "trendingHours": {
            "title": "Time window",
            "enum": [
              "4",
              "24",
              "48",
              "168"
            ],
            "type": "string",
            "description": "Trends started in the past…",
            "default": "24"
          },
          "maxTrendingItems": {
            "title": "Max trends per country",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum trends returned per country, highest search volume first.",
            "default": 100
          },
          "onlyActive": {
            "title": "Only active trends",
            "type": "boolean",
            "description": "Skip trends that have already ended.",
            "default": false
          },
          "trendingCategories": {
            "title": "Categories",
            "uniqueItems": true,
            "type": "array",
            "description": "Keep only these Trending Now 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": []
          },
          "includeNews": {
            "title": "Attach news articles",
            "type": "boolean",
            "description": "Add the news headlines, sources and images Google shows next to each trend.",
            "default": true
          },
          "newsPerTrend": {
            "title": "News articles per trend",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many news articles to attach to each trend (1–10).",
            "default": 3
          },
          "language": {
            "title": "Interface language",
            "type": "string",
            "description": "Language for topic names and news, e.g. `en-US`, `ko`, `ja`, `de`.",
            "default": "en-US"
          },
          "timezoneOffset": {
            "title": "Timezone offset (minutes)",
            "type": "integer",
            "description": "Minutes from UTC as Google expects it (UTC−5 → `300`, UTC+9 → `-540`). Affects hourly/daily bucket boundaries.",
            "default": 0
          },
          "maxRetries": {
            "title": "Max retries per request",
            "minimum": 0,
            "maximum": 12,
            "type": "integer",
            "description": "On rate limits the Actor switches to a fresh residential IP and backs off.",
            "default": 8
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Residential proxies are strongly recommended; Google rate-limits datacenter IPs.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}