{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Trends Scraper API: Interest, Regions & Queries",
    "description": "Google Trends data as clean rows: interest over time for up to 5 compared keywords, interest by region, related queries and topics (top and rising). Any country, region or worldwide; web, YouTube, news, images and shopping search. No proxies, no CAPTCHAs. Pay per search.",
    "version": "0.1",
    "x-build-id": "kkGp2n35iemjq5FOV"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/plainrows~google-trends-explorer/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-plainrows-google-trends-explorer",
        "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/plainrows~google-trends-explorer/runs": {
      "post": {
        "operationId": "runs-sync-plainrows-google-trends-explorer",
        "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/plainrows~google-trends-explorer/run-sync": {
      "post": {
        "operationId": "run-sync-plainrows-google-trends-explorer",
        "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": [
          "searchTerms"
        ],
        "properties": {
          "searchTerms": {
            "title": "Searches (keywords to compare)",
            "minItems": 1,
            "maxItems": 1000,
            "type": "array",
            "description": "One Google Trends search per line. Compare up to 5 keywords by separating them with commas, e.g. \"chatgpt, gemini, claude\"; values are then on the same 0-100 scale, like on trends.google.com. One keyword alone, e.g. \"coffee\", also gets related queries and topics. Up to 500 lines per run; each line with data is billed once.",
            "items": {
              "type": "string"
            }
          },
          "country": {
            "title": "Country",
            "enum": [
              "WORLDWIDE",
              "AF",
              "AL",
              "DZ",
              "AS",
              "AD",
              "AO",
              "AQ",
              "AG",
              "AR",
              "AM",
              "AU",
              "AT",
              "AZ",
              "BH",
              "BD",
              "BB",
              "BE",
              "BZ",
              "BJ",
              "BT",
              "BO",
              "BA",
              "BW",
              "BR",
              "BN",
              "BG",
              "BF",
              "BI",
              "CV",
              "KH",
              "CM",
              "CA",
              "BQ",
              "CF",
              "TD",
              "CL",
              "CN",
              "CX",
              "CC",
              "CO",
              "KM",
              "CK",
              "CR",
              "CI",
              "HR",
              "CW",
              "CY",
              "CZ",
              "CD",
              "DK",
              "DJ",
              "DM",
              "DO",
              "EC",
              "EG",
              "SV",
              "GQ",
              "ER",
              "EE",
              "SZ",
              "ET",
              "FJ",
              "FI",
              "FR",
              "PF",
              "TF",
              "GA",
              "GE",
              "DE",
              "GH",
              "GR",
              "GD",
              "GU",
              "GT",
              "GG",
              "GN",
              "GW",
              "GY",
              "HT",
              "HM",
              "HN",
              "HU",
              "IS",
              "IN",
              "ID",
              "IQ",
              "IE",
              "IL",
              "IT",
              "JM",
              "JP",
              "JE",
              "JO",
              "KZ",
              "KE",
              "KI",
              "KW",
              "KG",
              "LA",
              "LV",
              "LB",
              "LS",
              "LR",
              "LY",
              "LI",
              "LT",
              "LU",
              "MG",
              "MW",
              "MY",
              "MV",
              "ML",
              "MT",
              "MH",
              "MR",
              "MU",
              "MX",
              "FM",
              "MD",
              "MC",
              "MN",
              "ME",
              "MA",
              "MZ",
              "MM",
              "NA",
              "NR",
              "NP",
              "NL",
              "NC",
              "NZ",
              "NI",
              "NE",
              "NG",
              "NU",
              "NF",
              "MK",
              "MP",
              "NO",
              "OM",
              "PK",
              "PW",
              "PA",
              "PG",
              "PY",
              "PE",
              "PH",
              "PN",
              "PL",
              "PT",
              "QA",
              "CG",
              "RO",
              "RW",
              "SH",
              "KN",
              "LC",
              "PM",
              "VC",
              "WS",
              "SM",
              "ST",
              "SA",
              "SN",
              "RS",
              "SC",
              "SL",
              "SG",
              "SX",
              "SK",
              "SI",
              "SB",
              "SO",
              "ZA",
              "GS",
              "KR",
              "SS",
              "ES",
              "LK",
              "SD",
              "SR",
              "SE",
              "CH",
              "TJ",
              "TZ",
              "TH",
              "BS",
              "GM",
              "TL",
              "TG",
              "TK",
              "TO",
              "TT",
              "TN",
              "TR",
              "TM",
              "TV",
              "UG",
              "UA",
              "AE",
              "GB",
              "US",
              "UM",
              "UY",
              "UZ",
              "VU",
              "VA",
              "VE",
              "VN",
              "WF",
              "YE",
              "ZM",
              "ZW"
            ],
            "type": "string",
            "description": "Where the searches happen, or Worldwide.",
            "default": "US"
          },
          "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",
              "all_time"
            ],
            "type": "string",
            "description": "Period of the chart. Google picks the spacing of the points: per minute (past hour), per hour (past day, past 7 days), per day (past 30/90 days), per week (12 months, 5 years) or per month (all time). Ignored when a custom start date is set below.",
            "default": "past_12_months"
          },
          "searchType": {
            "title": "Search type",
            "enum": [
              "web",
              "youtube",
              "news",
              "images",
              "shopping"
            ],
            "type": "string",
            "description": "Which Google search the interest is measured on, like the \"Web search\" menu of Google Trends.",
            "default": "web"
          },
          "includeRegions": {
            "title": "Interest by region",
            "type": "boolean",
            "description": "Add one row per region and keyword: states or provinces for a country, countries for Worldwide. Included in the price of the search.",
            "default": true
          },
          "includeRelated": {
            "title": "Related queries and topics",
            "type": "boolean",
            "description": "Add Google's related queries and related topics (top and rising). Google Trends gives them only for a search with a single keyword. Included in the price of the search.",
            "default": true
          },
          "startDate": {
            "title": "Custom start date (optional)",
            "type": "string",
            "description": "Use your own date range instead of Time range, e.g. 2025-01-01. From 2004-01-01 (web) or 2008-01-01 (other search types)."
          },
          "endDate": {
            "title": "Custom end date (optional)",
            "type": "string",
            "description": "End of the custom range (default: today)."
          },
          "region": {
            "title": "Region (optional)",
            "type": "string",
            "description": "A region instead of a whole country: Google Trends region code such as \"US-CA\" (California), \"GB-SCT\" (Scotland) or \"DE-BY\" (Bavaria), as shown in the regionCode column. Overrides Country."
          },
          "category": {
            "title": "Category",
            "minimum": 0,
            "type": "integer",
            "description": "Google Trends category number to narrow an ambiguous keyword: 0 = all categories (default), 71 = Food & Drink, 18 = Shopping, 20 = Sports, 7 = Finance, 5 = Computers & Electronics, 45 = Health, 67 = Travel, 47 = Autos & Vehicles, 3 = Arts & Entertainment. The number is the \"cat=\" value in a trends.google.com link.",
            "default": 0
          },
          "languageCode": {
            "title": "Language (optional)",
            "pattern": "^([a-zA-Z]{2})?$",
            "type": "string",
            "description": "Two-letter language of topic names, e.g. \"fr\" for French topic titles (default \"en\"). It does not filter searches; Country does."
          },
          "speed": {
            "title": "Speed",
            "enum": [
              "standard",
              "fast"
            ],
            "type": "string",
            "description": "Standard (lowest price): each search waits in the data provider's queue, so allow a few minutes per run; a search still queued after 12 minutes is answered through the fast route at no extra charge. Fast: about 10-30 seconds per search, for AI agents and apps that wait for the answer; adds the fast-mode fee per search (see Pricing).",
            "default": "standard"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}