{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Trends Scraper: Keywords, Compare, Related, Trending",
    "description": "Google Trends scraper: interest over time, related queries, interest by region, keyword comparisons and trending now. Any timeframe and country. Retries on fresh sessions, no login. $3 per 1,000 keywords; failures are free.",
    "version": "0.1",
    "x-build-id": "zdlbuOF0Y9OR1w63z"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/logicbase_systems~google-trends/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-logicbase_systems-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/logicbase_systems~google-trends/runs": {
      "post": {
        "operationId": "runs-sync-logicbase_systems-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/logicbase_systems~google-trends/run-sync": {
      "post": {
        "operationId": "run-sync-logicbase_systems-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, one per line. Each keyword is a separate search and returns one result row. Topics and phrases work, for example web scraping or \"cold brew\".",
            "items": {
              "type": "string"
            }
          },
          "comparisonGroups": {
            "title": "Comparisons (2-5 keywords, separated by |)",
            "type": "array",
            "description": "Each line compares up to 5 keywords on the same 0-100 scale, for example: python | javascript | rust. A comparison returns one row with a value per keyword and is charged as one result per keyword.",
            "items": {
              "type": "string"
            }
          },
          "trendingGeos": {
            "title": "Trending now: countries",
            "type": "array",
            "description": "Country codes (US, GB, IN, DE ...) to fetch Google's current trending searches for, with approximate search volume and news links. Charged per trending topic.",
            "items": {
              "type": "string"
            }
          },
          "maxTrendingPerGeo": {
            "title": "Max trending topics per country",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "How many trending topics to keep per country (Google lists up to about 25).",
            "default": 25
          },
          "includeTrendingNews": {
            "title": "Include news links for trending topics",
            "type": "boolean",
            "description": "Add the news articles Google shows next to each trending topic.",
            "default": true
          },
          "timeframe": {
            "title": "Timeframe",
            "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": "How far back to look. Longer timeframes give weekly or monthly points, short ones give hourly points.",
            "default": "today 12-m"
          },
          "customTimeframe": {
            "title": "Custom date range (optional)",
            "type": "string",
            "description": "Overrides the timeframe above. Format: YYYY-MM-DD YYYY-MM-DD, for example 2024-01-01 2024-06-30."
          },
          "geos": {
            "title": "Countries or regions",
            "type": "array",
            "description": "Where to measure interest: US, GB, IN, DE or a region such as US-CA. Leave empty for worldwide. With several entries every keyword is run once per entry (and charged each time).",
            "items": {
              "type": "string"
            }
          },
          "searchProperty": {
            "title": "Search type",
            "enum": [
              "web",
              "images",
              "news",
              "youtube",
              "shopping"
            ],
            "type": "string",
            "description": "Which Google search to measure.",
            "default": "web"
          },
          "category": {
            "title": "Category ID (optional)",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Google Trends category number. 0 means all categories. For example 5 is Computers & Electronics, 7 is Finance, 45 is Health.",
            "default": 0
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Language of related queries and region names, for example en-US, de, es, hi.",
            "default": "en-US"
          },
          "timezoneOffset": {
            "title": "Timezone offset (minutes)",
            "minimum": -840,
            "maximum": 840,
            "type": "integer",
            "description": "Minutes from UTC used for the time axis, for example 330 for India or -300 for New York. Default 0 (UTC).",
            "default": 0
          },
          "includeInterestOverTime": {
            "title": "Interest over time",
            "type": "boolean",
            "description": "The 0-100 popularity series, plus average, peak and latest values.",
            "default": true
          },
          "includeRelatedQueries": {
            "title": "Related queries",
            "type": "boolean",
            "description": "Top and rising related searches (rising ones are flagged isBreakout when Google shows 'Breakout').",
            "default": true
          },
          "includeInterestByRegion": {
            "title": "Interest by region",
            "type": "boolean",
            "description": "Popularity per country (worldwide searches) or per state/region (country searches).",
            "default": true
          },
          "regionResolution": {
            "title": "Region detail",
            "enum": [
              "",
              "COUNTRY",
              "REGION",
              "CITY",
              "DMA"
            ],
            "type": "string",
            "description": "How finely to split interest by region. Automatic picks countries for worldwide and states for a country.",
            "default": ""
          },
          "includeLowSearchVolumeRegions": {
            "title": "Include regions with low search volume",
            "type": "boolean",
            "description": "Also list regions where Google reports very little search volume.",
            "default": false
          },
          "maxResults": {
            "title": "Max searches in total (optional)",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Hard cap on searches (keyword x country) for the whole run. Leave empty for no cap."
          },
          "maxConcurrency": {
            "title": "Parallel searches",
            "minimum": 1,
            "maximum": 12,
            "type": "integer",
            "description": "How many searches to run at the same time. Lower it if you see many rate-limit retries.",
            "default": 5
          },
          "proxyStrategy": {
            "title": "Proxy strategy",
            "enum": [
              "auto",
              "residential",
              "datacenter",
              "none"
            ],
            "type": "string",
            "description": "Auto (recommended) uses a cheap data-center proxy first and switches to residential when Google rate-limits it. You never pay for proxy traffic yourself.",
            "default": "auto"
          },
          "proxyConfiguration": {
            "title": "Custom proxies (optional)",
            "type": "object",
            "description": "Advanced: your own proxy URLs. Only used when you enter custom proxy URLs, otherwise the strategy above applies."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}