{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Trends Scraper",
    "description": "Google Trends API alternative: interest over time, interest by region and city, related queries and topics (top + rising), compare up to 5 keywords, and Trending Now by country. Fast, no browser, cheap batches, drop-in input compatible.",
    "version": "1.0",
    "x-build-id": "D6ggb0Ork5uwmNPtn"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/lagenuina_agency~google-trends-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-lagenuina_agency-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/lagenuina_agency~google-trends-scraper/runs": {
      "post": {
        "operationId": "runs-sync-lagenuina_agency-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/lagenuina_agency~google-trends-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-lagenuina_agency-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": {
          "mode": {
            "title": "Mode",
            "enum": [
              "keyword",
              "trending",
              "both"
            ],
            "type": "string",
            "description": "Keyword analysis = interest over time, by region, related queries/topics. Trending now = today's trending searches in a country. Left empty: keyword if you give terms, otherwise trending."
          },
          "searchTerms": {
            "title": "Search terms",
            "type": "array",
            "description": "Keywords to analyse. One run can contain hundreds of terms: each one is a separate result.",
            "items": {
              "type": "string"
            }
          },
          "isMultiple": {
            "title": "Compare terms separated by commas",
            "type": "boolean",
            "description": "When on, a term like \"pizza, pasta, sushi\" is compared on the same chart (max 5), exactly like on trends.google.com.",
            "default": false
          },
          "keyword": {
            "title": "Single keyword",
            "type": "string",
            "description": "Shortcut for one keyword (same field name as other Google Trends actors)."
          },
          "startUrls": {
            "title": "Google Trends URLs",
            "type": "array",
            "description": "Paste trends.google.com/trends/explore URLs: terms, geo, time range, category and property are read from the URL.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "spreadsheetId": {
            "title": "Google Sheet ID",
            "type": "string",
            "description": "ID of a public Google Sheet: search terms are read from the first column."
          },
          "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": "Predefined time range.",
            "default": ""
          },
          "customTimeRange": {
            "title": "Custom time range",
            "type": "string",
            "description": "Overrides time range. Format \"YYYY-MM-DD YYYY-MM-DD\", e.g. \"2025-01-01 2025-06-30\"."
          },
          "geo": {
            "title": "Geo",
            "type": "string",
            "description": "Country or region code (US, IT, GB, US-CA, IT-25…). Empty = worldwide. In Trending now mode it is the country.",
            "default": ""
          },
          "category": {
            "title": "Category",
            "type": "string",
            "description": "Google Trends category id (e.g. 71 Food & Drink, 7 Finance). Empty = all categories.",
            "default": ""
          },
          "property": {
            "title": "Google property",
            "enum": [
              "",
              "images",
              "news",
              "froogle",
              "youtube"
            ],
            "type": "string",
            "description": "Which Google search to measure.",
            "default": ""
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Interface language for names of regions and topics (en-US, it, de…).",
            "default": "en-US"
          },
          "includeInterestByRegion": {
            "title": "Interest by country / region",
            "type": "boolean",
            "description": "Adds interest by country (worldwide searches) or by region (when geo is a country).",
            "default": true
          },
          "includeRelated": {
            "title": "Related queries and topics",
            "type": "boolean",
            "description": "Adds top and rising related queries and topics.",
            "default": true
          },
          "trendingSearchesCountry": {
            "title": "Trending now: country",
            "type": "string",
            "description": "Country code for Trending now (US, IT, GB, DE…).",
            "default": "US"
          },
          "trendingSearchesTimeframe": {
            "title": "Trending now: time window",
            "enum": [
              "4",
              "24",
              "48",
              "168"
            ],
            "type": "string",
            "description": "Time window for Trending now.",
            "default": "24"
          },
          "trendingSearchesCategories": {
            "title": "Trending now: categories",
            "type": "array",
            "description": "Only trends in these categories. Empty = all.",
            "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"
              ]
            },
            "default": []
          },
          "trendStatus": {
            "title": "Trending now: status",
            "enum": [
              "all",
              "active",
              "ended"
            ],
            "type": "string",
            "description": "Only trends still active, only ended ones, or all.",
            "default": "all"
          },
          "trendingSearchesMaxItems": {
            "title": "Trending now: max trends",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum trending searches to return. Empty = all."
          },
          "maxItems": {
            "title": "Max results",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum results for the whole run. 0 = no limit.",
            "default": 0
          },
          "maxConcurrency": {
            "title": "Parallel terms",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "How many terms are processed in parallel.",
            "default": 3
          },
          "onlyNew": {
            "title": "Monitoring: only new",
            "type": "boolean",
            "description": "Trending now: return only trends not seen in previous runs. Keywords: return a term only when it has new rising queries (listed in newRisingQueries). Schedule it for alerts.",
            "default": false
          },
          "monitorStoreName": {
            "title": "Monitoring memory name",
            "type": "string",
            "description": "Named key-value store that remembers what was already seen. Use a different name per monitor.",
            "default": "google-trends-monitor"
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Apify Proxy is recommended.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}