{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Trends Scraper — Interest, Regions & Related Queries",
    "description": "Google Trends data for any search term: interest over time, interest by region, related queries and topics. Compare up to 5 terms. No proxies.",
    "version": "1.0",
    "x-build-id": "yJMW773SmzYZfcgog"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/cheapapi~google-trends-scraper-pro/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-cheapapi-google-trends-scraper-pro",
        "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/cheapapi~google-trends-scraper-pro/runs": {
      "post": {
        "operationId": "runs-sync-cheapapi-google-trends-scraper-pro",
        "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/cheapapi~google-trends-scraper-pro/run-sync": {
      "post": {
        "operationId": "run-sync-cheapapi-google-trends-scraper-pro",
        "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",
            "maxItems": 1000,
            "type": "array",
            "description": "Words or phrases to look up in Google Trends, e.g. <code>coffee</code>, <code>iphone 17</code>. Terms are compared in groups of up to 5 (Google Trends values are relative within a comparison) — change this under <b>Advanced: comparison & data</b>. Characters Google Trends rejects (such as <code>- + : ( ) \"</code>) are replaced with spaces.",
            "items": {
              "type": "string"
            }
          },
          "trendsUrls": {
            "title": "Google Trends URLs (optional)",
            "maxItems": 1000,
            "type": "array",
            "description": "Paste Google Trends explore URLs, e.g. <code>https://trends.google.com/trends/explore?date=today%205-y&amp;geo=US&amp;q=coffee,tea</code>. Each URL is one query and keeps exactly the settings from the URL: search terms (<code>q</code>, up to 5), country (<code>geo</code>), time range (<code>date</code>), category (<code>cat</code>), Google property (<code>gprop</code>) and language (<code>hl</code>). Anything the URL leaves out uses Google Trends' defaults (worldwide, past 12 months, web search, all categories) — the Country and Time range fields below apply to Search terms only.",
            "items": {
              "type": "string"
            }
          },
          "country": {
            "title": "Country",
            "type": "string",
            "description": "2-letter country code (e.g. <code>US</code>, <code>GB</code>, <code>DE</code>) or English country name (e.g. <code>Germany</code>). Leave empty for worldwide data. Applies to Search terms (URLs carry their own <code>geo</code>).",
            "default": ""
          },
          "timeRange": {
            "title": "Time range",
            "enum": [
              "pastHour",
              "past4Hours",
              "pastDay",
              "past7Days",
              "past30Days",
              "past90Days",
              "past12Months",
              "past5Years",
              "since2004",
              "since2008"
            ],
            "type": "string",
            "description": "Period to analyse for Search terms. Ignored when you set custom dates in the advanced options. URLs carry their own <code>date</code>.",
            "default": "past12Months"
          },
          "compareTerms": {
            "title": "Compare terms against each other",
            "type": "boolean",
            "description": "On: terms are compared in groups of up to 5 (values are relative to the most popular term in the group, like the comparison view on Google Trends). Off: every term is looked up on its own (each term gets its own 0–100 scale; each term then counts as a separate query for pricing).",
            "default": true
          },
          "includeInterestOverTime": {
            "title": "Interest over time",
            "type": "boolean",
            "description": "Timeline of relative search interest (0–100) for each term.",
            "default": true
          },
          "includeInterestByRegion": {
            "title": "Interest by region",
            "type": "boolean",
            "description": "Relative interest per region (country-wide searches return states/provinces; worldwide searches return countries).",
            "default": true
          },
          "includeRelatedQueries": {
            "title": "Related queries",
            "type": "boolean",
            "description": "Top and rising related search queries for each term.",
            "default": true
          },
          "includeRelatedTopics": {
            "title": "Related topics",
            "type": "boolean",
            "description": "Top and rising related topics (entities such as brands, people, places) for each term.",
            "default": true
          },
          "maxRelatedItems": {
            "title": "Max related items per list",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum number of items kept in each top/rising list of related queries and related topics.",
            "default": 25
          },
          "searchType": {
            "title": "Google property",
            "enum": [
              "web",
              "images",
              "news",
              "shopping",
              "youtube"
            ],
            "type": "string",
            "description": "Which Google search to analyse, like the 'Web search / Image search / News search / Google Shopping / YouTube search' switch on Google Trends.",
            "default": "web"
          },
          "categoryId": {
            "title": "Category ID",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Google Trends category to restrict the data to: the <code>cat=</code> number in a Google Trends URL. <code>0</code> = all categories. Examples: <code>71</code> Food &amp; Drink, <code>7</code> Finance, <code>18</code> Shopping, <code>32</code> Software. The full list of top-level categories and popular subcategories is in the README (Category IDs). Tip: pick a category on trends.google.com and copy <code>cat</code> from the address bar. With a category and no search terms you get the trend of the whole category.",
            "default": 0
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "ISO language code (e.g. <code>en</code>, <code>de</code>, <code>es</code>, <code>pt-BR</code>) used for the names of related topics and categories. It does not change the interest numbers.",
            "default": "en"
          },
          "geoTargetId": {
            "title": "State / region / city (Google location ID)",
            "minimum": 1,
            "maximum": 100000000,
            "type": "integer",
            "description": "Optional. Numeric Google location ID (the public Google Ads geo target ID) of a state, region or city, e.g. <code>21167</code> New York state, <code>21137</code> California, <code>21176</code> Texas, <code>20339</code> England. The full list is Google's public geo targets file (developers.google.com/google-ads/api/data/geotargets). Overrides Country."
          },
          "dateFrom": {
            "title": "Custom start date",
            "pattern": "^(\\d{4}-\\d{2}-\\d{2})?$",
            "type": "string",
            "description": "Optional start date (YYYY-MM-DD). Earliest: 2004-01-01 for web search, 2008-01-01 for other properties. When set, Time range is ignored."
          },
          "dateTo": {
            "title": "Custom end date",
            "pattern": "^(\\d{4}-\\d{2}-\\d{2})?$",
            "type": "string",
            "description": "Optional end date (YYYY-MM-DD). Defaults to today when only a start date is given."
          },
          "processingSpeed": {
            "title": "Processing speed",
            "enum": [
              "auto",
              "fast",
              "economy"
            ],
            "type": "string",
            "description": "<b>Bronze, Silver, Gold and higher Apify plans always use bulk processing</b>: results take a few minutes, up to ~45 minutes at peak times, whatever you pick here (their lower prices are only possible in bulk). On the Free plan, Auto fetches small runs (up to 20 queries) instantly and processes larger runs in bulk. The price is the same in every mode. A query that is processed but returns no data is charged only the reduced \"query checked\" fee.",
            "default": "auto"
          },
          "maxQueries": {
            "title": "Max queries",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Optional cap on the number of queries in this run (one query = one comparison group of up to 5 terms, one term when comparison is off, or one Google Trends URL). Leave empty for no limit. You can also cap the spend with the run's maximum cost setting."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}