{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Trends Scraper: Interest, Related Queries & Trending",
    "description": "Google Trends data for any keywords: interest over time, interest by country/region/city, related queries and topics (top and rising), comparisons of up to 5 terms and today's Trending now searches by country. Automatic retries, so runs don't fail on Google's rate limits. Pay per term.",
    "version": "1.0",
    "x-build-id": "9weUfOvO0P8xmSQiM"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/fguiraud~google-trends-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-fguiraud-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/fguiraud~google-trends-scraper/runs": {
      "post": {
        "operationId": "runs-sync-fguiraud-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/fguiraud~google-trends-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-fguiraud-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 query per line. To compare terms on the same scale, put up to 5 on one line separated by commas (e.g. 'python, javascript, rust'). You can also paste a Google Trends link (trends.google.com/trends/explore?...): it keeps its own countries, dates and filters. Google topic IDs such as '/m/0dl567' work too. Each plain line is run for every geo below.",
            "items": {
              "type": "string"
            }
          },
          "geo": {
            "title": "Countries or regions",
            "type": "array",
            "description": "Where to measure: country codes (US, GB, DE, BR...), regions (US-CA, GB-SCT...) or 'worldwide'. Several values run each query once per geo.",
            "items": {
              "type": "string"
            }
          },
          "timeframe": {
            "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 analyze. Hourly data for the last hours or days, daily data up to 9 months, weekly and monthly beyond.",
            "default": "today 12-m"
          },
          "customTimeRange": {
            "title": "Custom time range",
            "type": "string",
            "description": "Optional exact dates instead of the time range above, as 'YYYY-MM-DD YYYY-MM-DD' (e.g. '2024-01-01 2024-06-30')."
          },
          "outputs": {
            "title": "What to return",
            "type": "array",
            "description": "'interestOverTime': 0-100 interest per date. 'interestByRegion': 0-100 interest per country, region or city. 'relatedQueries': top and rising (breakout) searches related to each term. 'relatedTopics': related topics, only when Google provides them (currently empty for most queries). Fewer outputs make each query faster.",
            "items": {
              "type": "string",
              "enum": [
                "interestOverTime",
                "interestByRegion",
                "relatedQueries",
                "relatedTopics"
              ],
              "enumTitles": [
                "Interest over time",
                "Interest by region",
                "Related queries",
                "Related topics (often empty)"
              ]
            },
            "default": [
              "interestOverTime",
              "interestByRegion",
              "relatedQueries"
            ]
          },
          "searchProperty": {
            "title": "Search type",
            "enum": [
              "web",
              "images",
              "news",
              "shopping",
              "youtube"
            ],
            "type": "string",
            "description": "Which Google search to measure: web search, image search, news, Google Shopping or YouTube.",
            "default": "web"
          },
          "trendingNow": {
            "title": "Trending now (countries)",
            "type": "array",
            "description": "Also get today's trending searches for these countries (e.g. US, GB, IN), with approximate search volume and related news articles. Works on its own, without search terms.",
            "items": {
              "type": "string"
            }
          },
          "monitorRising": {
            "title": "Monitor new rising searches",
            "type": "boolean",
            "description": "For scheduled runs: remember the rising related searches of each query (in a key-value store named 'google-trends-monitor' in your account) and list in 'newRising' only the ones that are new since the previous run. Ideal for weekly content-idea or brand alerts.",
            "default": false
          },
          "regionResolution": {
            "title": "Region detail",
            "enum": [
              "auto",
              "COUNTRY",
              "REGION",
              "CITY",
              "DMA"
            ],
            "type": "string",
            "description": "Level of 'Interest by region'. Auto: countries for worldwide queries, regions/states within a country. City and DMA (US metro areas) give more detail.",
            "default": "auto"
          },
          "includeLowVolumeRegions": {
            "title": "Include low search volume regions",
            "type": "boolean",
            "description": "Also return regions and cities with little search volume (Google's checkbox of the same name). Recommended for city-level detail, where most cities are otherwise hidden.",
            "default": false
          },
          "category": {
            "title": "Category ID",
            "minimum": 0,
            "type": "integer",
            "description": "Google Trends category to narrow the meaning of a term (0 = all categories). Examples: 5 Computers & Electronics, 7 Finance, 45 Health, 71 Food & Drink, 958 Jobs & Education. The ID is the 'cat=' value in a Google Trends URL.",
            "default": 0
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Language for region names, topics and labels, e.g. en-US, es, de, fr, pt-BR.",
            "default": "en-US"
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Apify Proxy spreads requests over several IPs so Google's rate limits hit less often. Recommended.",
            "default": {
              "useApifyProxy": true
            }
          },
          "maxConcurrency": {
            "title": "Parallel queries",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many queries run at the same time, each on its own session. More is faster but may meet rate limits sooner.",
            "default": 3
          },
          "failOnError": {
            "title": "Fail the run if a query fails",
            "type": "boolean",
            "description": "Mark the run as FAILED when any query returns no data after all retries. Useful for monitoring pipelines.",
            "default": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}