{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Trends Scraper",
    "description": "Google Trends Scraper, $0.35 per 1,000 keywords on Free ($0.25 on Business): interest over time with average, peak and change, interest by region, top and rising related queries. Compare 5 keywords on Google's scale, or more through an anchor. Any country, date range and search type. No login.",
    "version": "0.1",
    "x-build-id": "SE1sqWIda6b2bmknA"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/fetchwright~google-trends-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-fetchwright-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/fetchwright~google-trends-scraper/runs": {
      "post": {
        "operationId": "runs-sync-fetchwright-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/fetchwright~google-trends-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-fetchwright-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": {
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Search terms to look up on Google Trends, one per line, for example **bitcoin**, **heat pump** or **running shoes**. Duplicates are removed, ignoring upper and lower case. You pay $0.35 per 1,000 keyword results; keywords without enough search interest are never charged.",
            "items": {
              "type": "string"
            }
          },
          "maxKeywords": {
            "title": "Maximum keywords",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Read at most this many keywords, for example **10** for a quick test or **1000** for a large list from a dataset. It caps the cost of a run at $0.35 per 1,000 keywords. Default: 100. Up to 5,000.",
            "default": 100
          },
          "geo": {
            "title": "Location",
            "type": "string",
            "description": "Country or region, for example **US**, **GB** (or **UK**), **Germany**, or a region code such as **US-CA** or **GB-SCT**. Leave empty for worldwide. Unknown values stop the run at once with a hint. Default: US.",
            "default": "US"
          },
          "timeRange": {
            "title": "Time range",
            "enum": [
              "past-hour",
              "past-4-hours",
              "past-day",
              "past-7-days",
              "past-30-days",
              "past-90-days",
              "past-12-months",
              "past-5-years",
              "all-time"
            ],
            "type": "string",
            "description": "The period to look at, for example **Past 12 months** (the default) or **Past 5 years**. Shorter ranges give finer points: the past hour by the minute, the past day in 8-minute steps, the past 7 days by the hour, 12 months and 5 years by the week, 2004 to today by the month. For exact dates, set a start date below instead.",
            "default": "past-12-months"
          },
          "compareKeywords": {
            "title": "Compare keywords on one scale",
            "type": "boolean",
            "description": "Off: each keyword gets its own 0-100 scale. On: keywords share one scale, so you can say \"nike is searched about twice as much as adidas\", for example. Up to 5 are compared exactly as on Google Trends; more than 5 are linked through an anchor keyword (set it under \"Exact dates and more than 5 keywords\") and put on one scale too. You still pay once per keyword. Default: off.",
            "default": false
          },
          "startDate": {
            "title": "Start date (custom range)",
            "type": "string",
            "description": "Optional. Start of an exact date range, for example **2024-01-01**. When set, it replaces the time range. Data begins on 2004-01-01. Leave empty to use the time range."
          },
          "endDate": {
            "title": "End date (custom range)",
            "type": "string",
            "description": "Optional. End of the exact date range, for example **2024-12-31**. Leave empty for today. Used only together with a start date."
          },
          "anchorKeyword": {
            "title": "Anchor keyword (more than 5 compared)",
            "type": "string",
            "description": "Optional. With more than 5 keywords compared, the keywords are read in groups that all include this keyword, and its values link the groups onto one scale. Pick one of your keywords of middling popularity, for example **adidas** in a list of sports brands. Leave empty to use the first keyword."
          },
          "includeTimeline": {
            "title": "Interest over time",
            "type": "boolean",
            "description": "Every point of the time range with its 0-100 value and whether the period is still incomplete, plus average, peak, latest value and change over the range, for example to chart a trend. Default: on.",
            "default": true
          },
          "includeRegions": {
            "title": "Interest by region",
            "type": "boolean",
            "description": "Where the keyword is searched most, for example US states for the US, or countries for a worldwide search, each with a 0-100 value and its code. Default: on.",
            "default": true
          },
          "regionResolution": {
            "title": "Region detail",
            "enum": [
              "auto",
              "country",
              "region",
              "city",
              "metro"
            ],
            "type": "string",
            "description": "How fine the regional breakdown is, for example **City** for cities or **Metro area** for US metro areas. Auto gives states or provinces for a country and countries for a worldwide search. Default: auto.",
            "default": "auto"
          },
          "includeLowVolumeRegions": {
            "title": "Include low search volume regions",
            "type": "boolean",
            "description": "Also list regions with little search volume, as the option of the same name on Google Trends does, for example small cities. Leave empty for the default: on for cities (otherwise most cities show no data), off for countries, states and metro areas."
          },
          "includeRelated": {
            "title": "Related queries and topics",
            "type": "boolean",
            "description": "Top and rising searches made together with the keyword, for example \"bitcoin price\" (top) or a new product name marked as Breakout (rising): related queries for every keyword, and related topics for single keywords only (Google does not show related topics for compared keywords). Default: on.",
            "default": true
          },
          "searchType": {
            "title": "Search type",
            "enum": [
              "web",
              "youtube",
              "news",
              "images",
              "shopping"
            ],
            "type": "string",
            "description": "Which Google search to measure, for example **YouTube** for video searches or **Shopping** for product searches. Default: web search.",
            "default": "web"
          },
          "category": {
            "title": "Category",
            "minimum": 0,
            "type": "integer",
            "description": "Optional. Google Trends category number to narrow an ambiguous keyword, for example **7** for Finance or **0** for all categories (the default). The number is the one after cat= in a Google Trends link.",
            "default": 0
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Language of region names and related topics, for example **en-US** (the default), **de** or **pt-BR**. It does not change which searches are counted; the location does.",
            "default": "en-US"
          },
          "compareWithPreviousRun": {
            "title": "Compare with the previous run",
            "type": "boolean",
            "description": "For scheduled tracking, for example a weekly run on your keyword list. Each row then says what changed since the last run of the same watch: the change in latest value and in average, new and dropped related queries (top and rising), new Breakout queries, and regions that entered or left the top 10. The first run returns null. Only a few values per keyword are remembered, in a key-value store in your own account. Run one run of a watch at a time (for a schedule, turn on Apify's setting that does not start a new run while the previous one is still running): overlapping runs of the same watch can compare with the older run. No extra charge. Default: off.",
            "default": false
          },
          "watchName": {
            "title": "Watch name",
            "type": "string",
            "description": "Optional. Give each scheduled watch its own name, for example **brands-us-weekly**, so two watches on the same keywords keep separate records. Leave empty to identify the watch by keyword, location, time range and search type."
          },
          "keywordsDatasetId": {
            "title": "Read keywords from a dataset",
            "type": "string",
            "description": "Optional. Pick a dataset from another run, for example a keyword list or the results of a keyword or search Actor, and its keywords are added to the list above. Use it to chain Actors without exporting anything."
          },
          "keywordsDatasetField": {
            "title": "Dataset field",
            "type": "string",
            "description": "Name of the field that holds the keywords, for example **keyword** or **query**. Leave empty to detect it automatically (keyword, query, searchTarget, searchQuery, term, title, name, text)."
          },
          "maxConcurrency": {
            "title": "Keywords read at once",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "How many keywords are read in parallel, for example **3** (the default), from 1 to 5. How the speed of a run changes with this setting is not yet measured for this version. If Google asks for verification, keeps limiting or refuses the run, the run stops early and the keywords it did not finish are listed and not charged.",
            "default": 3
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Usually leave as it is (Apify Proxy, automatic). Whatever you choose, if Google asks for verification, keeps limiting or refuses the run, the run stops early: the keyword Google answered that way fails and is not charged, and the keywords not completed are listed and not charged.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}