{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Trends Scraper & API: Interest, Related, Trending",
    "description": "Google Trends API: interest over time, by region, related queries and Trending Now. Unlimited terms on one scale. Works with AI agents via MCP.",
    "version": "0.3",
    "x-build-id": "UygYfmyiVXDc9CzRa"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ocius-data~google-trends-reliable/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ocius-data-google-trends-reliable",
        "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/ocius-data~google-trends-reliable/runs": {
      "post": {
        "operationId": "runs-sync-ocius-data-google-trends-reliable",
        "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/ocius-data~google-trends-reliable/run-sync": {
      "post": {
        "operationId": "run-sync-ocius-data-google-trends-reliable",
        "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": "Mode",
            "enum": [
              "explore",
              "trendingNow",
              "keyword",
              "trending"
            ],
            "type": "string",
            "description": "Explore analyzes your search terms. Trending now returns the searches that are trending in the selected country, with search volume, growth and related searches.",
            "default": "explore"
          },
          "searchTerms": {
            "title": "Search terms",
            "type": "array",
            "description": "Keywords to analyze in Explore mode. You are charged once per search term that returns data; terms with no data or errors are free. Not used in Trending now mode.",
            "items": {
              "type": "string"
            }
          },
          "compare": {
            "title": "Compare terms",
            "type": "boolean",
            "description": "Put the terms on one comparable 0-100 scale, as in the Google Trends compare view. Up to 5 terms are compared directly. With more than 5 terms, the Actor adds an anchor term to every batch of 5 and rescales all values to one common scale (field valueComparable), so you can compare 10, 50 or 500 terms.",
            "default": false
          },
          "anchorTerm": {
            "title": "Anchor term (more than 5 compared terms)",
            "type": "string",
            "description": "Used only when comparing more than 5 terms. This term is included in every batch so all terms can be rescaled to one comparable scale. Choose a popular term. Defaults to the first term."
          },
          "geo": {
            "title": "Country or region code",
            "type": "string",
            "description": "ISO code such as US, CO, ES, MX or US-CA. Leave empty for worldwide.",
            "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": "Period to analyze, as in the Google Trends time selector.",
            "default": "today 12-m"
          },
          "customTimeRange": {
            "title": "Custom time range",
            "type": "string",
            "description": "Optional. Overrides Time range. Format: YYYY-MM-DD YYYY-MM-DD"
          },
          "timezone": {
            "title": "Timezone",
            "type": "string",
            "description": "IANA timezone used for dates, e.g. America/New_York, America/Bogota, Europe/Madrid. Matches what you see in Google Trends in that timezone.",
            "default": "UTC"
          },
          "category": {
            "title": "Category ID",
            "description": "Google Trends category ID that narrows the search to one topic, for example 71 (Food & Drink), 7 (Finance), 47 (Autos & Vehicles) or 958 (Jobs & Education). 0 means all categories. The ID is checked against Google's category list before the run starts. The README lists the main IDs. The ID can also be sent as text (\"71\"); an empty text (\"\") means all categories, as in other Google Trends Actors.",
            "default": 0
          },
          "property": {
            "title": "Search property",
            "enum": [
              "",
              "images",
              "news",
              "froogle",
              "youtube",
              "web"
            ],
            "type": "string",
            "description": "Google property to analyze: web, images, news, shopping or YouTube.",
            "default": ""
          },
          "includeInterestOverTime": {
            "title": "Interest over time",
            "type": "boolean",
            "description": "Search interest (0-100) for each date in the period.",
            "default": true
          },
          "includeInterestByRegion": {
            "title": "Interest by region",
            "type": "boolean",
            "description": "Search interest (0-100) by subregion of the selected country.",
            "default": true
          },
          "includeRelatedQueries": {
            "title": "Related queries",
            "type": "boolean",
            "description": "Top and rising related search queries.",
            "default": true
          },
          "trendingHours": {
            "title": "Trending now: time window",
            "enum": [
              "4",
              "24",
              "48",
              "168"
            ],
            "type": "string",
            "description": "Only used in Trending now mode. The period of trending searches, as in the Google Trends Trending now page.",
            "default": "24"
          },
          "trendingCategory": {
            "title": "Trending now: category",
            "enum": [
              "0",
              "1",
              "2",
              "3",
              "20",
              "4",
              "5",
              "6",
              "7",
              "8",
              "9",
              "10",
              "11",
              "13",
              "14",
              "15",
              "16",
              "17",
              "18",
              "19"
            ],
            "type": "string",
            "description": "Only used in Trending now mode. Return only trending searches in this category.",
            "default": "0"
          },
          "trendingActiveOnly": {
            "title": "Trending now: active trends only",
            "type": "boolean",
            "description": "Only used in Trending now mode. Return only searches that are still trending, not those that have ended.",
            "default": false
          },
          "maxTrendingSearches": {
            "title": "Trending now: max trending searches",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Only used in Trending now mode. Maximum number of trending searches saved, in Google's order. You are charged per trending search saved.",
            "default": 50
          },
          "outputFormat": {
            "title": "Output format",
            "enum": [
              "default",
              "apify/google-trends-scraper",
              "data_xplorer/google-trends-fast-scraper",
              "flat",
              "summary"
            ],
            "type": "string",
            "description": "Default keeps this Actor's own rows. Choose another Google Trends Actor to write the results with that Actor's row shape and top-level field names (one row per search term, or one row per run for trending searches in the data_xplorer format), so existing integrations keep working after switching. This Actor's extra fields are kept under their own names. The price is the same. Input field names of those Actors (for example keyword, predefinedTimeframe, fetchRegionalData, trendingSearchesCountry or maxItems) are accepted with any output format. See \"Switching from another Actor\" in the README.",
            "default": "default"
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Language for labels, for example en-US or es.",
            "default": "en-US"
          },
          "maxRetries": {
            "title": "Max retries per request",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many times a blocked request is retried with a new session.",
            "default": 8
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "By default the Actor starts with Apify datacenter proxies and switches automatically to residential proxies in the same country if Google blocks requests.",
            "default": {
              "useApifyProxy": true
            }
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "type": "integer",
            "description": "How many term groups are processed in parallel. Values above 5 are accepted and treated as 5.",
            "default": 3
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}