{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Trends Scraper – Interest, Regions & Trending Now",
    "description": "Extract Google Trends data: interest over time, interest by region, related queries and topics, keyword comparison (up to 5 terms) and Trending Now with search volume. No API key or login. A Google Trends API alternative. $1.50 per 1,000 keyword reports.",
    "version": "0.1",
    "x-build-id": "PchAsp3LYgBa1Z6dP"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/phantom-x64~google-trends-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-phantom-x64-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/phantom-x64~google-trends-scraper/runs": {
      "post": {
        "operationId": "runs-sync-phantom-x64-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/phantom-x64~google-trends-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-phantom-x64-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": "Keywords to analyze. One entry = one Google Trends query. Separate up to 5 terms with commas to COMPARE them on the same scale (\"chatgpt, gemini, claude\"). You can also paste a Google Trends explore URL (https://trends.google.com/trends/explore?q=...) or a topic id such as /m/05p0rrx.",
            "default": [
              "bitcoin",
              "chatgpt, gemini, claude"
            ],
            "items": {
              "type": "string"
            }
          },
          "geo": {
            "title": "Location",
            "type": "string",
            "description": "Country or region code: US, GB, ES, DE, US-CA, ES-GA... Leave empty for worldwide. Explore URLs keep their own geo.",
            "default": "US"
          },
          "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 analyze. Google picks the resolution: minutes (past hour/4 hours), 8 minutes (past day), hours (7 days), days (up to 9 months), weeks (12 months / 5 years), months (since 2004).",
            "default": "today 3-m"
          },
          "customTimeRange": {
            "title": "Custom time range (overrides the time range)",
            "type": "string",
            "description": "Optional exact period \"YYYY-MM-DD YYYY-MM-DD\", e.g. \"2024-01-01 2024-06-30\" (daily data up to ~9 months, weekly beyond). Leave empty to use the time range above."
          },
          "category": {
            "title": "Category id",
            "minimum": 0,
            "type": "integer",
            "description": "Google Trends category to narrow ambiguous terms (0 = all categories). Examples: 3 Arts & Entertainment, 5 Computers & Electronics, 7 Finance, 12 Business & Industrial, 16 News, 18 Shopping, 20 Sports, 44 Beauty & Fitness, 45 Health, 47 Autos & Vehicles, 67 Travel, 71 Food & Drink, 958 Jobs & Education. The id is the cat= value of a Trends URL.",
            "default": 0
          },
          "searchProperty": {
            "title": "Google property",
            "enum": [
              "web",
              "images",
              "news",
              "shopping",
              "youtube"
            ],
            "type": "string",
            "description": "Which Google search to measure: Web search (default), Image search, News search, Google Shopping or YouTube search.",
            "default": "web"
          },
          "compareAllTerms": {
            "title": "Compare all search terms together",
            "type": "boolean",
            "description": "Put every search term in a single comparison (max 5 terms), as if you had typed them with commas in one entry.",
            "default": false
          },
          "includeInterestOverTime": {
            "title": "Interest over time",
            "type": "boolean",
            "description": "Timeline of search interest (0-100) with average, peak, latest value and % change between the first and last quarter of the period.",
            "default": true
          },
          "includeInterestByRegion": {
            "title": "Interest by region",
            "type": "boolean",
            "description": "Search interest by country, subregion, metro area or city (for comparisons also the share of each term per region).",
            "default": true
          },
          "regionResolution": {
            "title": "Region level",
            "enum": [
              "AUTO",
              "COUNTRY",
              "REGION",
              "DMA",
              "CITY"
            ],
            "type": "string",
            "description": "Level of the region breakdown. Auto = countries for worldwide, subregions (states/provinces) for a country. Metro areas (DMA) exist mainly for the US.",
            "default": "AUTO"
          },
          "includeLowVolumeRegions": {
            "title": "Include low-volume regions",
            "type": "boolean",
            "description": "Also return regions where Google has too little data (value 0, has_data false).",
            "default": false
          },
          "maxRegions": {
            "title": "Max regions per term",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only the top N regions per term (0 = all).",
            "default": 250
          },
          "includeRelatedQueries": {
            "title": "Related queries",
            "type": "boolean",
            "description": "Top and rising related search queries (rising ones include \"Breakout\" queries growing over 5000%).",
            "default": true
          },
          "includeRelatedTopics": {
            "title": "Related topics",
            "type": "boolean",
            "description": "Top and rising related topics (Knowledge Graph entities). Experimental: Google does not offer them for comparisons and currently returns the list empty for most automated requests (one extra request per term). The field related_topics_status tells you what happened.",
            "default": false
          },
          "maxRelatedItems": {
            "title": "Max related items per list",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum queries/topics kept in each related list (top and rising) and in the related searches of each trending search. 0 = all that Google returns.",
            "default": 25
          },
          "trendingGeos": {
            "title": "Trending now countries",
            "type": "array",
            "description": "Country codes (US, GB, ES, IN...) for which to get today's \"Trending now\" searches: search volume, % increase, start time, categories, related searches and news. Leave empty to skip.",
            "items": {
              "type": "string"
            }
          },
          "trendingHours": {
            "title": "Trending now: time window",
            "enum": [
              "4",
              "24",
              "48",
              "168"
            ],
            "type": "string",
            "description": "Trends started in the past 4, 24, 48 hours or 7 days.",
            "default": "24"
          },
          "maxTrendingPerCountry": {
            "title": "Trending now: max items per country",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum trending searches per country, in Google's order (0 = all, usually several hundred).",
            "default": 100
          },
          "trendingSort": {
            "title": "Trending now: sort by",
            "enum": [
              "relevance",
              "volume",
              "recency"
            ],
            "type": "string",
            "description": "Order of the trending searches before the max-items limit is applied: Google's relevance order (rank), search volume, or most recent start time.",
            "default": "relevance"
          },
          "trendingCategories": {
            "title": "Trending now: categories",
            "type": "array",
            "description": "Optional filter, e.g. Sports, Technology, Entertainment, Business and Finance, Politics, Health, Games, Shopping, Climate. Leave empty for all.",
            "items": {
              "type": "string"
            }
          },
          "trendingActiveOnly": {
            "title": "Trending now: only active trends",
            "type": "boolean",
            "description": "Skip trends that Google already marks as ended.",
            "default": false
          },
          "trendingIncludeNews": {
            "title": "Trending now: attach news articles",
            "type": "boolean",
            "description": "Attach the news articles Google shows for the top trends (from the official Trending RSS feed; usually the top 10 per country).",
            "default": true
          },
          "outputFormat": {
            "title": "Output format",
            "enum": [
              "report",
              "flat"
            ],
            "type": "string",
            "description": "Report = one row per keyword with all data nested (best for JSON/API). Flat = one row per data point (date, region, related query...) ready for CSV, Excel or Google Sheets; the price is the same (charged per keyword).",
            "default": "report"
          },
          "language": {
            "title": "Interface language",
            "type": "string",
            "description": "Language code for topic names, region names and dates (hl), e.g. en-US, es, de, fr.",
            "default": "en-US"
          },
          "maxConcurrency": {
            "title": "Queries in parallel",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many queries run at the same time, each with its own IP and cookie. Higher is faster but more likely to hit Google's rate limits.",
            "default": 3
          },
          "requestDelayMs": {
            "title": "Delay between requests (ms)",
            "minimum": 0,
            "maximum": 30000,
            "type": "integer",
            "description": "Pause between two requests of the same session (a random jitter is added). Google rate-limits fast clients.",
            "default": 1200
          },
          "maxRetries": {
            "title": "Max retries per request",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Retries after HTTP 429, a bot check or a network error, each with a new IP, a new cookie and exponential backoff. A failed query is also restarted once from scratch.",
            "default": 5
          },
          "autoResidentialFallback": {
            "title": "Switch to residential proxy when blocked",
            "type": "boolean",
            "description": "If Google keeps blocking the selected proxy, automatically switch to Apify RESIDENTIAL proxy for the rest of the run (no extra cost for you).",
            "default": true
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify Proxy is strongly recommended: Google Trends answers 429 (too many requests) to IPs that send many queries.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}