{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Trends Scraper — API & Trending Now | $0.50/1k keywords",
    "description": "Google Trends without a login or API key, one result per keyword: interest over time, interest by region and top/rising related queries nested in one row for $0.0005. Compare up to 5 terms in any country, time range or category. Plus Trending now per country with traffic and news.",
    "version": "0.1",
    "x-build-id": "xMeTFnTrpoZoofMP6"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/glasswing~google-trends-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-glasswing-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/glasswing~google-trends-scraper/runs": {
      "post": {
        "operationId": "runs-sync-glasswing-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/glasswing~google-trends-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-glasswing-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 term per line; each term is one result row. To compare terms on one 0-100 scale, put up to 5 on one line separated by commas, e.g. `coffee, tea, matcha` (one row per term, scaled together). Topic ids such as `/m/02vqfm` work too.",
            "items": {
              "type": "string"
            }
          },
          "geo": {
            "title": "Location",
            "type": "string",
            "description": "Country or region code as Google Trends uses it: `US`, `GB`, `DE`, `US-CA`, `GB-ENG`. 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 read. Ignored when a custom start date is set below.",
            "default": "today 12-m"
          },
          "startDate": {
            "title": "Custom start date",
            "type": "string",
            "description": "Optional custom range start, YYYY-MM-DD (from 2004-01-01). Overrides the time range."
          },
          "endDate": {
            "title": "Custom end date",
            "type": "string",
            "description": "Optional custom range end, YYYY-MM-DD. Defaults to today when only a start date is set."
          },
          "category": {
            "title": "Category id",
            "minimum": 0,
            "type": "integer",
            "description": "Google Trends category id to narrow the searches (0 = all categories). Examples: 71 Food & Drink, 3 Arts & Entertainment, 5 Computers & Electronics, 7 Finance, 20 Sports.",
            "default": 0
          },
          "property": {
            "title": "Search type",
            "enum": [
              "web",
              "images",
              "news",
              "youtube",
              "froogle"
            ],
            "type": "string",
            "description": "Which Google search to read: web search, image search, news search, YouTube search or Google Shopping.",
            "default": "web"
          },
          "includeInterestOverTime": {
            "title": "Interest over time",
            "type": "boolean",
            "description": "Interest 0-100 for every date of the time range (`interestOverTime`, or one row per date in the flat format).",
            "default": true
          },
          "includeInterestByRegion": {
            "title": "Interest by region",
            "type": "boolean",
            "description": "Interest per country, state, city or metro area (`interestByRegion`, or one row per region in the flat format).",
            "default": true
          },
          "regionResolution": {
            "title": "Region level",
            "enum": [
              "auto",
              "COUNTRY",
              "REGION",
              "CITY",
              "DMA"
            ],
            "type": "string",
            "description": "Level of the regions. Automatic = what Google Trends shows for the location (countries worldwide, subregions in a country). Cities and metro areas (DMA, US only) need a country location.",
            "default": "auto"
          },
          "includeRelatedQueries": {
            "title": "Related queries",
            "type": "boolean",
            "description": "Top and rising related queries (`relatedQueries`, or one row per query in the flat format); rising values above +5000% read Breakout.",
            "default": true
          },
          "outputFormat": {
            "title": "Output format",
            "enum": [
              "perTerm",
              "rows"
            ],
            "type": "string",
            "description": "One row per keyword (default) = one result per search term with interest over time, interest by region and related queries nested inside, so one keyword costs one result. One row per data point = flat rows for spreadsheets and BI tools; every date, region and related query is its own billed result (about 150 per keyword for 12 months).",
            "default": "perTerm"
          },
          "trendingGeos": {
            "title": "Trending now: countries",
            "type": "array",
            "description": "Country codes for the Google Trends Trending now list (e.g. US, GB, DE, IN). One row per trending search with traffic, start time, related queries and news articles.",
            "items": {
              "type": "string"
            }
          },
          "trendingHours": {
            "title": "Trending now: period",
            "enum": [
              "4",
              "24",
              "48",
              "168"
            ],
            "type": "string",
            "description": "Trends that started in the past 4, 24 or 48 hours, or the past 7 days.",
            "default": "24"
          },
          "trendingCategory": {
            "title": "Trending now: category",
            "enum": [
              "0",
              "1",
              "2",
              "3",
              "4",
              "5",
              "6",
              "7",
              "8",
              "9",
              "10",
              "11",
              "13",
              "14",
              "15",
              "16",
              "17",
              "18",
              "19",
              "20"
            ],
            "type": "string",
            "description": "Only trends in this category.",
            "default": "0"
          },
          "trendingActiveOnly": {
            "title": "Trending now: active trends only",
            "type": "boolean",
            "description": "Skip trends that have already ended.",
            "default": false
          },
          "trendingNewsPerTrend": {
            "title": "Trending now: news articles per trend",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "How many related news articles (title, URL, source, time) to attach to each trend. 0 = none.",
            "default": 3
          },
          "startUrls": {
            "title": "Google Trends URLs",
            "type": "array",
            "description": "Optional: Google Trends explore URLs (https://trends.google.com/trends/explore?q=coffee&geo=US) or Trending now URLs (https://trends.google.com/trending?geo=US), copied from the browser. The built-in example is skipped when search terms or trending countries are given.",
            "default": [
              "https://trends.google.com/trends/explore?date=today%201-m&geo=US&q=coffee"
            ],
            "items": {
              "type": "string"
            }
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Language for region names and labels, e.g. en-US, de, fr, ja.",
            "default": "en-US"
          },
          "maxItems": {
            "title": "Maximum rows",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many rows have been saved. With one row per keyword that is the number of keywords (and trending searches); each saved row with status `ok` is one billable result, rows without data are free.",
            "default": 1000
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional. Works without a proxy; when Google Trends slows the run down on the Apify platform, the Actor switches to Apify Proxy (datacenter) by itself. Turn it on here to use rotating datacenter IPs from the start for large runs. Residential proxies are not needed.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}