{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Trends Scraper - Interest, Regions & Related Queries",
    "description": "Get Google Trends data: interest over time, by region, and top and rising related queries for up to 25 keywords or Trends links, plus any country's Trending Now list. Each value is Google's 0 to 100 index against the keyword's own peak, not a search volume. $0.06 per 1,000 rows.",
    "version": "0.1",
    "x-build-id": "U8qhfW9sQdKzi7S7J"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/dami_studio~google-trends-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-dami_studio-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/dami_studio~google-trends-scraper/runs": {
      "post": {
        "operationId": "runs-sync-dami_studio-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/dami_studio~google-trends-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-dami_studio-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": "Keywords",
            "minItems": 0,
            "maxItems": 25,
            "type": "array",
            "description": "The keywords or phrases to look up on Google Trends. Up to 25 per run. Each one is looked up on its own and scaled 0-100 against its own peak, exactly as it is when you type a single term into Google Trends.",
            "items": {
              "type": "string"
            }
          },
          "trendsUrls": {
            "title": "Google Trends links",
            "minItems": 0,
            "maxItems": 25,
            "type": "array",
            "description": "Optional. Paste links from the Google Trends Explore page, one per line, and each is run with its own terms, region, time range, category and search surface. A link with several terms keeps them on one shared scale, as Google shows them. A link that compares regions or time ranges against each other is refused with a free row saying why. Up to 25.",
            "items": {
              "type": "string"
            }
          },
          "geo": {
            "title": "Region",
            "type": "string",
            "description": "Two-letter country code such as US, GB, DE, IN or BR, or a sub-region such as US-CA or GB-ENG. Leave empty for worldwide."
          },
          "timeframe": {
            "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": "How far back to look. Pick one of the standard ranges, or type a custom range as two ISO dates, for example \"2024-01-01 2024-12-31\". Shorter ranges return finer-grained points: the last day is minute-by-minute, the last week is hourly, a year is weekly, five years is weekly and \"all\" is monthly."
          },
          "dataTypes": {
            "title": "What to return",
            "type": "array",
            "description": "Which of the three data sets to pull for each keyword. Fewer data sets means fewer rows and a smaller bill. Leave all three ticked to get everything.",
            "items": {
              "type": "string",
              "enum": [
                "interestOverTime",
                "interestByRegion",
                "relatedQueries"
              ],
              "enumTitles": [
                "Interest over time",
                "Interest by region",
                "Related and rising queries"
              ]
            }
          },
          "maxItems": {
            "title": "Maximum rows",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Total rows to return across every keyword and data set. A single keyword with all three data sets and a 12-month range produces roughly 150 rows, so budget about 150 rows per keyword. Keep this low while you are testing - you pay per row."
          },
          "compareKeywords": {
            "title": "Compare the keywords against each other",
            "type": "boolean",
            "description": "Off by default. When off, each keyword is scaled 0-100 against its own peak. When on, the first five keywords are put on one shared scale so their interest-over-time values can be compared directly, exactly like typing several terms into Google Trends at once."
          },
          "splitCommas": {
            "title": "Split keywords on commas",
            "type": "boolean",
            "description": "Off by default. When on, a line such as \"bitcoin, ethereum\" becomes two keywords, each looked up on its own. When off, the comma is part of the search term, as before."
          },
          "searchType": {
            "title": "Google property",
            "enum": [
              "web",
              "images",
              "news",
              "youtube",
              "shopping"
            ],
            "type": "string",
            "description": "Which Google surface the interest is measured on."
          },
          "regionLevel": {
            "title": "Regional detail",
            "enum": [
              "default",
              "country",
              "region",
              "city",
              "metro"
            ],
            "type": "string",
            "description": "How finely to break down the interest-by-region data. \"Automatic\" uses whatever level Google itself shows for the region you picked - countries for a worldwide run, states or provinces for a single country. \"City\" and \"Metro area\" produce far more rows (roughly 200 each) and are only available inside a single country; Metro area is United States only. If a level is not available for your region, the run falls back to Automatic instead of failing."
          },
          "category": {
            "title": "Category",
            "minimum": 0,
            "maximum": 1500,
            "type": "integer",
            "description": "Optional Google Trends category id to narrow the search, for example 71 for Food & Drink, 7 for Finance or 174 for Sports. Leave at 0 for all categories."
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Language for region names and formatted labels, as a code like en-US, de, fr or ja. It does not change which data is returned, only how names are spelled."
          },
          "trendingNowGeos": {
            "title": "Trending now - regions (optional)",
            "minItems": 0,
            "maxItems": 20,
            "type": "array",
            "description": "Optional. Add country codes such as US, GB or DE to also pull that country's current Trending Now list - the searches spiking right now, with the top news story behind each one. This is independent of the keywords above and can be used on its own.",
            "items": {
              "type": "string"
            }
          },
          "trendingNowHours": {
            "title": "Trending now - time window (optional)",
            "enum": [
              "4",
              "24",
              "48",
              "168"
            ],
            "type": "string",
            "description": "Optional. Set this, the categories or the maximum below, and the trending list comes from the full Trending Now page instead of the short feed of about ten searches. The full list holds hundreds of searches a day in a large country, and each row carries the search volume, the rise in percent, when the trend started and whether it is still going, the searches behind it and its categories. It does not carry the news story; the short feed does. Leave all three empty to keep the short feed."
          },
          "trendingNowCategories": {
            "title": "Trending now - categories (optional)",
            "type": "array",
            "description": "Optional. Keep only trending searches Google files under one of these categories. Empty means all categories. Uses the full Trending Now list, over 24 hours unless you pick a window.",
            "items": {
              "type": "string",
              "enum": [
                "autos",
                "beauty",
                "business",
                "climate",
                "entertainment",
                "food",
                "games",
                "health",
                "hobbies",
                "jobs",
                "law",
                "other",
                "pets",
                "politics",
                "science",
                "shopping",
                "sports",
                "technology",
                "travel"
              ],
              "enumTitles": [
                "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"
              ]
            }
          },
          "trendingNowMaxItems": {
            "title": "Trending now - maximum per region (optional)",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Optional. Stop after this many trending searches in each region, in the order Google lists them. Maximum rows above still caps the whole run. Uses the full Trending Now list."
          },
          "proxyUrls": {
            "title": "Your own proxy servers (optional)",
            "minItems": 0,
            "maxItems": 50,
            "type": "array",
            "description": "Leave this empty for a normal run. Fill it in only if you want the traffic to leave through proxy servers you already pay for, one URL per line, in the form http://user:pass@host:port.",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}