{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Trends Scraper - Compare Unlimited Keywords",
    "description": "Scrape Google Trends interest over time, interest by region and related queries. Compare more than 5 keywords on one common 0-100 scale. Clean flat output, automatic retries and proxy rotation.",
    "version": "0.0",
    "x-build-id": "zfPi60aWeTZ9Z2H9J"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/roundish_wildlife~google-trends-unlimited-keywords/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-roundish_wildlife-google-trends-unlimited-keywords",
        "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/roundish_wildlife~google-trends-unlimited-keywords/runs": {
      "post": {
        "operationId": "runs-sync-roundish_wildlife-google-trends-unlimited-keywords",
        "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/roundish_wildlife~google-trends-unlimited-keywords/run-sync": {
      "post": {
        "operationId": "run-sync-roundish_wildlife-google-trends-unlimited-keywords",
        "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",
        "required": [
          "keywords"
        ],
        "properties": {
          "keywords": {
            "title": "Keywords",
            "minItems": 1,
            "maxItems": 100,
            "type": "array",
            "description": "Search terms to analyse, one per line. Up to 100 per run. Unlike Google Trends itself (max 5), all keywords are put on one comparable 0-100 scale using a shared anchor keyword.",
            "items": {
              "type": "string"
            }
          },
          "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",
              "custom"
            ],
            "type": "string",
            "description": "Period to analyse. Choose 'Custom date range' to use the start and end dates below. Short timeframes (past hour to past 7 days) return hourly or minute data; longer ones return daily, weekly or monthly data.",
            "default": "today 12-m"
          },
          "startDate": {
            "title": "Start date (custom range)",
            "type": "string",
            "description": "First day of the custom range (YYYY-MM-DD, not earlier than 2004-01-01). Used only when Timeframe is 'Custom date range'."
          },
          "endDate": {
            "title": "End date (custom range)",
            "type": "string",
            "description": "Last day of the custom range (YYYY-MM-DD). Used only when Timeframe is 'Custom date range'."
          },
          "geo": {
            "title": "Country or region",
            "type": "string",
            "description": "Two-letter country code such as US, GB, DE or NO, or a sub-region such as US-CA. Leave empty for worldwide.",
            "default": ""
          },
          "category": {
            "title": "Category",
            "enum": [
              "0",
              "3",
              "5",
              "7",
              "8",
              "11",
              "12",
              "13",
              "14",
              "16",
              "18",
              "20",
              "22",
              "29",
              "44",
              "45",
              "47",
              "65",
              "66",
              "67",
              "71",
              "174",
              "958"
            ],
            "type": "string",
            "description": "Limit results to a Google Trends category. Use 'Custom category ID' below for any other category.",
            "default": "0"
          },
          "customCategoryId": {
            "title": "Custom category ID",
            "minimum": 0,
            "type": "integer",
            "description": "Optional numeric Google Trends category ID (the 'cat' parameter in a Google Trends URL). Overrides the Category selection."
          },
          "property": {
            "title": "Search property",
            "enum": [
              "",
              "youtube",
              "news",
              "images",
              "froogle"
            ],
            "type": "string",
            "description": "Which Google search to analyse.",
            "default": ""
          },
          "includeInterestOverTime": {
            "title": "Interest over time",
            "type": "boolean",
            "description": "One row per keyword per date with a value on a common 0-100 scale.",
            "default": true
          },
          "includeInterestByRegion": {
            "title": "Interest by region",
            "type": "boolean",
            "description": "Where each keyword is most popular (countries worldwide, or regions/cities inside a country).",
            "default": true
          },
          "includeRelatedQueries": {
            "title": "Related queries",
            "type": "boolean",
            "description": "Top and rising related search queries, including 'Breakout' terms.",
            "default": true
          },
          "includeRelatedTopics": {
            "title": "Related topics",
            "type": "boolean",
            "description": "Top and rising related topics (entities such as brands, products or people). Note: Google Trends currently returns no related-topics data for most searches, so this is off by default. You are never charged for empty results.",
            "default": false
          },
          "includeSummary": {
            "title": "Add summary row per keyword",
            "type": "boolean",
            "description": "Adds one 'summary' row per keyword with average, peak value, peak date, latest value and trend slope. Free (part of the interest-over-time report).",
            "default": true
          },
          "anchorKeyword": {
            "title": "Anchor keyword",
            "type": "string",
            "description": "Used to put more than 5 keywords on one scale: it is added to every batch of 4 keywords and used to rescale. Leave empty to use your first keyword. Best results: a keyword with steady interest and similar popularity to your keywords. The anchor is not billed unless it is also in your keyword list."
          },
          "regionResolution": {
            "title": "Region resolution",
            "enum": [
              "auto",
              "COUNTRY",
              "REGION",
              "CITY",
              "DMA"
            ],
            "type": "string",
            "description": "Level of detail for interest by region. 'Automatic' = countries for worldwide, regions for a country. City and DMA (US metro) need a country in 'Country or region'.",
            "default": "auto"
          },
          "includeLowVolumeRegions": {
            "title": "Include low-volume regions",
            "type": "boolean",
            "description": "Also return regions where Google has too little data (value 0, hasData false).",
            "default": false
          },
          "language": {
            "title": "Language (hl)",
            "type": "string",
            "description": "Interface language used for topic names and formatted dates, e.g. en-US, de-DE, nb-NO.",
            "default": "en-US"
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Google Trends rate-limits heavily. Apify Proxy (automatic) is used by default. If you see many blocks, choose the RESIDENTIAL group.",
            "default": {
              "useApifyProxy": true
            }
          },
          "residentialFallback": {
            "title": "Switch to residential proxy when blocked",
            "type": "boolean",
            "description": "If Google keeps blocking the default proxy, automatically switch to Apify residential proxy for the rest of the run (if your plan includes it).",
            "default": true
          },
          "maxRetries": {
            "title": "Max retries per request",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "How many times a failed or rate-limited request is retried (with exponential backoff and a new IP) before the keyword is reported as an error.",
            "default": 5
          },
          "requestDelayMillis": {
            "title": "Delay between requests (ms)",
            "minimum": 0,
            "maximum": 30000,
            "type": "integer",
            "description": "Pause between requests to avoid rate limits.",
            "default": 1000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}