{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Trends Scraper — Trending Now, timelines & queries",
    "description": "Google Trends scraper, no login or API key: interest over time, by region, related queries, compare up to 5 terms, back to 2004, and Trending Now by category with search volume. $0.75 per 1,000 terms, every chart in one row. Paste an apify/google-trends-scraper input unchanged.",
    "version": "0.0",
    "x-build-id": "AxUaO9flU0BBQVoVU"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/memo23~google-trends-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-memo23-google-trends-scraper",
        "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/memo23~google-trends-scraper/runs": {
      "post": {
        "operationId": "runs-sync-memo23-google-trends-scraper",
        "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/memo23~google-trends-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-memo23-google-trends-scraper",
        "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": "Keywords or Google topic ids (e.g. `/m/05p0rrx`) to query. Leave empty if you only want the Trending Now feed.",
            "items": {
              "type": "string"
            }
          },
          "compareKeywords": {
            "title": "Compare terms against each other",
            "type": "boolean",
            "description": "Query all search terms in ONE request (groups of up to 5) so their interest values are relative to each other — same as the compare view on trends.google.com. Off = each term scored independently on its own 0–100 scale.",
            "default": false
          },
          "startUrls": {
            "title": "Trends links (explore or trending)",
            "type": "array",
            "description": "Paste links from trends.google.com. An explore link (`/trends/explore?q=bitcoin,ethereum&geo=US&date=today 5-y`) runs as one query with that link's terms, location, time range, category and property. A `/trending?geo=GB` link switches on the Trending Now feed for that country. Runs alongside any search terms above.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "spreadsheetId": {
            "title": "Google Sheet with search terms",
            "type": "string",
            "description": "Optional id (or link) of a public Google Sheet. Terms are read from the first column; row 1 is the header and is skipped. Share the sheet as 'Anyone with the link can view'. Added to the search terms above."
          },
          "geos": {
            "title": "Locations",
            "type": "array",
            "description": "Locations to query: ISO country codes (`US`, `GB`, `DE`), region codes (`US-CA`), or an empty string for worldwide. Each term is queried once per location.",
            "items": {
              "type": "string"
            }
          },
          "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": "Preset window for the interest data, the same choices as the Trends site, from the past hour to 2004–present. Default: Past 12 months. Ignored when Custom time range is set.",
            "default": "today 12-m"
          },
          "customTimeRange": {
            "title": "Custom time range",
            "pattern": "^\\s*(\\d{4}-\\d{2}-\\d{2}\\s+\\d{4}-\\d{2}-\\d{2})?\\s*$",
            "type": "string",
            "description": "Optional fixed date window, start then end: `YYYY-MM-DD YYYY-MM-DD`, e.g. `2024-01-01 2024-06-30`. Earliest start is 2004-01-01. When set it replaces Time range for every term and location. Google picks the timeline resolution from the window length (daily for short windows, weekly or monthly for longer ones). Leave empty to use Time range."
          },
          "categoryId": {
            "title": "Category (Trends id)",
            "pattern": "^\\s*\\d*\\s*$",
            "type": "string",
            "description": "Optional Google Trends category id that narrows every query, e.g. `7` = Finance, `71` = Food & Drink, `174` = Sports. Find ids in the `cat=` part of a trends.google.com URL after picking a category there. Leave empty for all categories. API callers may send `category` instead, as a number (`7`) or a string (`\"7\"`); this field wins when both are set."
          },
          "property": {
            "title": "Search property",
            "enum": [
              "",
              "images",
              "news",
              "youtube",
              "froogle"
            ],
            "type": "string",
            "description": "Which Google property to measure search interest on.",
            "default": ""
          },
          "includeInterestOverTime": {
            "title": "Interest over time",
            "type": "boolean",
            "description": "Extract the interest timeline (0–100 relative search interest per time point) for the selected time range.",
            "default": true
          },
          "includeInterestByRegion": {
            "title": "Interest by region",
            "type": "boolean",
            "description": "Extract the geographic breakdown — every country or subregion scored 0–100 for the term.",
            "default": true
          },
          "includeRelatedQueries": {
            "title": "Related queries",
            "type": "boolean",
            "description": "Extract top and rising related search queries, including breakout terms and their growth percentages.",
            "default": true
          },
          "includeRelatedTopics": {
            "title": "Related topics",
            "type": "boolean",
            "description": "Extract top and rising related topics (Google entities). Google often returns an empty topics list; then no row is written, nothing is charged, and the miss is named in the run's ERRORS record as `topics_gated`. Related queries are unaffected.",
            "default": false
          },
          "trendingNow": {
            "title": "Scrape Trending Now",
            "type": "boolean",
            "description": "Also scrape the live Trending Now feed: one dataset row per trending topic with search volume, growth, start time, and related queries.",
            "default": false
          },
          "trendingNowGeo": {
            "title": "Trending Now country",
            "type": "string",
            "description": "Country whose Trending Now board is fetched, as a two-letter code such as `IN`, `FR` or `BR` (`UK` is read as `GB`). Default `US`.",
            "default": "US"
          },
          "trendingNowHours": {
            "title": "Trending Now window",
            "enum": [
              "4",
              "24",
              "48",
              "168"
            ],
            "type": "string",
            "description": "Time window for the Trending Now feed.",
            "default": "24"
          },
          "trendingNowCategories": {
            "title": "Trending Now categories",
            "type": "array",
            "description": "Keep only topics in these categories, the same ones as the filter on the Trends site. A topic can sit in several. Leave empty for the whole board. Only the rows you keep are billed.",
            "items": {
              "type": "string",
              "enum": [
                "1",
                "2",
                "3",
                "4",
                "5",
                "6",
                "7",
                "8",
                "9",
                "10",
                "11",
                "13",
                "14",
                "15",
                "16",
                "17",
                "18",
                "19",
                "20"
              ],
              "enumTitles": [
                "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"
              ]
            }
          },
          "outputFormat": {
            "title": "Output format",
            "enum": [
              "flat",
              "nested",
              "perTerm"
            ],
            "type": "string",
            "description": "Per term writes one row per search term × location with every chart inside it, under the field names apify/google-trends-scraper uses (`interestOverTime_timelineData`, `interestBySubregion`, `relatedQueries_top`, …), billed once, about $0.00075 a term. Nested keeps a whole timeline, region table, or related-query set in one row, billed once per chart. Flat writes one dataset row per timeline period, region, related query, topic, or trending topic, each one billed, about $0.11 a term. Runs and saved tasks that omit this field get flat.",
            "default": "flat"
          },
          "maxItems": {
            "title": "Max dataset rows",
            "minimum": 0,
            "maximum": 50000,
            "type": "integer",
            "description": "Hard cap on billed dataset rows; 0 means no limit. In flat mode one row is one data point. In nested mode one row is one chart, or one trending topic. Free-plan runs are capped at 60 rows. Rows the cap stops are listed in the run's ERRORS record as `budget_cap` and are not charged.",
            "default": 1000
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "type": "integer",
            "description": "How many Trends queries run in parallel. Default 5; lower it if runs slow down or fail.",
            "default": 5
          },
          "maxRequestRetries": {
            "title": "Max retries per query",
            "type": "integer",
            "description": "How many times a query that failed is retried automatically before it is dropped. A query that still fails is named in the run's ERRORS record with its reason and is not charged.",
            "default": 3
          },
          "proxy": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional proxy override. Residential proxies recommended; the default works out of the box, so you normally don't need to change this."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}