{
  "openapi": "3.0.1",
  "info": {
    "title": "Swellmeter — Google Trends Scraper & API for AI Agents",
    "description": "Google Trends scraper and API: keywords in, one compact record each with interest over time, a plain-English verdict (rising, falling, spiking, stable), peak, % change, related and rising queries and top regions. Compare up to 5 terms or get trending searches by country. $0.003 each.",
    "version": "0.1",
    "x-build-id": "j8kQmLw7IYa1MgNGO"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/cybermax~google-trends/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-cybermax-google-trends",
        "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/cybermax~google-trends/runs": {
      "post": {
        "operationId": "runs-sync-cybermax-google-trends",
        "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/cybermax~google-trends/run-sync": {
      "post": {
        "operationId": "run-sync-cybermax-google-trends",
        "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. Each keyword returns one record (interest over time, trend verdict, related queries, regions). Turn on 'Compare' to put up to 5 keywords on the same 0–100 scale.",
            "items": {
              "type": "string"
            }
          },
          "compare": {
            "title": "Compare keywords against each other",
            "type": "boolean",
            "description": "Groups keywords into comparison sets of up to 5 (Google's limit), so their values share one scale and you get a leader and ranking. Charged per keyword.",
            "default": false
          },
          "geo": {
            "title": "Country or region",
            "type": "string",
            "description": "Empty = worldwide. ISO country code (US, GB, DE, IN) or region (US-CA, GB-ENG).",
            "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": "Google picks the resolution: minutes/hours for short ranges, days up to 90 days, weeks up to 5 years, months for 2004–present.",
            "default": "today 12-m"
          },
          "property": {
            "title": "Search type",
            "enum": [
              "web",
              "images",
              "news",
              "shopping",
              "youtube"
            ],
            "type": "string",
            "description": "Which Google search property to measure.",
            "default": "web"
          },
          "category": {
            "title": "Category ID",
            "minimum": 0,
            "type": "integer",
            "description": "Optional Google Trends category (0 = all). Examples: 5 Computers & Electronics, 7 Finance, 18 Shopping, 45 Health, 71 Food & Drink.",
            "default": 0
          },
          "trendingGeos": {
            "title": "Trending searches now (countries)",
            "type": "array",
            "description": "Optional. Country codes (US, GB, IN…). Each returns one record with today's trending searches: query, approximate traffic, start time and news links.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "includeTimeline": {
            "title": "Include the full timeline",
            "type": "boolean",
            "description": "Adds every data point (date + 0–100 value). Turn off for the smallest output: the summary stats stay.",
            "default": true
          },
          "includeRelatedQueries": {
            "title": "Include related and rising queries",
            "type": "boolean",
            "description": "Top and rising (breakout) related searches for each keyword.",
            "default": true
          },
          "includeRegions": {
            "title": "Include top regions",
            "type": "boolean",
            "description": "Where interest is highest (countries, or subregions when a country is set).",
            "default": true
          },
          "maxRelated": {
            "title": "Max related items per list",
            "minimum": 1,
            "maximum": 25,
            "type": "integer",
            "description": "Caps top and rising lists.",
            "default": 10
          },
          "maxRegions": {
            "title": "Max regions",
            "minimum": 1,
            "maximum": 250,
            "type": "integer",
            "description": "Caps the region list.",
            "default": 10
          },
          "maxConcurrency": {
            "title": "Keywords in parallel",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Higher is faster but Google rate-limits harder. 2 is the most reliable.",
            "default": 2
          },
          "retryCooldownSecs": {
            "title": "Cool-down before the retry pass (seconds)",
            "minimum": 0,
            "maximum": 300,
            "type": "integer",
            "description": "Keywords that Google rate-limited are retried once at the end of the run, one at a time, after this pause.",
            "default": 45
          },
          "directFirst": {
            "title": "Try a direct connection first",
            "type": "boolean",
            "description": "On (recommended): attempts alternate between Apify's own server IP and the proxy below, starting direct. Off: every request goes through the proxy.",
            "default": true
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Used for every other attempt (or all attempts if the direct option is off). Google Trends rate-limits hard; each retry uses a fresh session.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}