{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Trends Scraper: Compare Unlimited Keywords",
    "description": "Google Trends for unlimited keywords on one comparable 0-100 scale (auto-stitched past Google's 5-term limit). Interest over time, regions, cities, related queries and topics, YouTube/Shopping/News search, Trending Now. Per-keyword trend summary. No browser, pay only for results.",
    "version": "0.1",
    "x-build-id": "nih0abHKXufmatfeS"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/bisketapis~google-trends-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-bisketapis-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/bisketapis~google-trends-scraper/runs": {
      "post": {
        "operationId": "runs-sync-bisketapis-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/bisketapis~google-trends-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-bisketapis-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": {
          "mode": {
            "title": "What to scrape",
            "enum": [
              "keywords",
              "trendingNow"
            ],
            "type": "string",
            "description": "Keywords: a full Google Trends report for each search term. Trending Now: today's rising searches in one country (search volume, growth, related searches).",
            "default": "keywords"
          },
          "searchTerms": {
            "title": "Search terms",
            "type": "array",
            "description": "Keywords to look up. Any number: with more than 5, every keyword is still put on ONE comparable 0-100 scale (we stitch Google's 5-term batches through a shared anchor keyword). Not needed for Trending Now.",
            "items": {
              "type": "string"
            }
          },
          "geo": {
            "title": "Location",
            "type": "string",
            "description": "Two-letter country code (US, GB, DE, IN...), or a region code like US-CA or GB-ENG. Leave empty for Worldwide.",
            "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. Ignored if a custom time range is set.",
            "default": "today 12-m"
          },
          "customTimeRange": {
            "title": "Custom time range",
            "type": "string",
            "description": "Optional. Two dates separated by a space: 2024-01-01 2024-12-31"
          },
          "searchType": {
            "title": "Search type",
            "enum": [
              "web",
              "youtube",
              "shopping",
              "news",
              "images"
            ],
            "type": "string",
            "description": "Which Google property's searches to measure.",
            "default": "web"
          },
          "category": {
            "title": "Category ID",
            "minimum": 0,
            "type": "integer",
            "description": "Google Trends category to narrow ambiguous terms (0 = all categories). Examples: 71 Food & Drink, 18 Shopping, 7 Finance, 5 Computers & Electronics, 8 Games.",
            "default": 0
          },
          "compareMode": {
            "title": "Comparison",
            "enum": [
              "together",
              "separate"
            ],
            "type": "string",
            "description": "Together: all keywords on one shared scale, so the numbers compare across keywords (stitched automatically past 5). Separate: each keyword on its own 0-100 scale, like searching it alone.",
            "default": "together"
          },
          "anchorKeyword": {
            "title": "Anchor keyword (optional)",
            "type": "string",
            "description": "Used only with more than 5 keywords. The shared term that links the batches. Leave empty to auto-pick the most popular term of the first batch. It may be a term outside your list; then it is used for scaling only and not returned or charged."
          },
          "includeTimeline": {
            "title": "Interest over time",
            "type": "boolean",
            "description": "Full time series per keyword. All timelines are also saved together as TIMELINE.csv.",
            "default": true
          },
          "includeRegions": {
            "title": "Interest by region",
            "type": "boolean",
            "description": "Where the keyword is searched most.",
            "default": true
          },
          "regionResolution": {
            "title": "Region level",
            "enum": [
              "COUNTRY",
              "REGION",
              "DMA",
              "CITY"
            ],
            "type": "string",
            "description": "Granularity of interest by region. Worldwide searches always use countries. Metro (DMA) is US only.",
            "default": "REGION"
          },
          "includeLowVolumeRegions": {
            "title": "Include low-volume regions",
            "type": "boolean",
            "description": "Off matches trends.google.com: regions with too few searches are left out, because their values are noisy (small states often show 100). Turn on to get every region.",
            "default": false
          },
          "includeRelatedQueries": {
            "title": "Related queries (top + rising)",
            "type": "boolean",
            "description": "Searches related to each keyword, including Breakout terms.",
            "default": true
          },
          "includeRelatedTopics": {
            "title": "Related topics (top + rising)",
            "type": "boolean",
            "description": "Topics related to each keyword. Needs one extra request per keyword when comparing several, so it is off by default.",
            "default": false
          },
          "trendingHours": {
            "title": "Trending Now: period",
            "enum": [
              "4",
              "24",
              "48",
              "168"
            ],
            "type": "string",
            "description": "Trending searches that started in the past 4 hours, 24 hours, 48 hours or 7 days.",
            "default": "24"
          },
          "trendingOnlyActive": {
            "title": "Trending Now: only active trends",
            "type": "boolean",
            "description": "Skip trends Google marks as ended.",
            "default": false
          },
          "trendingCategories": {
            "title": "Trending Now: categories",
            "type": "array",
            "description": "Optional filter, e.g. Sports, Entertainment, Technology, Shopping, Business and Finance, Politics, Health, Games.",
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Trending Now: max results",
            "minimum": 0,
            "type": "integer",
            "description": "Most popular first. 0 = all (often 300-700 per country per day).",
            "default": 100
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Interface language for names of regions and topics, e.g. en-US, de, es, fr, ja.",
            "default": "en-US"
          },
          "maxConcurrency": {
            "title": "Parallel sessions",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many Google sessions run at once. Higher is faster for long keyword lists.",
            "default": 3
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Google rate-limits by IP. Residential proxy (default) keeps runs reliable. Proxy traffic is included in the price.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}