{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Trends API: Interest, Related Queries, Trending Now",
    "description": "Google Trends data as clean JSON: interest over time and by region (country, state, city, metro) and related queries for up to 5 compared terms, plus Trending Now by country with volume, growth and top news. Polite back-off, no login or browser. $2 per 1,000 results.",
    "version": "1.0",
    "x-build-id": "jGFclyJyXKivZmoml"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/joesimo~google-trends/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-joesimo-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/joesimo~google-trends/runs": {
      "post": {
        "operationId": "runs-sync-joesimo-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/joesimo~google-trends/run-sync": {
      "post": {
        "operationId": "run-sync-joesimo-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": {
          "searchTerms": {
            "title": "Search terms",
            "type": "array",
            "description": "One search per line. To compare terms on the same 0 to 100 scale, put up to 5 on one line separated by commas, for example <code>bitcoin, ethereum</code>. Each line is one result. Topic IDs such as <code>/m/05p0rrx</code> also work.",
            "items": {
              "type": "string"
            }
          },
          "geo": {
            "title": "Location",
            "type": "string",
            "description": "Country code such as <code>US</code>, <code>GB</code> or <code>DE</code>, a region such as <code>US-CA</code>, or a metro such as <code>US-CA-807</code>. Leave empty for worldwide.",
            "default": "US"
          },
          "timeRange": {
            "title": "Time range",
            "type": "string",
            "description": "One of <code>now 1-H</code>, <code>now 4-H</code>, <code>now 1-d</code>, <code>now 7-d</code>, <code>today 1-m</code>, <code>today 3-m</code>, <code>today 12-m</code>, <code>today 5-y</code>, <code>all</code> (since 2004), or a custom range <code>YYYY-MM-DD YYYY-MM-DD</code>.",
            "default": "today 12-m"
          },
          "category": {
            "title": "Category",
            "minimum": 0,
            "type": "integer",
            "description": "Google Trends category number to narrow ambiguous terms, for example 7 for Finance, 5 for Computers and Electronics, 71 for Food and Drink. 0 means all categories.",
            "default": 0
          },
          "property": {
            "title": "Search type",
            "enum": [
              "web",
              "images",
              "news",
              "shopping",
              "youtube"
            ],
            "type": "string",
            "description": "Which Google search to measure: web search (default), image, news, shopping (Google Shopping) or YouTube search.",
            "default": "web"
          },
          "dataTypes": {
            "title": "Data to fetch",
            "type": "array",
            "description": "Which charts to fetch for each search. Fewer charts means fewer requests and faster runs. Related topics is off by default because Google currently returns it empty for automated requests.",
            "items": {
              "type": "string",
              "enum": [
                "interestOverTime",
                "interestByRegion",
                "relatedQueries",
                "relatedTopics"
              ],
              "enumTitles": [
                "Interest over time",
                "Interest by region",
                "Related queries",
                "Related topics"
              ]
            },
            "default": [
              "interestOverTime",
              "interestByRegion",
              "relatedQueries"
            ]
          },
          "regionResolution": {
            "title": "Region level",
            "enum": [
              "auto",
              "COUNTRY",
              "REGION",
              "CITY",
              "DMA"
            ],
            "type": "string",
            "description": "Level for Interest by region. Auto uses countries for worldwide and states or provinces inside a country. Metro (DMA) is US only.",
            "default": "auto"
          },
          "includeLowVolumeRegions": {
            "title": "Include low volume regions",
            "type": "boolean",
            "description": "Also list regions with too little search volume to score (they come back as 0).",
            "default": false
          },
          "trendingGeos": {
            "title": "Trending searches: locations",
            "type": "array",
            "description": "Countries to get trending searches for, for example <code>US</code>, <code>GB</code>, <code>IN</code>. Regions such as <code>US-NY</code> also work.",
            "items": {
              "type": "string"
            }
          },
          "trendingHours": {
            "title": "Trending time window",
            "minimum": 4,
            "maximum": 168,
            "type": "integer",
            "description": "Trends from the last 4 hours (realtime), 24 hours (daily), 48 hours or 168 hours (7 days). Other values are rejected.",
            "default": 24
          },
          "maxTrendingPerGeo": {
            "title": "Max trending searches per location",
            "minimum": 0,
            "type": "integer",
            "description": "Google lists up to several hundred trends per country. 0 means all of them. You pay per saved trend.",
            "default": 25
          },
          "trendingSortBy": {
            "title": "Trending order",
            "enum": [
              "relevance",
              "volume",
              "newest"
            ],
            "type": "string",
            "description": "Order of saved trends: Google's relevance order, highest search volume first, or most recently started first.",
            "default": "relevance"
          },
          "trendingActiveOnly": {
            "title": "Only active trends",
            "type": "boolean",
            "description": "Skip trends Google marks as ended.",
            "default": false
          },
          "trendingCategories": {
            "title": "Trending categories",
            "type": "array",
            "description": "Keep only trends in these categories. Empty means all.",
            "items": {
              "type": "string",
              "enum": [
                "Autos and Vehicles",
                "Beauty and Fashion",
                "Business and Finance",
                "Climate",
                "Entertainment",
                "Food and Drink",
                "Games",
                "Health",
                "Hobbies and Leisure",
                "Jobs and Education",
                "Law and Government",
                "Other",
                "Pets and Animals",
                "Politics",
                "Science",
                "Shopping",
                "Sports",
                "Technology",
                "Travel and Transportation"
              ]
            }
          },
          "includeTrendingNews": {
            "title": "Add news articles to trends",
            "type": "boolean",
            "description": "Attach the top 3 news articles (headline, URL, source, time) Google links to each saved trend. One small extra request per trend.",
            "default": true
          },
          "maxItems": {
            "title": "Max results",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum number of results to save in total (keyword sets plus trends). 0 means no limit.",
            "default": 0
          },
          "hl": {
            "title": "Interface language",
            "type": "string",
            "description": "Language for labels, region names and trending data, for example <code>en-US</code>, <code>de</code>, <code>fr</code>.",
            "default": "en-US"
          },
          "tz": {
            "title": "Timezone offset (minutes)",
            "type": "integer",
            "description": "Offset from UTC in minutes as Google expects it, for example 0 for UTC, 300 for US Eastern standard time, -60 for Central Europe. Affects day boundaries of hourly and daily data.",
            "default": 0
          },
          "requestDelayMs": {
            "title": "Delay between requests (ms)",
            "minimum": 500,
            "maximum": 30000,
            "type": "integer",
            "description": "Pause between requests to Google. Lower is faster but more likely to be rate limited.",
            "default": 1500
          },
          "maxRetries": {
            "title": "Max retries when rate limited",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "On HTTP 429 the Actor waits 5, 10, 20, 40 seconds and so on with a fresh session before each retry.",
            "default": 4
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Optional. Google Trends often rate limits shared IPs. If your runs report many rate limit backoffs, try Apify datacenter proxy first.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}