{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Trends Scraper: Trending Now & Compare",
    "description": "Google Trends over time, by region and related queries for up to 5 compared terms, plus Trending Now. $0.02 per 1,000 results. One row per point.",
    "version": "0.1",
    "x-build-id": "yBiDDq86MU87k6D5y"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/luzivanlt~google-trends-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-luzivanlt-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/luzivanlt~google-trends-scraper/runs": {
      "post": {
        "operationId": "runs-sync-luzivanlt-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/luzivanlt~google-trends-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-luzivanlt-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": "What to look up on Google Trends, one search per line, e.g. coffee. To compare up to 5 terms on one chart, put them on one line separated by commas, e.g. coffee, tea, matcha. Each line gets interest over time, interest by region and related queries for the country, time range, category and Google property below. A typical one-term search over 12 months in one country is about 150 rows.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Google Trends links",
            "type": "array",
            "description": "Links copied from Google Trends, e.g. https://trends.google.com/trends/explore?q=bitcoin&geo=US. An explore page keeps its own terms, country, dates, category and property; a Trending Now page (trends.google.com/trending?geo=US) keeps its own country, hours, category and active filter. Other links are refused before anything is read.",
            "items": {
              "type": "string"
            }
          },
          "geo": {
            "title": "Country or region",
            "type": "string",
            "description": "Where to measure interest: a country code such as US, GB, DE or IN, a region such as US-CA, or a US metro such as US-CA-807, e.g. US. Leave empty for worldwide. A country gives interest by region, a US state gives metros, a small country gives cities, and worldwide gives countries."
          },
          "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": "The period of the chart, e.g. Past 12 months. Google picks the step from the length of the period (minutes, hours, days, weeks or months), and every row says which step it is. Past 12 months gives 53 weekly points per term. Custom dates below override it.",
            "default": "today 12-m"
          },
          "customTimeRange": {
            "title": "Custom dates",
            "type": "string",
            "description": "Two dates instead of a preset time range, start then end, from 2004-01-01 to today, e.g. 2025-01-01 2025-06-30. Overrides Time range. Google picks the chart's step from the length of the range (days, weeks or months), and each row says which step it is."
          },
          "category": {
            "title": "Category",
            "minimum": 0,
            "type": "integer",
            "description": "Google Trends' category number, as in the cat= part of an explore link, e.g. 71 for Food & Drink, 7 for Finance, 5 for Computers & Electronics, 20 for Sports. 0 for all categories. It narrows every search above to searches Google files under that category.",
            "default": 0
          },
          "searchProperty": {
            "title": "Google property",
            "enum": [
              "",
              "images",
              "news",
              "froogle",
              "youtube"
            ],
            "type": "string",
            "description": "Which Google search to measure, e.g. YouTube search: web search (the default), image search, news search, Google Shopping or YouTube search, as the Google property menu on Google Trends offers. It applies to every search term above; a link keeps its own.",
            "default": ""
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "The language Google names regions and related data in, and the language of the Trending Now lists, e.g. en-US, de, fr, ja or pt-BR. Default en-US. A link with its own hl= keeps it. It does not change which searches are counted, only how names are written.",
            "default": "en-US"
          },
          "includeInterestOverTime": {
            "title": "Interest over time",
            "type": "boolean",
            "description": "Save one row per point of the chart, per term: the 0 to 100 value Google shows, its date, its label, whether the last point is still partial, and each compared term's average. Turn it off to save only regions or related queries and pay for fewer rows.",
            "default": true
          },
          "includeInterestByRegion": {
            "title": "Interest by region",
            "type": "boolean",
            "description": "Save one row per region, metro or city, per term, with its 0 to 100 value, its code and name, and, when terms are compared, the term that leads there. A one-term search in the US gives its 51 states (with Washington, D.C.). Turn it off to save fewer rows.",
            "default": true
          },
          "includeRelatedQueries": {
            "title": "Related queries",
            "type": "boolean",
            "description": "Save one row per related query, per term: the top queries with their 0 to 100 value and the rising ones with their growth in percent, or Breakout for the fastest risers, with a link to explore each. Usually up to 25 of each kind; turn it off to save fewer rows.",
            "default": true
          },
          "trendingCountries": {
            "title": "Trending Now countries",
            "type": "array",
            "description": "Two-letter country codes to read Google's Trending Now list for, e.g. US, GB, IN. Each country gives one row per trending search: its search volume, growth, start and end time, related searches and categories. The US list of 7 days held 3,480 trending searches on the latest check.",
            "items": {
              "type": "string"
            }
          },
          "trendingHours": {
            "title": "Trending Now window",
            "enum": [
              "4",
              "24",
              "48",
              "168"
            ],
            "type": "string",
            "description": "How far back the Trending Now list goes, e.g. Past 7 days: the past 4 hours, 24 hours, 48 hours or 7 days, as the Trending Now page offers. A longer window lists more trends, active and ended; Max trends per country caps how many rows each country saves.",
            "default": "24"
          },
          "trendingCategories": {
            "title": "Trending Now categories",
            "type": "array",
            "description": "Keep only trends in these categories, e.g. Sports and Technology, as the category menu of the Trending Now page offers. A trend Google files under several categories is kept when any one matches. Leave it empty for all categories.",
            "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"
              ]
            }
          },
          "trendingActiveOnly": {
            "title": "Only active trends",
            "type": "boolean",
            "description": "Keep only trends Google still marks as active, leaving out those that have ended, as the Active toggle of the Trending Now page does. Every row says whether its trend is active and, for an ended one, when it ended, so you can also filter later.",
            "default": false
          },
          "maxTrendingPerCountry": {
            "title": "Max trends per country",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "The most Trending Now rows to save for each country, from 1 to 5,000, in the order Google lists them. Each row is one result charged. The default of 500 is a cap on cost; a 7-day list of the US held 3,480 trending searches on the latest check.",
            "default": 500
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}