{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Trends Scraper and API (50 Terms)",
    "description": "Export Google Trends to JSON or CSV: interest over time, interest by country, region or metro, top and rising related queries, and Trending Now searches with volume and growth. Up to 50 terms on one 0-100 scale, chained through an anchor term. No API key, no login. $1 per 1,000 rows.",
    "version": "0.1",
    "x-build-id": "0wJkOqdQbRGTM1dwR"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/locaihost~google-trends/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-locaihost-google-trends",
        "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/locaihost~google-trends/runs": {
      "post": {
        "operationId": "runs-sync-locaihost-google-trends",
        "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/locaihost~google-trends/run-sync": {
      "post": {
        "operationId": "run-sync-locaihost-google-trends",
        "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": {
          "startUrls": {
            "title": "Google Trends links (optional)",
            "type": "array",
            "description": "Paste links copied from trends.google.com, e.g. https://trends.google.com/trends/explore?q=coffee,tea&geo=US. The terms, location, time range, category and search type are read from the link. Trending Now links (trends.google.com/trending?geo=GB) add that country's trending searches. Settings in the link win over the fields below; the fields fill in anything the link leaves out. One run uses the first link's location and time range.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "searchTerms": {
            "title": "Search terms",
            "type": "array",
            "description": "Words or phrases to look up, e.g. \"coffee\", \"iphone 17\". Up to 5 are compared directly, like on trends.google.com. Add more (up to 50) and they are put on one shared 0–100 scale through an anchor term, so you can rank them all against each other.",
            "items": {
              "type": "string"
            }
          },
          "geo": {
            "title": "Location",
            "type": "string",
            "description": "Leave empty for worldwide. A country name or code (\"United States\", \"US\", \"Germany\", \"DE\"), a region code (\"US-CA\", \"GB-SCT\") or a US metro (\"US-NY-501\").",
            "default": ""
          },
          "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",
              "since-2004"
            ],
            "type": "string",
            "description": "Google picks the step from the range: minutes or hours up to a week, days up to 9 months, weeks up to 5 years, months beyond. Set a start and end date below for any other window.",
            "default": "past-12-months"
          },
          "startDate": {
            "title": "Start date (optional)",
            "pattern": "^(\\d{4}-\\d{2}-\\d{2})?$",
            "type": "string",
            "description": "YYYY-MM-DD, from 2004-01-01. With an end date, it replaces the time range."
          },
          "endDate": {
            "title": "End date (optional)",
            "pattern": "^(\\d{4}-\\d{2}-\\d{2})?$",
            "type": "string",
            "description": "YYYY-MM-DD. Empty means today."
          },
          "category": {
            "title": "Category",
            "enum": [
              "all",
              "arts-entertainment",
              "autos-vehicles",
              "beauty-fitness",
              "books-literature",
              "business-industrial",
              "computers-electronics",
              "finance",
              "food-drink",
              "games",
              "health",
              "hobbies-leisure",
              "home-garden",
              "internet-telecom",
              "jobs-education",
              "law-government",
              "news",
              "online-communities",
              "people-society",
              "pets-animals",
              "real-estate",
              "reference",
              "science",
              "shopping",
              "sports",
              "travel"
            ],
            "type": "string",
            "description": "Narrows an ambiguous term, e.g. \"jaguar\" in Autos & Vehicles. For any of Google's ~1,400 subcategories, put its id in Category id.",
            "default": "all"
          },
          "categoryId": {
            "title": "Category id (optional)",
            "minimum": 0,
            "type": "integer",
            "description": "Any Google Trends category id, e.g. 916 for Coffee & Tea. Overrides Category."
          },
          "searchType": {
            "title": "Search type",
            "enum": [
              "web",
              "images",
              "news",
              "shopping",
              "youtube"
            ],
            "type": "string",
            "description": "Which Google search the interest is measured on.",
            "default": "web"
          },
          "includeTimeline": {
            "title": "Interest over time",
            "type": "boolean",
            "description": "The 0–100 timeline for each term.",
            "default": true
          },
          "includeRegions": {
            "title": "Interest by region",
            "type": "boolean",
            "description": "Where each term is searched most: countries (worldwide), regions or states (inside a country). Each term's map is on its own 0–100 scale.",
            "default": false
          },
          "regionLevel": {
            "title": "Region level",
            "enum": [
              "auto",
              "country",
              "region",
              "metro",
              "city"
            ],
            "type": "string",
            "description": "Automatic means countries for a worldwide search and regions inside a country.",
            "default": "auto"
          },
          "includeLowVolumeRegions": {
            "title": "Include low-volume regions",
            "type": "boolean",
            "description": "Also list regions where Google has too little data to give a value (they come back as 0).",
            "default": false
          },
          "includeRelatedQueries": {
            "title": "Related queries",
            "type": "boolean",
            "description": "Top and rising searches people make with each term (up to 25 of each).",
            "default": false
          },
          "includeRelatedTopics": {
            "title": "Related topics",
            "type": "boolean",
            "description": "Top and rising topics. Google currently returns these lists empty to automated tools for most terms; the run says so when that happens.",
            "default": false
          },
          "filterNoise": {
            "title": "Remove filler from related queries",
            "type": "boolean",
            "description": "Google sometimes pads related lists with stock phrases unrelated to the term (\"gardening\" and \"hospitals\" for \"tea\"). On: clusters of those are removed and listed in the run's SUMMARY. Off: Google's lists exactly as returned.",
            "default": true
          },
          "anchorTerm": {
            "title": "Anchor term (optional)",
            "type": "string",
            "description": "With more than 5 search terms, every comparison includes this term so they can be put on one scale. Empty = your first term. Pick one of medium popularity: one far smaller than the rest gives rougher numbers."
          },
          "outputFormat": {
            "title": "Output format",
            "enum": [
              "series",
              "tidy"
            ],
            "type": "string",
            "description": "Each dataset row is one charged result. One row per term is cheapest. One row per data point loads straight into a spreadsheet or database, but a 12-month weekly timeline is 53 rows per term.",
            "default": "series"
          },
          "maxRows": {
            "title": "Max rows",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many rows. 0 = no limit.",
            "default": 0
          },
          "trendingCountries": {
            "title": "Trending Now countries",
            "type": "array",
            "description": "Today's trending searches for each country (\"US\", \"United Kingdom\", \"IN\"): every trend Google lists, with search volume, growth, start time, category and the queries behind it.",
            "items": {
              "type": "string"
            }
          },
          "trendingWindow": {
            "title": "Trending window",
            "enum": [
              "past-4-hours",
              "past-24-hours",
              "past-48-hours",
              "past-7-days"
            ],
            "type": "string",
            "description": "How far back the Trending Now list goes.",
            "default": "past-24-hours"
          },
          "trendingCategory": {
            "title": "Trending category",
            "enum": [
              "all",
              "autos-vehicles",
              "beauty-fashion",
              "business-finance",
              "climate",
              "entertainment",
              "food-drink",
              "games",
              "health",
              "hobbies-leisure",
              "jobs-education",
              "law-government",
              "other",
              "pets-animals",
              "politics",
              "science",
              "shopping",
              "sports",
              "technology",
              "travel-transportation"
            ],
            "type": "string",
            "description": "Only trends in this category.",
            "default": "all"
          },
          "onlyActiveTrends": {
            "title": "Only trends still rising",
            "type": "boolean",
            "description": "Skip trends Google marks as ended.",
            "default": false
          },
          "maxTrendsPerCountry": {
            "title": "Max trends per country",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "0 = every trend Google lists (often several hundred a day in big countries).",
            "default": 0
          },
          "onlyNew": {
            "title": "Only new trends since the last run",
            "type": "boolean",
            "description": "For daily alerts: return only trends this setup has not returned before, so a schedule never pays twice for the same trend. Remembered per set of countries and window.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}