{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Trends Scraper",
    "description": "Scrape google keyword trends, related kewords, trending keywords, news etc with advanced filtering support and historical data",
    "version": "1.0",
    "x-build-id": "lgMbTUXK3UkbfKHRm"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/curious_coder~google-trends-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-curious_coder-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/curious_coder~google-trends-scraper/runs": {
      "post": {
        "operationId": "runs-sync-curious_coder-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/curious_coder~google-trends-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-curious_coder-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": "Mode",
            "enum": [
              "keyword_trends",
              "trending_now"
            ],
            "type": "string",
            "description": "Choose what to scrape. 'Keyword Trends' returns interest-over-time, interest-by-region and related queries/topics for your keywords. 'Trending Now' returns the live real-time trending searches for a country.",
            "default": "keyword_trends"
          },
          "searchTerms": {
            "title": "1️⃣ Keyword Trends — Search terms",
            "type": "array",
            "description": "Keywords/topics to get trends for. Each keyword is scraped individually so it gets its own full data set. (Used only in 'Keyword Trends' mode.)",
            "items": {
              "type": "string"
            }
          },
          "geo": {
            "title": "Location (geo)",
            "type": "string",
            "description": "Two-letter country code (e.g. US, IN, GB) or a sub-region code (e.g. US-CA). Leave empty for Worldwide.",
            "default": ""
          },
          "timeRange": {
            "title": "Time period",
            "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": "Time range for interest data.",
            "default": "today 12-m"
          },
          "category": {
            "title": "Category",
            "type": "integer",
            "description": "Google Trends category id. 0 = All categories. Common: 3 Arts & Entertainment, 5 Computers & Electronics, 7 Finance, 8 Games, 12 Business & Industrial, 16 News, 18 Shopping, 20 Sports, 45 Beauty & Fitness, 65 Health, 71 Travel, 174 Science, 958 Jobs & Education.",
            "default": 0
          },
          "property": {
            "title": "Search property",
            "enum": [
              "",
              "images",
              "news",
              "youtube",
              "froogle"
            ],
            "type": "string",
            "description": "Which Google surface to measure interest on.",
            "default": ""
          },
          "includeInterestOverTime": {
            "title": "Include interest over time",
            "type": "boolean",
            "description": "Fetch the time-series of search interest.",
            "default": true
          },
          "includeInterestByRegion": {
            "title": "Include interest by region",
            "type": "boolean",
            "description": "Fetch the breakdown of interest by geographic region.",
            "default": true
          },
          "includeRelatedQueries": {
            "title": "Include related queries",
            "type": "boolean",
            "description": "Fetch top & rising related search queries.",
            "default": true
          },
          "includeRelatedTopics": {
            "title": "Include related topics",
            "type": "boolean",
            "description": "Fetch top & rising related topics.",
            "default": true
          },
          "trendingGeo": {
            "title": "2️⃣ Trending Now — Location",
            "type": "string",
            "description": "Two-letter country code for the real-time trending list (e.g. US, IN, GB). (Used only in 'Trending Now' mode.)",
            "default": "US"
          },
          "trendingHours": {
            "title": "Time period",
            "enum": [
              "4",
              "24",
              "48",
              "168"
            ],
            "type": "string",
            "description": "Trending window.",
            "default": "24"
          },
          "trendingCategory": {
            "title": "Category",
            "type": "integer",
            "description": "Trending category filter. 0 = All categories. Other ids select a topical category (e.g. Sports, Entertainment, Business).",
            "default": 0
          },
          "includeNews": {
            "title": "Include related news articles",
            "type": "boolean",
            "description": "Resolve and attach related news articles for each trend (extra requests).",
            "default": true
          },
          "newsArticlesPerTrend": {
            "title": "News articles per trend",
            "type": "integer",
            "description": "How many news articles to resolve per trend (when 'Include related news' is on).",
            "default": 3
          },
          "maxItems": {
            "title": "Max trends",
            "type": "integer",
            "description": "Limit the number of trending items returned (0 = no limit).",
            "default": 0
          },
          "hl": {
            "title": "Language (hl)",
            "type": "string",
            "description": "UI language code for labels, e.g. en-US, es, de.",
            "default": "en-US"
          },
          "tz": {
            "title": "Timezone offset (minutes)",
            "type": "integer",
            "description": "Timezone offset in minutes used for time bucketing (browser-style sign, e.g. -330 for IST). Default 0 (UTC).",
            "default": 0
          },
          "proxyCountryCode": {
            "title": "Proxy country",
            "type": "string",
            "description": "Optional country code (e.g. US, GB). Leave empty for any country.",
            "default": ""
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}