{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Trends Scraper & API - Interest, Regions & Queries",
    "description": "Scrape Google Trends for any keyword: interest over time, interest by region and related queries (cleaned of fake entries), plus the full Trending now list of any country. Compare up to 5 terms. Verified against the browser, agent-ready.",
    "version": "0.1",
    "x-build-id": "AXM5QHMiLuBue7b2S"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/surefeed~google-trends-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-surefeed-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/surefeed~google-trends-scraper/runs": {
      "post": {
        "operationId": "runs-sync-surefeed-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/surefeed~google-trends-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-surefeed-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 search per line. To compare up to 5 terms on the same 0–100 scale (like on Google Trends), put them on one line separated by commas, e.g. \"bitcoin, ethereum\". You can also paste a Google Trends explore link: its terms, location, period and category are used. Each term is one result.",
            "items": {
              "type": "string"
            }
          },
          "trendingCountries": {
            "title": "Trending now — countries",
            "type": "array",
            "description": "Trending searches right now for each country, with estimated search volume, growth, start time, categories and related queries. Two-letter country codes, e.g. US, GB, IT, DE.",
            "items": {
              "type": "string"
            }
          },
          "trendingHours": {
            "title": "Trending in the past",
            "enum": [
              "4",
              "24",
              "48",
              "168"
            ],
            "type": "string",
            "description": "Time window for trending searches.",
            "default": "24"
          },
          "trendingCategories": {
            "title": "Trending categories",
            "type": "array",
            "description": "Optional: keep only trends in these categories. Empty = all.",
            "items": {
              "type": "string",
              "enum": [
                "Autos and Vehicles",
                "Beauty and Fashion",
                "Business and Finance",
                "Climate",
                "Entertainment",
                "Food and Drink",
                "Games",
                "Health",
                "Hobbies and Leisure",
                "Jobs and Education",
                "Law and Government",
                "Other",
                "Pets and Animals",
                "Politics",
                "Science",
                "Shopping",
                "Sports",
                "Technology",
                "Travel and Transportation"
              ]
            },
            "default": []
          },
          "trendingActiveOnly": {
            "title": "Only trends still active",
            "type": "boolean",
            "description": "Skip trends that have already ended.",
            "default": false
          },
          "maxTrendingPerCountry": {
            "title": "Max trending searches per country",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Keep at most this many trends per country, in Google's order (the 7-day list can hold 1,000+).",
            "default": 100
          },
          "geo": {
            "title": "Location",
            "type": "string",
            "description": "Where the searches come from. Empty = worldwide. A country (\"US\", \"IT\") or a region (\"US-CA\", \"IT-25\"), as in the geo= part of a Google Trends link.",
            "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": "Period to analyse. Google picks the granularity: hours for the past day, days up to ~9 months, weeks for longer periods.",
            "default": "today 12-m"
          },
          "customTimeRange": {
            "title": "Custom time range",
            "type": "string",
            "description": "Optional. Overrides \"Time range\": two dates, e.g. \"2025-01-01 2025-12-31\"."
          },
          "searchType": {
            "title": "Search type",
            "enum": [
              "",
              "images",
              "news",
              "froogle",
              "youtube"
            ],
            "type": "string",
            "description": "Which Google search to measure.",
            "default": ""
          },
          "category": {
            "title": "Category",
            "minimum": 0,
            "type": "integer",
            "description": "Optional Google Trends category id to narrow the meaning of a term (0 = all categories). Examples: 7 Finance, 71 Food & Drink, 958 Jobs & Education, 18 Shopping. You can copy the number from cat= in a Google Trends link.",
            "default": 0
          },
          "interestOverTime": {
            "title": "Interest over time",
            "type": "boolean",
            "description": "The 0–100 popularity timeline, its average and the peak date.",
            "default": true
          },
          "interestByRegion": {
            "title": "Interest by region",
            "type": "boolean",
            "description": "Where the term is most popular (countries, or regions inside the chosen country).",
            "default": true
          },
          "regionResolution": {
            "title": "Region detail",
            "enum": [
              "",
              "COUNTRY",
              "REGION",
              "CITY",
              "DMA"
            ],
            "type": "string",
            "description": "Level of detail for \"Interest by region\". Automatic = countries worldwide, regions inside a country.",
            "default": ""
          },
          "relatedQueries": {
            "title": "Related queries",
            "type": "boolean",
            "description": "Top and rising searches related to the term (rising ones show growth, e.g. +250% or Breakout).",
            "default": true
          },
          "hideUnrelatedQueries": {
            "title": "Clean up related queries",
            "type": "boolean",
            "description": "Google sometimes mixes unrelated entries into the related queries it sends to automated tools (e.g. \"black friday\" rising → \"laptop stand\"), or replaces a whole list (e.g. \"running shoes\" → \"hotel booking, coffee grinder…\"). When on, a list made only of unrelated entries is requested again, rising queries that share no word with your term are dropped, and relatedQueriesRemoved tells how many. Turn off to get Google's raw lists.",
            "default": true
          },
          "proxyType": {
            "title": "Accuracy mode",
            "enum": [
              "local",
              "datacenter"
            ],
            "type": "string",
            "description": "Google Trends computes its numbers on a sample that depends on the viewer's country, so the same search can differ by a few points between countries. \"Local\" looks from a residential IP in the country you analyse (or the US for worldwide), so results match what people there see in their browser. \"Datacenter\" is slightly cheaper and faster but shows the US sample.",
            "default": "local"
          },
          "proxyCountry": {
            "title": "Look from country",
            "type": "string",
            "description": "Optional. Two-letter country to look from in Local mode, if different from Location (e.g. analyse worldwide data as seen from Italy: IT)."
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Language of region and topic names, e.g. en-US, it, de, fr, es.",
            "default": "en-US"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}