{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Trends Scraper - Interest, Regions, Trending Now",
    "description": "Google Trends data with retries for 429 errors: interest over time, interest by region, top and rising related queries for up to 5 compared terms, and Trending Now by country with search volume. CSV export, new-trend alerts. $2 per 1,000 term reports, no start fee.",
    "version": "0.1",
    "x-build-id": "mEfkuic1DFnsdKaij"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/tidytools~google-trends-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-tidytools-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/tidytools~google-trends-scraper/runs": {
      "post": {
        "operationId": "runs-sync-tidytools-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/tidytools~google-trends-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-tidytools-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, put them on one line separated by commas, e.g. \"chatgpt, claude, gemini\" (up to 5 exactly as on trends.google.com; up to 25 in batches of 5 scaled approximately through the first term). A term can be a word, a phrase or a Google topic id such as /m/05z1_. Each term in a search is one report.",
            "items": {
              "type": "string"
            }
          },
          "geo": {
            "title": "Country or region",
            "type": "string",
            "description": "Empty = worldwide. A country code (US, GB, DE, JP, TW ...) or a region code (US-CA, GB-ENG, BR-SP). Several codes separated by commas run every search in each of them.",
            "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": "The period of the charts (Google picks the resolution: minutes, hours, days, weeks or months).",
            "default": "today 12-m"
          },
          "customTimeRange": {
            "title": "Custom time range (optional)",
            "type": "string",
            "description": "Overrides the time range: \"YYYY-MM-DD YYYY-MM-DD\", e.g. \"2025-01-01 2025-06-30\" (from 2004-01-01)."
          },
          "searchProperty": {
            "title": "Search type",
            "enum": [
              "web",
              "images",
              "news",
              "shopping",
              "youtube"
            ],
            "type": "string",
            "description": "Which Google search the interest is measured on.",
            "default": "web"
          },
          "category": {
            "title": "Category id (optional)",
            "minimum": 0,
            "maximum": 2000,
            "type": "integer",
            "description": "Google Trends category, e.g. 0 = all, 5 = Computers & Electronics, 7 = Finance, 18 = Shopping, 45 = Health, 71 = Food & Drink, 958 = Jobs. The id is the \"cat\" value in a trends.google.com link.",
            "default": 0
          },
          "interestOverTime": {
            "title": "Interest over time",
            "type": "boolean",
            "description": "The chart: search interest 0-100 per point in time, with averages, the peak and the latest full period.",
            "default": true
          },
          "interestByRegion": {
            "title": "Interest by region",
            "type": "boolean",
            "description": "Countries (worldwide searches) or regions of the selected country, with their 0-100 interest; for comparisons, each term's share per region.",
            "default": true
          },
          "regionResolution": {
            "title": "Region level",
            "enum": [
              "auto",
              "COUNTRY",
              "REGION",
              "DMA",
              "CITY"
            ],
            "type": "string",
            "description": "Level of the interest-by-region list. A level Google does not offer for the chosen geo falls back to auto.",
            "default": "auto"
          },
          "includeLowVolumeRegions": {
            "title": "Include low-volume regions",
            "type": "boolean",
            "description": "Also list regions where Google has too little data (value 0, lowVolume: true).",
            "default": false
          },
          "relatedQueries": {
            "title": "Related queries (top and rising)",
            "type": "boolean",
            "description": "Up to 25 top and 25 rising related searches per term; rising ones show the increase (%) or \"breakout\".",
            "default": true
          },
          "relatedTopics": {
            "title": "Related topics",
            "type": "boolean",
            "description": "Top and rising related topics per term. Google often returns this list empty to callers without a signed-in session; it is then an empty list.",
            "default": false
          },
          "trendingGeos": {
            "title": "Countries for Trending now (optional)",
            "type": "array",
            "description": "Country codes (US, GB, DE, IN, JP, TW ...), one per line: what people search for right now, as on trends.google.com/trending, with search volume, increase, start time, category, related searches and news articles for the top items.",
            "items": {
              "type": "string"
            }
          },
          "trendingHours": {
            "title": "Trending in the past",
            "enum": [
              "4",
              "24",
              "48",
              "168"
            ],
            "type": "string",
            "description": "Time window of the Trending Now list (searches trending in the past 4 hours, 24 hours, 48 hours or 7 days).",
            "default": "24"
          },
          "trendingCategories": {
            "title": "Trending categories (optional)",
            "type": "array",
            "description": "Keep only trending searches in these 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"
              ]
            }
          },
          "trendingActiveOnly": {
            "title": "Only trends that are still active",
            "type": "boolean",
            "description": "Skip trends that have already ended.",
            "default": false
          },
          "maxTrendingPerGeo": {
            "title": "Max trending searches per country",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Google lists up to a few hundred per country and period; the top ones come first.",
            "default": 100
          },
          "onlyNew": {
            "title": "Only new (for scheduled runs)",
            "type": "boolean",
            "description": "Compare with the previous runs of the same monitor: trending searches seen before are skipped (free), and each report lists the rising related queries that are new since the last run (newRisingQueries). Keys are remembered for 30 days.",
            "default": false
          },
          "monitorName": {
            "title": "Monitor name",
            "type": "string",
            "description": "Name of the saved state (letters, digits, dashes). Use one name per schedule; empty = derived from the first search.",
            "default": ""
          },
          "csvExport": {
            "title": "CSV files",
            "type": "boolean",
            "description": "Also save long-format CSV files in the run's key-value store: INTEREST_OVER_TIME.csv (search, term, date, value), INTEREST_BY_REGION.csv, RELATED_QUERIES.csv and TRENDING_NOW.csv. Free.",
            "default": true
          },
          "language": {
            "title": "Language of names and dates",
            "type": "string",
            "description": "Language code for region names, topic names and formatted dates, e.g. en-US, de, ja, zh-TW.",
            "default": "en-US"
          },
          "httpVia": {
            "title": "Requests from",
            "enum": [
              "auto",
              "backend",
              "direct"
            ],
            "type": "string",
            "description": "Google Trends rate-limits busy IP addresses (HTTP 429). The search itself (explore) always runs from Apify's network or your proxy because it needs a session cookie; the chart data can also come from our servers in the US, Singapore and Europe. Every route uses our honest TidyTools user agent and respects robots.txt.",
            "default": "auto"
          },
          "proxyConfiguration": {
            "title": "Proxy (optional)",
            "type": "object",
            "description": "Only used for requests sent from Apify's network. Apify proxy usage is billed to your Apify account."
          },
          "maxConcurrency": {
            "title": "Searches in parallel",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Google Trends is strict about bursts; 1-2 is the most reliable.",
            "default": 2
          },
          "maxRetries": {
            "title": "Retries per request",
            "minimum": 0,
            "maximum": 12,
            "type": "integer",
            "description": "How often a rate-limited request is retried (waiting 2, 4, 8 ... up to 45 seconds, with a fresh session).",
            "default": 6
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}