{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Trends Scraper - Reliable Interest, Regions & Trending",
    "description": "Google Trends without login: interest over time, interest by region, top and rising related queries, and the real-time Trending now list with search volume and news URLs. Compare up to 5 terms. Refused requests are retried and reported. Empty results, partial rows and duplicates are free.",
    "version": "0.0",
    "x-build-id": "PkUDfstKQgNMmYbyQ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/lanternlab318~google-trends/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-lanternlab318-google-trends",
        "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/lanternlab318~google-trends/runs": {
      "post": {
        "operationId": "runs-sync-lanternlab318-google-trends",
        "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/lanternlab318~google-trends/run-sync": {
      "post": {
        "operationId": "run-sync-lanternlab318-google-trends",
        "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 to five search terms, compared in one chart the way Google Trends compares them. With more than one term the values of the series and of the regional breakdown are normalised across the group, so they can be read against each other. Leave this empty and set \"Trending now country\" below to collect only the real-time trending list.",
            "items": {
              "type": "string"
            }
          },
          "geo": {
            "title": "Region",
            "type": "string",
            "description": "Google Trends region code: empty for worldwide, \"US\", \"RU\", \"DE\" for a country, or a subregion such as \"US-NY\" or \"RU-MOW\". The regional breakdown is then one level below what you ask for: countries for worldwide, states or oblasts for a country.",
            "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 window the series and the related lists cover. Google's own resolution follows the window: minutes for the hourly windows, days for a few months, weeks for a year, months for five years.",
            "default": "today 12-m"
          },
          "category": {
            "title": "Category",
            "minimum": 0,
            "type": "integer",
            "description": "Google Trends category number to restrict the search to, 0 for all categories. The numbers are Google's own (for example 7 Finance, 71 Food & Drink, 174 Beauty & Fitness).",
            "default": 0
          },
          "includeRegions": {
            "title": "Interest by region",
            "type": "boolean",
            "description": "Collect the regional breakdown as well: one row per region Google reports, with its code, its name and its value.",
            "default": true
          },
          "includeRelated": {
            "title": "Related queries",
            "type": "boolean",
            "description": "Collect the related lists as well: the top queries for the period and the fastest-rising ones, plus the related topics when Google offers them for the term.",
            "default": true
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Interface language of the response, as a BCP-47 tag: \"en-US\", \"ru-RU\", \"de-DE\". It decides the language of region names and of the trending titles, not which data Google has.",
            "default": "en-US"
          },
          "trendingNowGeo": {
            "title": "Trending now country",
            "type": "string",
            "description": "Two-letter country code to collect the real-time \"Trending now\" list for, for example \"US\" or \"RU\". Each trend comes with Google's rounded search volume, when it started rising, the queries grouped under it and the URLs of the news articles Google shows with it. Leave empty to skip this list.",
            "default": ""
          },
          "trendingNowHours": {
            "title": "Trending now window",
            "enum": [
              "4",
              "24",
              "48",
              "168"
            ],
            "type": "string",
            "description": "How far back the trending list reaches.",
            "default": "24"
          },
          "maxTrendingNow": {
            "title": "Max trends",
            "minimum": 1,
            "type": "integer",
            "description": "Upper bound on the rows the trending list may produce. Google returns a few hundred trends for a large country.",
            "default": 100
          },
          "maxUpstreamRequests": {
            "title": "Max Google Trends requests",
            "minimum": 1,
            "type": "integer",
            "description": "Hard ceiling on the HTTP requests this run sends to Google Trends: the cookie handshake, the explore call, every section and every retry together. At the ceiling collection stops - the sections not reached are written with partialReason \"upstream_request_cap\" and the run then ends normally. Leave empty and the Actor works a ceiling out from your input, so a run is never unbounded."
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "The proxy the requests to Google Trends go through. The default (Apify Proxy, datacenter) is the cheapest and is what this Actor is measured on. A refused request is retried from a different exit IP automatically; pick residential groups here only if you see refusals on your own account.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}