{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Trends Data Scraper — SEO Keyword Research Tool",
    "description": "Get Google Trends interest over time and by region, related queries, rising searches and related topics. Compare 2–5 keywords and export complete reports to JSON, CSV or Excel.",
    "version": "0.0",
    "x-build-id": "3wrvWVI4r5kda1hwd"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/afanasenko~google-trends-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-afanasenko-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/afanasenko~google-trends-scraper/runs": {
      "post": {
        "operationId": "runs-sync-afanasenko-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/afanasenko~google-trends-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-afanasenko-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": "Operation mode",
            "enum": [
              "full",
              "compare"
            ],
            "type": "string",
            "description": "Choose the mode first. Mode 1 collects an independent full report for each keyword. Mode 2 compares 2–5 keywords in one report.",
            "default": "full"
          },
          "keywords": {
            "title": "Keywords",
            "maxItems": 20,
            "type": "array",
            "description": "Mode 1 only. Enter up to 20 distinct keyword phrases, one per line.",
            "items": {
              "type": "string",
              "minLength": 2,
              "maxLength": 100
            },
            "default": []
          },
          "compareKeywords": {
            "title": "Keywords to compare",
            "maxItems": 5,
            "type": "array",
            "description": "Mode 2 only. Enter 2–5 distinct keyword phrases, one per line. Related queries and topics are available in Mode 1.",
            "items": {
              "type": "string",
              "minLength": 2,
              "maxLength": 100
            }
          },
          "country": {
            "title": "Country",
            "enum": [
              "AF",
              "AL",
              "AQ",
              "DZ",
              "AS",
              "AD",
              "AO",
              "AG",
              "AZ",
              "AR",
              "AU",
              "AT",
              "BS",
              "BH",
              "BD",
              "AM",
              "BB",
              "BE",
              "BT",
              "BO",
              "BA",
              "BW",
              "BR",
              "BZ",
              "SB",
              "BN",
              "BG",
              "MM",
              "BI",
              "KH",
              "CM",
              "CA",
              "CV",
              "CF",
              "LK",
              "TD",
              "CL",
              "CN",
              "CX",
              "CC",
              "CO",
              "KM",
              "CG",
              "CD",
              "CK",
              "CR",
              "HR",
              "CY",
              "CZ",
              "BJ",
              "DK",
              "DM",
              "DO",
              "EC",
              "SV",
              "GQ",
              "ET",
              "ER",
              "EE",
              "GS",
              "FJ",
              "FI",
              "FR",
              "PF",
              "TF",
              "DJ",
              "GA",
              "GE",
              "GM",
              "DE",
              "GH",
              "KI",
              "GR",
              "GD",
              "GU",
              "GT",
              "GN",
              "GY",
              "HT",
              "HM",
              "VA",
              "HN",
              "HU",
              "IS",
              "IN",
              "ID",
              "IQ",
              "IE",
              "IL",
              "IT",
              "CI",
              "JM",
              "JP",
              "KZ",
              "JO",
              "KE",
              "KR",
              "KW",
              "KG",
              "LA",
              "LB",
              "LS",
              "LV",
              "LR",
              "LY",
              "LI",
              "LT",
              "LU",
              "MG",
              "MW",
              "MY",
              "MV",
              "ML",
              "MT",
              "MR",
              "MU",
              "MX",
              "MC",
              "MN",
              "MD",
              "ME",
              "MA",
              "MZ",
              "OM",
              "NA",
              "NR",
              "NP",
              "NL",
              "CW",
              "SX",
              "BQ",
              "NC",
              "VU",
              "NZ",
              "NI",
              "NE",
              "NG",
              "NU",
              "NF",
              "NO",
              "MP",
              "UM",
              "FM",
              "MH",
              "PW",
              "PK",
              "PA",
              "PG",
              "PY",
              "PE",
              "PH",
              "PN",
              "PL",
              "PT",
              "GW",
              "TL",
              "QA",
              "RO",
              "RW",
              "SH",
              "KN",
              "LC",
              "PM",
              "VC",
              "SM",
              "ST",
              "SA",
              "SN",
              "RS",
              "SC",
              "SL",
              "SG",
              "SK",
              "VN",
              "SI",
              "SO",
              "ZA",
              "ZW",
              "ES",
              "SS",
              "SD",
              "SR",
              "SZ",
              "SE",
              "CH",
              "TJ",
              "TH",
              "TG",
              "TK",
              "TO",
              "TT",
              "AE",
              "TN",
              "TR",
              "TM",
              "TV",
              "UG",
              "UA",
              "MK",
              "EG",
              "GB",
              "GG",
              "JE",
              "TZ",
              "US",
              "BF",
              "UY",
              "UZ",
              "VE",
              "WF",
              "WS",
              "YE",
              "ZM"
            ],
            "type": "string",
            "description": "Country for Google Trends interest. Default: United States.",
            "default": "US"
          },
          "language": {
            "title": "Language",
            "enum": [
              "af",
              "ak",
              "sq",
              "am",
              "ar",
              "hy",
              "az",
              "ban",
              "eu",
              "be",
              "bn",
              "bs",
              "bg",
              "my",
              "ca",
              "ceb",
              "ny",
              "zh-CN",
              "zh-TW",
              "hr",
              "cs",
              "da",
              "nl",
              "en",
              "es-419",
              "et",
              "ee",
              "fo",
              "fa",
              "fil",
              "fi",
              "fr",
              "fy",
              "gaa",
              "gl",
              "lg",
              "ka",
              "de",
              "el",
              "gu",
              "ht",
              "ha",
              "he",
              "iw",
              "hi",
              "hu",
              "is",
              "bem",
              "ig",
              "id",
              "ga",
              "it",
              "ja",
              "kn",
              "kk",
              "km",
              "rw",
              "rn",
              "kg",
              "ko",
              "mfe",
              "crs",
              "kri",
              "ckb",
              "ky",
              "lo",
              "lv",
              "ln",
              "lt",
              "ach",
              "mk",
              "mg",
              "ms",
              "ml",
              "mt",
              "mi",
              "mr",
              "mn",
              "sr-ME",
              "ne",
              "nso",
              "no",
              "nyn",
              "om",
              "ps",
              "pcm",
              "pl",
              "pt",
              "pt-BR",
              "pt-PT",
              "pa",
              "qu",
              "ro",
              "rm",
              "ru",
              "sr",
              "sr-Latn",
              "st",
              "sn",
              "loz",
              "sd",
              "si",
              "sk",
              "sl",
              "so",
              "es",
              "sw",
              "sv",
              "tl",
              "tg",
              "ta",
              "te",
              "th",
              "ti",
              "to",
              "lua",
              "tn",
              "tum",
              "tr",
              "tk",
              "uk",
              "ur",
              "uz",
              "vi",
              "wo",
              "xh",
              "yo",
              "zu"
            ],
            "type": "string",
            "description": "Language for Google Trends results and related terms. Default: English.",
            "default": "en"
          },
          "timeRange": {
            "title": "Time range",
            "enum": [
              "past_hour",
              "past_4_hours",
              "past_day",
              "past_7_days",
              "past_30_days",
              "past_90_days",
              "past_12_months",
              "past_5_years"
            ],
            "type": "string",
            "description": "Period to collect. Default: past 12 months.",
            "default": "past_12_months"
          },
          "searchType": {
            "title": "Search type",
            "enum": [
              "web",
              "news",
              "youtube",
              "images",
              "shopping"
            ],
            "type": "string",
            "description": "Google service to explore. Default: Google Search.",
            "default": "web"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}