{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Trends Scraper, Keyword Ideas & Alerts · $1.5/1K",
    "description": "Google Trends from $1.50 per 1,000 keywords, no start fee. Rising/falling verdict, interest over time, regions, rising and breakout searches; long-tail keyword ideas from Google and YouTube autocomplete scored on Trends; compare unlimited keywords and countries; trending now; alerts.",
    "version": "0.0",
    "x-build-id": "022im5FbTldjhBkJX"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/xpandalabs~google-trends-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-xpandalabs-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/xpandalabs~google-trends-monitor/runs": {
      "post": {
        "operationId": "runs-sync-xpandalabs-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/xpandalabs~google-trends-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-xpandalabs-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": {
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Search terms, one per line, in any language. Each keyword returns one row: interest over time, trend (rising / falling / stable), peak, top regions and related searches. Any number of keywords.<br>You can also paste <b>Google Trends links</b> (trends.google.com/trends/explore?q=...): each link is run with its own keywords, location, dates, category and search type, exactly as on the website.",
            "items": {
              "type": "string"
            }
          },
          "compareMode": {
            "title": "Compare keywords",
            "enum": [
              "together",
              "separate"
            ],
            "type": "string",
            "description": "<b>Together</b>: keywords are directly comparable, as when you compare terms on Google Trends. Works for any number of keywords, not only 5.<br><b>Separately</b>: each keyword scaled on its own, best for watching many unrelated keywords.",
            "default": "together"
          },
          "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": "Ignored when you set a start or end date.",
            "default": "past_12_months"
          },
          "startDate": {
            "title": "Start date",
            "type": "string",
            "description": "Custom range, YYYY-MM-DD, from 2004-01-01."
          },
          "endDate": {
            "title": "End date",
            "type": "string",
            "description": "Custom range, YYYY-MM-DD. Empty = today."
          },
          "geo": {
            "title": "Location",
            "type": "string",
            "description": "Empty = worldwide. A 2-letter country code (US, GB, JP, DE, TW, ...) or a region such as US-CA or GB-ENG."
          },
          "countries": {
            "title": "Countries (compare markets)",
            "type": "array",
            "description": "Check every keyword in each of these countries (2-letter codes; WORLDWIDE for worldwide) and see where it is rising or falling. Overrides Location.",
            "items": {
              "type": "string"
            }
          },
          "searchType": {
            "title": "Search type",
            "enum": [
              "web",
              "images",
              "news",
              "shopping",
              "youtube"
            ],
            "type": "string",
            "description": "Which Google search to measure: web (default), images, news, Google Shopping or YouTube.",
            "default": "web"
          },
          "category": {
            "title": "Category ID",
            "minimum": 0,
            "type": "integer",
            "description": "Google Trends category number, e.g. 0 = all, 5 = Computers & Electronics, 7 = Finance, 71 = Food & Drink. Use it to separate meanings (apple the fruit vs Apple the company).",
            "default": 0
          },
          "includeRelatedQueries": {
            "title": "Related searches",
            "type": "boolean",
            "description": "Top and rising related searches per keyword, with breakout flags. Rising searches are where new topics show up first.",
            "default": true
          },
          "includeRegions": {
            "title": "Top regions",
            "type": "boolean",
            "description": "Where each keyword is searched most.",
            "default": true
          },
          "regionResolution": {
            "title": "Region level",
            "enum": [
              "auto",
              "COUNTRY",
              "REGION",
              "CITY",
              "DMA"
            ],
            "type": "string",
            "description": "Level of detail for top regions.",
            "default": "auto"
          },
          "maxRegions": {
            "title": "Max regions per keyword",
            "minimum": 0,
            "maximum": 250,
            "type": "integer",
            "description": "0 = all.",
            "default": 15
          },
          "includeTimeline": {
            "title": "Interest over time",
            "type": "boolean",
            "description": "The full time series (date and 0–100 value). Turn off for smaller rows when you only need the headline numbers.",
            "default": true
          },
          "ideaSeeds": {
            "title": "Seed keywords for ideas",
            "type": "array",
            "description": "Find long-tail keyword ideas: each seed is expanded through Google (and optionally YouTube) autocomplete with a–z, question and modifier variations. The top ideas are then checked on Google Trends: rising or falling, interest relative to the seed, and an opportunity score.",
            "items": {
              "type": "string"
            }
          },
          "ideaSources": {
            "title": "Suggestion sources",
            "type": "array",
            "description": "Where to collect autocomplete suggestions.",
            "items": {
              "type": "string",
              "enum": [
                "google",
                "youtube"
              ],
              "enumTitles": [
                "Google Search",
                "YouTube"
              ]
            },
            "default": [
              "google"
            ]
          },
          "ideaModifiers": {
            "title": "Expansions",
            "type": "array",
            "description": "Variations sent to autocomplete for every seed. More variations = more ideas.",
            "items": {
              "type": "string",
              "enum": [
                "alphabet",
                "questions",
                "prepositions"
              ],
              "enumTitles": [
                "Seed + a…z",
                "Questions (how, what, best, free…)",
                "Modifiers (for, with, vs, alternative…)"
              ]
            },
            "default": [
              "alphabet",
              "questions"
            ]
          },
          "maxIdeasPerSeed": {
            "title": "Max ideas per seed",
            "minimum": 1,
            "maximum": 300,
            "type": "integer",
            "description": "Ideas are ranked by how often and how high Google suggests them.",
            "default": 50
          },
          "validateTopIdeas": {
            "title": "Check top ideas on Google Trends",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "How many of the top ideas per seed get a Google Trends check (trend, growth, interest vs seed, opportunity score). 0 = suggestions only.",
            "default": 20
          },
          "trendingNow": {
            "title": "Trending now (countries)",
            "type": "array",
            "description": "2-letter country codes. Returns what is trending in Google Search right now in each country: search, approximate searches, start time and the news behind it. Works with or without keywords.",
            "items": {
              "type": "string"
            }
          },
          "maxTrendingPerCountry": {
            "title": "Max trending searches per country",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "How many of the current top trending searches to return per country.",
            "default": 25
          },
          "trackChanges": {
            "title": "Track changes",
            "type": "boolean",
            "description": "Compare with the previous run: <code>newRisingQueries</code> lists rising searches that were not there last time, <code>changeType</code> flags new rising searches or a changed trend, trending searches get <code>isNew</code>.",
            "default": true
          },
          "onlyChanges": {
            "title": "Only return changes",
            "type": "boolean",
            "description": "Return only keywords with new rising searches or a changed trend, and only newly trending searches. Unchanged rows are not saved and not charged. The first run returns everything as a baseline. Combine with a daily schedule for alerts.",
            "default": false
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Language for region and topic names, e.g. en-US, de, ja, zh-TW.",
            "default": "en-US"
          },
          "maxConcurrency": {
            "title": "Parallel requests",
            "minimum": 1,
            "maximum": 6,
            "type": "integer",
            "description": "Keep low: Google Trends limits fast requests.",
            "default": 3
          },
          "maxRetries": {
            "title": "Retries",
            "minimum": 1,
            "maximum": 12,
            "type": "integer",
            "description": "Fresh IP retries when Google Trends rate-limits a request.",
            "default": 8
          },
          "residentialFallback": {
            "title": "Residential proxy fallback",
            "type": "boolean",
            "description": "Retry through residential proxies if datacenter IPs keep being rate-limited.",
            "default": true
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Apify Proxy (datacenter) works; keep the default.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}