{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Trends Scraper – Compare 100+ Keywords",
    "description": "Google Trends data for any number of keywords: interest over time, interest by region, related and rising queries, plus Trending Now by country. Compare 100+ keywords on one scale, get spike and breakout alerts on a schedule. Pay only per result.",
    "version": "1.0",
    "x-build-id": "UCc3ElIo6v8kTkNjf"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/quinic_resin~google-trends-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-quinic_resin-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/quinic_resin~google-trends-scraper/runs": {
      "post": {
        "operationId": "runs-sync-quinic_resin-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/quinic_resin~google-trends-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-quinic_resin-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>Keyword trends</b>: interest over time, interest by region and related searches for your search terms (one row per keyword).<br><b>Trending now</b>: what is spiking in Google Search right now in one or more countries (one row per trending search).",
            "default": "keywords"
          },
          "searchTerms": {
            "title": "Search terms",
            "type": "array",
            "description": "Keywords to look up, one per line. Each keyword gets its own row with Google's 0–100 interest scale. Google Trends syntax works: <code>tea + coffee</code> (either), <code>\"green tea\"</code> (exact), <code>tea -green</code> (exclude), or a topic id like <code>/m/07c1v</code>.",
            "items": {
              "type": "string"
            }
          },
          "compareKeywords": {
            "title": "Compare keywords on one scale",
            "type": "boolean",
            "description": "Put all search terms on one shared 0–100 scale, like Google's comparison chart – but for up to 300 keywords (Google allows 5). Overlapping requests are combined into one consistent scale. Leave off to get each keyword on its own scale.",
            "default": false
          },
          "startUrls": {
            "title": "Google Trends links",
            "type": "array",
            "description": "Paste explore links from trends.google.com (e.g. <code>https://trends.google.com/trends/explore?q=tea,coffee&geo=GB</code>). The link's terms, location, time range, category and search type are used. A link with several terms is a comparison.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "geo": {
            "title": "Location",
            "type": "string",
            "description": "Country code like <code>US</code>, <code>GB</code>, <code>DE</code>, or a region like <code>US-CA</code>. Leave empty for Worldwide.",
            "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": "Period to analyse. Shorter periods give finer data: minutes or hours for the past day/week, days up to 9 months, weeks up to 5 years, months for 2004–present.",
            "default": "today 12-m"
          },
          "customTimeRange": {
            "title": "Custom time range",
            "pattern": "^(\\d{4}-\\d{2}-\\d{2}(T\\d{2})? \\d{4}-\\d{2}-\\d{2}(T\\d{2})?)?$",
            "type": "string",
            "description": "Overrides the time range above. Format <code>YYYY-MM-DD YYYY-MM-DD</code>, e.g. <code>2025-01-01 2025-06-30</code>. For hourly data use <code>YYYY-MM-DDTHH YYYY-MM-DDTHH</code> (max 7 days)."
          },
          "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": "Narrow results to a topic area (e.g. <i>python</i> in Computers & Electronics vs. Pets & Animals). Deeper categories work through a Google Trends link.",
            "default": "0"
          },
          "property": {
            "title": "Search type",
            "enum": [
              "",
              "images",
              "news",
              "froogle",
              "youtube"
            ],
            "type": "string",
            "description": "Which Google search to measure.",
            "default": ""
          },
          "includeInterestOverTime": {
            "title": "Interest over time",
            "type": "boolean",
            "description": "The timeline (0–100) plus summary numbers: average, peak, latest, recent change, rising/falling, spike flag, year-over-year change.",
            "default": true
          },
          "includeInterestByRegion": {
            "title": "Interest by region",
            "type": "boolean",
            "description": "Where the keyword is most popular (countries for Worldwide, states/regions for a country).",
            "default": true
          },
          "regionResolution": {
            "title": "Region detail",
            "enum": [
              "auto",
              "COUNTRY",
              "REGION",
              "CITY",
              "DMA"
            ],
            "type": "string",
            "description": "<b>Auto</b> follows Google: countries for Worldwide, subregions for a country. Cities work for most countries; metro areas (DMA) only for the US.",
            "default": "auto"
          },
          "maxRegions": {
            "title": "Max regions per keyword",
            "minimum": 0,
            "type": "integer",
            "description": "Top regions to keep, sorted by interest. 0 = all.",
            "default": 50
          },
          "includeLowVolumeRegions": {
            "title": "Include low-volume regions",
            "type": "boolean",
            "description": "Also list regions where Google has little data (shown as 0).",
            "default": false
          },
          "includeRelatedQueries": {
            "title": "Related queries",
            "type": "boolean",
            "description": "Top and rising searches people also make, including 'Breakout' queries (growth over 5,000%).",
            "default": true
          },
          "includeRelatedTopics": {
            "title": "Related topics",
            "type": "boolean",
            "description": "Top and rising topics (entities). Google often returns this list empty for automated access and never offers it in comparisons; you are not charged extra either way.",
            "default": false
          },
          "trendingGeos": {
            "title": "Countries",
            "type": "array",
            "description": "Country codes for Trending now, e.g. <code>US</code>, <code>GB</code>, <code>IN</code>, <code>DE</code>. One run can cover many countries.",
            "items": {
              "type": "string"
            }
          },
          "trendingHours": {
            "title": "Trending in the past",
            "enum": [
              "4",
              "24",
              "48",
              "168"
            ],
            "type": "string",
            "description": "Time window for trending searches.",
            "default": "24"
          },
          "trendingCategories": {
            "title": "Categories",
            "type": "array",
            "description": "Only keep trends in these categories. Empty = all.",
            "items": {
              "type": "string",
              "enum": [
                "1",
                "2",
                "3",
                "20",
                "4",
                "5",
                "6",
                "7",
                "8",
                "9",
                "10",
                "13",
                "14",
                "15",
                "16",
                "17",
                "18",
                "19",
                "11"
              ],
              "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",
                "Pets and Animals",
                "Politics",
                "Science",
                "Shopping",
                "Sports",
                "Technology",
                "Travel and Transportation",
                "Other"
              ]
            }
          },
          "trendingOnlyActive": {
            "title": "Only active trends",
            "type": "boolean",
            "description": "Skip trends that have already ended.",
            "default": false
          },
          "maxTrendingPerGeo": {
            "title": "Max trends per country",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Google lists up to a few hundred trends per country and time window.",
            "default": 100
          },
          "includeTrendingNews": {
            "title": "Attach news articles",
            "type": "boolean",
            "description": "Adds the news stories Google links to the top trends (one extra request per country).",
            "default": false
          },
          "monitorId": {
            "title": "Monitor name",
            "type": "string",
            "description": "Give a name (e.g. <code>daily-us-trends</code> or <code>my-brands</code>) and schedule the Actor. <b>Trending now</b>: later runs return only trends that are new since the previous run. <b>Keyword trends</b>: each row lists rising queries that are new since the previous run and an <code>alert</code> flag (new breakout or spike). Runs with the same name share this memory."
          },
          "onlyNew": {
            "title": "Only new trends",
            "type": "boolean",
            "description": "With a monitor name, Trending now returns only trends not reported before.",
            "default": true
          },
          "firstRunBaseline": {
            "title": "First run only records a baseline",
            "type": "boolean",
            "description": "With a monitor name, the first Trending now run returns nothing (and costs nothing) and just remembers what is trending; alerts start with the next run.",
            "default": false
          },
          "maxItems": {
            "title": "Max rows",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many rows. 0 = no limit. You can also set a spending limit when you start the run.",
            "default": 0
          },
          "maxConcurrency": {
            "title": "Parallel sessions",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many proxy sessions query Google at once. Higher is faster; Google rate-limits aggressive clients, and the Actor backs off and rotates sessions automatically.",
            "default": 5
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Language for region names and labels, e.g. <code>en-US</code>, <code>de</code>, <code>es-MX</code>. Search terms are never translated.",
            "default": "en-US"
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Google Trends rate-limits datacenter IPs within a few requests, so residential proxies are used by default. Proxy traffic is included in the price.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "US"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}