{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Trends Scraper",
    "description": "Google Trends scraper and API, no browser. Interest over time, interest by region and city, related queries and topics. Compare unlimited keywords on one scale (Google caps at 5). Same fields as the official scraper, faster and cheaper. $1.49 per 1,000.",
    "version": "0.1",
    "x-build-id": "BLhI9BJhMtNEMlAZT"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/reportable_broth~google-trends-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-reportable_broth-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/reportable_broth~google-trends-scraper/runs": {
      "post": {
        "operationId": "runs-sync-reportable_broth-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/reportable_broth~google-trends-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-reportable_broth-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 line gets its own result. Turn on 'Compare terms in one line' to put comma-separated terms on the same chart.",
            "items": {
              "type": "string"
            }
          },
          "isMultiple": {
            "title": "Compare terms in one line",
            "type": "boolean",
            "description": "Treat commas as separators: 'nike, adidas, puma' is compared on one chart (up to 5 per chart, the Google Trends limit).",
            "default": false
          },
          "compareAllTerms": {
            "title": "Compare ALL terms on one scale (no 5-term limit)",
            "type": "boolean",
            "description": "Google Trends only compares 5 terms at a time and rescales every chart to its own peak, so numbers from different charts can't be compared. This chains the charts through a shared anchor term and puts every term on one 0-100 scale, ranked by average interest. Returns interest over time only.",
            "default": false
          },
          "anchorTerm": {
            "title": "Anchor term (for Compare ALL)",
            "type": "string",
            "description": "The term shared by every chart. Pick one of mid popularity. Default: the first search term."
          },
          "startUrls": {
            "title": "Google Trends URLs",
            "type": "array",
            "description": "Paste explore URLs from trends.google.com. Terms, region, time range, category and search type are taken from the URL.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "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": "Preset time range.",
            "default": "today 12-m"
          },
          "customTimeRange": {
            "title": "Custom time range",
            "type": "string",
            "description": "Overrides Time range. Format: 2024-01-01 2024-06-30"
          },
          "geo": {
            "title": "Region",
            "type": "string",
            "description": "Empty for worldwide, a country code (US, GB, JP, TW) or a region code (US-CA, GB-ENG).",
            "default": ""
          },
          "category": {
            "title": "Category ID",
            "type": "integer",
            "description": "0 = all categories. Take the number from the cat= part of a Trends URL (e.g. 7 = Finance, 71 = Food & Drink).",
            "default": 0
          },
          "searchType": {
            "title": "Search type",
            "enum": [
              "web",
              "images",
              "news",
              "youtube",
              "shopping"
            ],
            "type": "string",
            "description": "Which Google search the interest comes from.",
            "default": "web"
          },
          "includeInterestByRegion": {
            "title": "Interest by region",
            "type": "boolean",
            "description": "Countries, states or cities where the term is most popular.",
            "default": true
          },
          "regionResolution": {
            "title": "Region level",
            "enum": [
              "AUTO",
              "COUNTRY",
              "REGION",
              "DMA"
            ],
            "type": "string",
            "description": "Automatic = countries for worldwide, regions/states for a country. Metro areas (DMA) work for the US.",
            "default": "AUTO"
          },
          "includeRelatedQueries": {
            "title": "Related queries",
            "type": "boolean",
            "description": "Top and rising searches related to the term.",
            "default": true
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Language of topic names and dates, e.g. en-US, de, ja, zh-TW.",
            "default": "en-US"
          },
          "maxConcurrency": {
            "title": "Parallel searches",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many terms to fetch at the same time.",
            "default": 5
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Every search uses a fresh IP and a fresh Google cookie.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}