{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Trends Scraper — Interest, Related, Now",
    "description": "Scrape Google Trends at scale: interest over time, interest by region, related topics & queries, trending-now searches with category/hours/status/sort filters, unified explore (TIMESERIES / GEO_MAP / RELATED_TOPICS / RELATED_QUERIES) and topic autocomplete.",
    "version": "1.0",
    "x-build-id": "wflyQwediWJABkRJg"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrape.badger~google-trends-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrape.badger-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/scrape.badger~google-trends-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrape.badger-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/scrape.badger~google-trends-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrape.badger-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",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "Interest Over Time",
              "Interest By Region",
              "Related Topics & Queries",
              "Trending Now",
              "Trending (legacy)",
              "Explore",
              "Autocomplete"
            ],
            "type": "string",
            "description": "Pick the Trends call to run. Each mode has different required inputs — see descriptions below.",
            "default": "Interest Over Time"
          },
          "q": {
            "title": "Search term(s)",
            "type": "string",
            "description": "Search term — up to 5 comma-separated terms for comparison (e.g. <b>python,javascript</b>). Required for <b>Interest Over Time</b>, <b>Interest By Region</b>, <b>Related Topics & Queries</b>, <b>Explore</b>, <b>Autocomplete</b>. Ignored by <b>Trending Now</b> / <b>Trending (legacy)</b>."
          },
          "geo": {
            "title": "Geo (country)",
            "type": "string",
            "description": "ISO 3166-1 alpha-2 country code (will be uppercased). Empty = worldwide (not valid for Trending modes). Examples: <b>US</b>, <b>GB</b>, <b>DE</b>, <b>LT</b>.",
            "default": "US"
          },
          "hl": {
            "title": "Language",
            "type": "string",
            "description": "Language code. Used by <b>Trending Now</b> and <b>Autocomplete</b>. Example: <b>en-US</b>, <b>de-DE</b>.",
            "default": "en-US"
          },
          "date": {
            "title": "Date range",
            "type": "string",
            "description": "Time range. Presets: <b>now 1-H</b>, <b>now 4-H</b>, <b>now 1-d</b>, <b>now 7-d</b>, <b>today 1-m</b>, <b>today 3-m</b>, <b>today 12-m</b>, <b>today 5-y</b>, <b>all</b>. Or custom range <b>YYYY-MM-DD YYYY-MM-DD</b>.",
            "default": "today 12-m"
          },
          "cat": {
            "title": "Category ID",
            "minimum": 0,
            "type": "integer",
            "description": "Numeric Google Trends category ID (0 = all categories). Applied only to <b>Explore</b>.",
            "default": 0
          },
          "gprop": {
            "title": "Property",
            "enum": [
              "",
              "images",
              "news",
              "youtube",
              "froogle"
            ],
            "type": "string",
            "description": "Google property to search. Empty = Web. Other: <b>images</b>, <b>news</b>, <b>youtube</b>, <b>froogle</b>. Applied only to <b>Explore</b>.",
            "default": ""
          },
          "data_type": {
            "title": "Explore data type",
            "enum": [
              "TIMESERIES",
              "GEO_MAP",
              "GEO_MAP_0",
              "RELATED_TOPICS",
              "RELATED_QUERIES"
            ],
            "type": "string",
            "description": "Which slice of Trends data the Explore mode should return.",
            "default": "TIMESERIES"
          },
          "tz": {
            "title": "Timezone offset (minutes)",
            "type": "string",
            "description": "Timezone offset in minutes from UTC. Example: <b>0</b> (UTC), <b>-240</b> (EDT), <b>120</b> (CEST). Used by <b>Explore</b> and <b>Autocomplete</b>.",
            "default": "0"
          },
          "hours": {
            "title": "Look-back window (hours)",
            "enum": [
              "4",
              "24",
              "48",
              "168"
            ],
            "type": "string",
            "description": "How far back to look for trending searches.",
            "default": "24"
          },
          "category": {
            "title": "Trending category",
            "enum": [
              "all",
              "business",
              "entertainment",
              "health",
              "sci_tech",
              "sports",
              "top_stories"
            ],
            "type": "string",
            "description": "Filter trending searches by category.",
            "default": "all"
          },
          "status": {
            "title": "Trend status",
            "enum": [
              "all",
              "active"
            ],
            "type": "string",
            "description": "<b>all</b> or <b>active</b> (only trends with non-zero search volume).",
            "default": "all"
          },
          "sort": {
            "title": "Sort order",
            "enum": [
              "relevance",
              "search_volume",
              "title",
              "recency"
            ],
            "type": "string",
            "description": "How Trending Now results are ordered.",
            "default": "relevance"
          },
          "max_pages": {
            "title": "Max pages",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Currently applied only to <b>Trending Now</b> for forward-compatibility. Every mode = 1 API call per page.",
            "default": 1
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}