{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Trends Monitor: Spike Alert, Trending Now & API",
    "description": "Google Trends monitor: trending searches now in any country (US, Germany, UK, India...) with traffic and news links, plus a daily keyword watchlist that saves only what changed: interest spikes, rising related queries and a changed flag for up to 50 keywords. Pay per result.",
    "version": "0.1",
    "x-build-id": "ucvrwV238EKCdjdb8"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/solidfetch~google-trends-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-solidfetch-google-trends-monitor",
        "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/solidfetch~google-trends-monitor/runs": {
      "post": {
        "operationId": "runs-sync-solidfetch-google-trends-monitor",
        "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/solidfetch~google-trends-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-solidfetch-google-trends-monitor",
        "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": [
              "trending",
              "monitor",
              "compare"
            ],
            "type": "string",
            "description": "Trending now lists the searches that are rising in a country right now. Keyword monitor checks your keywords and saves the ones that changed since the last run with the same state key. Compare keywords puts up to 5 keywords per group on one 0 to 100 scale over a timeframe.",
            "default": "trending"
          },
          "countries": {
            "title": "Countries (trending)",
            "type": "array",
            "description": "Two-letter country codes such as US, PL, DE or GB. One request per country, about 3 seconds apart. Used by mode Trending now.",
            "default": [
              "US"
            ],
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Max trends per country",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Trending rows to save for each country, in Google's order. In test runs Google returned 121 trends for Poland and 475 for the US over 24 hours. Used by mode Trending now.",
            "default": 25
          },
          "hours": {
            "title": "Time window (trending)",
            "enum": [
              "4",
              "24",
              "48",
              "168"
            ],
            "type": "string",
            "description": "How far back Google looks for rising searches.",
            "default": "24"
          },
          "onlyActive": {
            "title": "Only trends that are still active",
            "type": "boolean",
            "description": "Google also lists searches whose peak has already ended. Turn this on to keep only the ones still running. The RSS fallback has no end time, so its rows are always kept.",
            "default": false
          },
          "minTraffic": {
            "title": "Minimum searches (trending)",
            "minimum": 0,
            "maximum": 100000000,
            "type": "integer",
            "description": "Keep only trends with at least this many searches. Google gives a bucket such as 5000 (shown as 5K+), and the bucket is compared. Trends without a figure are dropped when this is above 0. 0 keeps everything. Dropped trends are not saved and not charged, and the list is cut to the maximum after they are dropped.",
            "default": 0
          },
          "categories": {
            "title": "Categories (trending)",
            "type": "array",
            "description": "Keep only trends that Google puts in at least one of these categories, for example Sports or Business and Finance. Any case works, and & for and. A name Google does not use stops the run and lists the allowed ones: Autos and Vehicles, Beauty and Fashion, Business and Finance, 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, Climate. Empty keeps all. The RSS fallback feed has no categories, so its rows are dropped when this is set. Dropped trends are not saved and not charged.",
            "items": {
              "type": "string"
            }
          },
          "includeArticles": {
            "title": "Include related news articles",
            "type": "boolean",
            "description": "Up to three news articles per trend with title, URL and source. Google's main feed currently sends none, so they are taken from the country's RSS feed (one more request per country) for the trends it also lists, and other trends get an empty list. Off saves every row without articles.",
            "default": true
          },
          "language": {
            "title": "Language (trending)",
            "type": "string",
            "description": "Two-letter language code sent to Google, for example en or pl. The search terms stay in the language of the country.",
            "default": "en"
          },
          "keywords": {
            "title": "Keywords (monitor)",
            "type": "array",
            "description": "Up to 50 keywords or phrases to check in one run. Used by mode Keyword monitor. In mode Compare keywords it is one group of up to 5 keywords, instead of Comparisons. Leave empty in mode Trending now.",
            "items": {
              "type": "string"
            }
          },
          "comparisons": {
            "title": "Comparisons (compare)",
            "type": "array",
            "description": "A list of keyword groups, for example [[\"bitcoin\", \"ethereum\"], [\"iphone\", \"pixel\"]]. Each group has 1 to 5 keywords, as Google allows, and its keywords share one 0 to 100 scale. Up to 20 groups. A group with more than 5 keywords or an empty group stops the run before any request. Used by mode Compare keywords. To compare one group, you can use Keywords instead.",
            "items": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "country": {
            "title": "Country (monitor, compare)",
            "type": "string",
            "description": "Two-letter country code such as US or PL, or a region such as US-CA. Empty means worldwide."
          },
          "timeframe": {
            "title": "Timeframe (monitor, compare)",
            "enum": [
              "now 1-d",
              "now 7-d",
              "today 1-m",
              "today 3-m",
              "today 12-m"
            ],
            "type": "string",
            "description": "The window of the interest-over-time series. Values run from 0 to 100 relative to the peak inside this window.",
            "default": "now 7-d"
          },
          "property": {
            "title": "Search property (monitor, compare)",
            "enum": [
              "web",
              "youtube",
              "news",
              "images",
              "shopping"
            ],
            "type": "string",
            "description": "Which Google search the interest is measured in. Web search is the default. A different property is a separate series with its own baseline, so switching it never mixes with the history of the same keyword in web search.",
            "default": "web"
          },
          "monitorName": {
            "title": "Monitor name",
            "type": "string",
            "description": "Name of the saved state in the key-value store \"google-trends-monitor-state\". Runs with the same name are compared with each other. Use a different name for each watchlist. A new name starts a new baseline. Empty means the name \"default\". The old field name stateKey still works."
          },
          "onlyChanged": {
            "title": "Only keywords that changed",
            "type": "boolean",
            "description": "Save only keywords that are new to the state, moved by at least the threshold, or got new rising queries. Unchanged keywords are neither saved nor charged. The first run for a keyword is always saved as its baseline.",
            "default": true
          },
          "changeThreshold": {
            "title": "Change threshold (points)",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "How many points (on the 0 to 100 scale) the latest value must move to count as changed. 0 means any move.",
            "default": 10
          },
          "spikeThreshold": {
            "title": "Spike threshold (ratio)",
            "minimum": 1,
            "maximum": 100,
            "type": "number",
            "description": "A row gets isSpike true when the latest value is at least this many times the median of the 30 days before it (the whole series if it is shorter). 1.5 means 50 percent above the median. Works on the first run too.",
            "default": 1.5
          },
          "includeRelatedQueries": {
            "title": "Top and rising related queries",
            "type": "boolean",
            "description": "Adds one more Google request per keyword and the top and rising related queries to each row. Needed for new-rising-query alerts. In mode Compare keywords it adds one request per keyword of each group, so turn it off for the fastest comparison.",
            "default": true
          },
          "includeRelatedTopics": {
            "title": "Top and rising related topics",
            "type": "boolean",
            "description": "Adds up to 10 top and 10 rising related topics (entities such as a company or a person, with their type) to each saved row. One more Google request per saved keyword. Google has returned empty topic lists to sessions that are not logged in, so the lists can be empty.",
            "default": false
          },
          "includeRegions": {
            "title": "Interest by region",
            "type": "boolean",
            "description": "Adds the sub-regions of the country with the highest interest (for example US states) to each saved row, 10 by default, more with Max regions. Worldwide lists countries. One more Google request per saved keyword. In mode Compare keywords it is one request per group, and the interest is on the shared scale of the group.",
            "default": false
          },
          "maxRegions": {
            "title": "Max regions",
            "minimum": 1,
            "maximum": 250,
            "type": "integer",
            "description": "How many regions to list when Interest by region is on, highest first. Above 10 each entry also gets its rank. Google lists every region that has data, for example 51 US states and territories. Needs Interest by region.",
            "default": 10
          },
          "includeTimeline": {
            "title": "Include the full series",
            "type": "boolean",
            "description": "Adds every point of the interest-over-time series to each row.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Google answers with a rate limit page when one IP sends too many requests. The actor waits at least 3 seconds between requests and retries with backoff. With the default Apify Proxy, the first CAPTCHA or repeated rate limit moves the run to Apify residential proxy when the account can use it.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}