{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Trends Scraper: Unlimited Keywords & Trending Now",
    "description": "Google Trends API alternative with no 5-keyword limit: any number of keywords and countries on one scale, daily data for years, interest by region and city, related and rising queries, ready insights and Trending now with search volumes.",
    "version": "0.1",
    "x-build-id": "yXG1TzijrUJNxO8N3"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/robertosan16~google-trends-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-robertosan16-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/robertosan16~google-trends-scraper/runs": {
      "post": {
        "operationId": "runs-sync-robertosan16-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/robertosan16~google-trends-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-robertosan16-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": {
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Search terms to check, one per line. Each keyword gets its own record for every location. You can also enter Google topic IDs such as <code>/m/02vqfm</code>.",
            "items": {
              "type": "string"
            }
          },
          "locations": {
            "title": "Locations",
            "type": "array",
            "description": "Countries or regions: codes such as <code>US</code>, <code>GB</code>, <code>US-CA</code>, <code>DE-BY</code>, or names such as <code>Germany</code>. Leave empty or enter <code>Worldwide</code> for the whole world. Every keyword is checked in every 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",
              "custom"
            ],
            "type": "string",
            "description": "The period of the data, as on the Google Trends website. Google sets the step: minutes for the past hours, hours for 7 days, days up to 9 months, weeks up to 5 years, months beyond.",
            "default": "today 12-m"
          },
          "startDate": {
            "title": "Start date (custom range)",
            "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$",
            "type": "string",
            "description": "First day of a custom range, from 2004-01-01. Used when the time range is \"Custom dates\"."
          },
          "endDate": {
            "title": "End date (custom range)",
            "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$",
            "type": "string",
            "description": "Last day of a custom range. Defaults to today."
          },
          "dailyData": {
            "title": "Daily data for long periods",
            "type": "boolean",
            "description": "Google gives days only for periods up to about 9 months, weeks up to 5 years and months beyond. Turn this on to get one value per day for any period, also 5 years or since 2004: the Actor reads the period in windows of 250 days and ties every window to Google's weekly or monthly series, so the days stay on one scale. Takes a few more seconds per keyword; no extra charge.",
            "default": false
          },
          "compareOnOneScale": {
            "title": "Compare all keywords and locations on one scale",
            "type": "boolean",
            "description": "Off: each keyword and location gets its own 0-100 scale, which shows the shape of its trend best. On: everything shares one 0-100 scale, so you can compare popularity. Google compares at most 5 terms at a time; the Actor has no such limit, and small keywords get decimals (0.37) instead of Google's 0 and \"<1\".",
            "default": false
          },
          "searchAsTopic": {
            "title": "Search as Google topics",
            "type": "boolean",
            "description": "Look up each keyword as a Google topic (\"Coffee\", the drink) instead of the exact search term. A topic counts searches in all languages and spellings and leaves out other meanings.",
            "default": false
          },
          "category": {
            "title": "Category",
            "enum": [
              "0",
              "3",
              "47",
              "44",
              "22",
              "12",
              "5",
              "7",
              "71",
              "8",
              "45",
              "65",
              "11",
              "13",
              "958",
              "19",
              "16",
              "299",
              "14",
              "66",
              "29",
              "533",
              "174",
              "18",
              "20",
              "67"
            ],
            "type": "string",
            "description": "Limit the data to searches in one category. For subcategories, use an explore link with <code>cat=</code>.",
            "default": "0"
          },
          "searchType": {
            "title": "Search type",
            "enum": [
              "web",
              "images",
              "news",
              "shopping",
              "youtube"
            ],
            "type": "string",
            "description": "Which Google search to measure.",
            "default": "web"
          },
          "includeInterestByRegion": {
            "title": "Interest by region",
            "type": "boolean",
            "description": "Add the interest of every region (states, countries or cities) to each record.",
            "default": true
          },
          "regionResolution": {
            "title": "Region level",
            "enum": [
              "default",
              "CITY",
              "DMA"
            ],
            "type": "string",
            "description": "Default: countries for worldwide, regions (states) for a country. Cities works everywhere Google has enough data; metro areas (DMA) only in the United States.",
            "default": "default"
          },
          "includeRelatedQueries": {
            "title": "Related queries",
            "type": "boolean",
            "description": "Add the top and rising related queries to each record, with flags for queries that do not contain the keyword and for spam.",
            "default": true
          },
          "onlyNewRisingQueries": {
            "title": "Only new rising queries since the last run",
            "type": "boolean",
            "description": "For scheduled runs: save a keyword only when it has rising related queries that earlier runs of the same saved task did not see; they are listed in <code>newRisingQueries</code>. The first run saves every keyword and remembers its rising queries. Keywords without anything new are not saved and not charged. Turns on related queries.",
            "default": false
          },
          "exploreUrls": {
            "title": "Google Trends explore links",
            "type": "array",
            "description": "Links copied from the Google Trends website, such as <code>https://trends.google.com/trends/explore?date=today%205-y&geo=US&q=tesla,rivian</code>. Each link is repeated exactly: its terms, places, dates, category and search type.",
            "items": {
              "type": "string"
            }
          },
          "trendingLocations": {
            "title": "Trending now: locations",
            "type": "array",
            "description": "Countries or regions for the Trending now lists, such as <code>US</code>, <code>GB</code> or <code>US-NY</code>. Each trending search becomes one record with its search volume, growth, start time and related searches.",
            "items": {
              "type": "string"
            }
          },
          "trendingHours": {
            "title": "Trending now: period",
            "enum": [
              "4",
              "24",
              "48",
              "168"
            ],
            "type": "string",
            "description": "Searches trending in the past 4 hours, 24 hours, 48 hours or 7 days.",
            "default": "24"
          },
          "trendingCategories": {
            "title": "Trending now: categories",
            "type": "array",
            "description": "Keep only trending searches in these categories. Leave empty for 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"
              ]
            }
          },
          "trendingActiveOnly": {
            "title": "Trending now: active only",
            "type": "boolean",
            "description": "Keep only searches that are still trending.",
            "default": false
          },
          "maxTrendingPerLocation": {
            "title": "Trending now: maximum per location",
            "minimum": 0,
            "type": "integer",
            "description": "Keep at most this many trending searches per location, in Google's order. 0 keeps all (often 200-500 for 24 hours).",
            "default": 0
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Google Trends limits busy addresses. The Actor starts on Apify Proxy, opens a new session when Google limits one, and moves to residential addresses if limits continue.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}