{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Trends Scraper — No Start Fee, No Empty Charges",
    "description": "Google Trends data for any keyword: interest over time, by region, rising and breakout queries, topics. Paste Trends links or a Google Sheet, export Excel-ready rows. Trending Now by category, 4h to 7 days. No start fee, no charge for empty results. $3 per 1,000 keywords.",
    "version": "0.1",
    "x-build-id": "Pzm8XoStueX6ocfEd"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/digitalstorks~google-trends-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-digitalstorks-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/digitalstorks~google-trends-scraper/runs": {
      "post": {
        "operationId": "runs-sync-digitalstorks-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/digitalstorks~google-trends-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-digitalstorks-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": "What do you want to get?",
            "enum": [
              "keywords",
              "trendingNow"
            ],
            "type": "string",
            "description": "<b>Keyword trends</b>: interest over time, by region, related queries and topics for your keywords.<br><b>Trending Now</b>: today's fastest-rising searches in a country, with approximate traffic and news links.",
            "default": "keywords"
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Search terms to analyse, one per line. Each keyword is one result (one charge). You can also use Google Trends links or a Google Sheet below.",
            "items": {
              "type": "string"
            }
          },
          "trendsUrls": {
            "title": "Google Trends links",
            "type": "array",
            "description": "Optional. Paste links from <a href=\"https://trends.google.com/trends/explore\" target=\"_blank\">Google Trends Explore</a>, one per line. Keywords, location, time range, category and search type are read from each link, and keywords in one link are compared with each other. Each keyword is one result (one charge).",
            "items": {
              "type": "string"
            }
          },
          "keywordsSheet": {
            "title": "Google Sheet with keywords",
            "type": "string",
            "description": "Optional. Link to a Google Sheet shared as <b>Anyone with the link can view</b>. Keywords are read from the first column (of the tab in the link, or the first tab). A header such as \"Keyword\" in the first row is skipped. Uses the location and time range below."
          },
          "geo": {
            "title": "Location",
            "type": "string",
            "description": "Two-letter country code (e.g. <code>US</code>, <code>GB</code>, <code>DE</code>) or a region code (e.g. <code>US-CA</code>). Leave empty for worldwide. Trending Now needs a country or region and defaults to <code>US</code>.",
            "default": ""
          },
          "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": "Period to analyse. Use Custom time range below for exact dates.",
            "default": "today 12-m"
          },
          "customTimeRange": {
            "title": "Custom time range",
            "pattern": "^$|^\\d{4}-\\d{2}-\\d{2} \\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Optional. Overrides Time range. Format: <code>YYYY-MM-DD YYYY-MM-DD</code>, e.g. <code>2025-01-01 2025-06-30</code>."
          },
          "property": {
            "title": "Search type",
            "enum": [
              "",
              "images",
              "news",
              "youtube",
              "froogle"
            ],
            "type": "string",
            "description": "Which Google search to measure.",
            "default": ""
          },
          "category": {
            "title": "Category ID",
            "minimum": 0,
            "type": "integer",
            "description": "Google Trends category ID to narrow results (0 = all categories). Example: 7 = Finance, 71 = Food & Drink, 958 = Jobs.",
            "default": 0
          },
          "outputFormat": {
            "title": "Output format",
            "enum": [
              "grouped",
              "flat"
            ],
            "type": "string",
            "description": "<b>One row per keyword</b>: all data for a keyword in one item (best for JSON and the API).<br><b>One row per data point</b>: a flat table with one row per date, region, query or topic (best for Excel, CSV and Google Sheets). You are still charged per keyword, not per row.",
            "default": "grouped"
          },
          "compareKeywords": {
            "title": "Compare keywords against each other",
            "type": "boolean",
            "description": "On: keywords are analysed together in groups of up to 5 (like typing them side by side in Google Trends), so their values are directly comparable. Off: each keyword is analysed on its own 0–100 scale.",
            "default": false
          },
          "includeInterestOverTime": {
            "title": "Interest over time",
            "type": "boolean",
            "description": "Timeline of search interest (0–100).",
            "default": true
          },
          "includeInterestByRegion": {
            "title": "Interest by region",
            "type": "boolean",
            "description": "Where the keyword is most popular.",
            "default": true
          },
          "includeRelatedQueries": {
            "title": "Related queries (top & rising)",
            "type": "boolean",
            "description": "Searches people also make, including breakout queries.",
            "default": true
          },
          "includeRelatedTopics": {
            "title": "Related topics (top & rising)",
            "type": "boolean",
            "description": "Topics people also search for. Add-on: charged separately, only for keywords where topics are returned. Needs a paid Apify plan (or your own DataForSEO login below).",
            "default": false
          },
          "regionResolution": {
            "title": "Region level",
            "enum": [
              "AUTO",
              "COUNTRY",
              "REGION",
              "DMA",
              "CITY"
            ],
            "type": "string",
            "description": "Level of detail for Interest by region. Auto = countries for worldwide, regions/states for a country, cities for a region.",
            "default": "AUTO"
          },
          "includeLowVolumeRegions": {
            "title": "Include low-volume regions",
            "type": "boolean",
            "description": "Also return regions with very little search volume.",
            "default": false
          },
          "trendingTimeWindow": {
            "title": "Trending in the past",
            "enum": [
              "4",
              "24",
              "48",
              "168"
            ],
            "type": "string",
            "description": "Trending Now only. How far back to look for trending searches.",
            "default": "24"
          },
          "trendingCategories": {
            "title": "Categories",
            "type": "array",
            "description": "Trending Now only. Keep only trending searches in these categories. Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "17",
                "4",
                "3",
                "14",
                "18",
                "7",
                "15",
                "6",
                "16",
                "5",
                "2",
                "1",
                "20",
                "9",
                "10",
                "13",
                "8",
                "19",
                "11"
              ],
              "enumTitles": [
                "Sports",
                "Entertainment",
                "Business and Finance",
                "Politics",
                "Technology",
                "Health",
                "Science",
                "Games",
                "Shopping",
                "Food and Drink",
                "Beauty and Fashion",
                "Autos and Vehicles",
                "Climate",
                "Jobs and Education",
                "Law and Government",
                "Pets and Animals",
                "Hobbies and Leisure",
                "Travel and Transportation",
                "Other"
              ]
            },
            "default": []
          },
          "trendingActiveOnly": {
            "title": "Only trends that are still active",
            "type": "boolean",
            "description": "Trending Now only. Skip trends that have already peaked and ended.",
            "default": false
          },
          "maxTrendingItems": {
            "title": "Max Trending Now results",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Trending Now only. Each trending search is one result (one charge). The 7-day window can return over 1,000 trends.",
            "default": 50
          },
          "language": {
            "title": "Interface language",
            "type": "string",
            "description": "Language for topic names and formatted dates, e.g. <code>en-US</code>, <code>de</code>, <code>fr</code>.",
            "default": "en-US"
          },
          "maxRetries": {
            "title": "Retries before backup source",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "How many fresh connections to try against Google before switching to the backup data source.",
            "default": 4
          },
          "maxConcurrency": {
            "title": "Parallel requests",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many keywords to process at the same time, each on its own connection. Higher is faster; lower is gentler on Google.",
            "default": 5
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Residential proxies give the best results with Google Trends.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          },
          "dataForSeoLogin": {
            "title": "Your DataForSEO login (optional)",
            "type": "string",
            "description": "Optional. Use your own DataForSEO account for the backup source and related topics. On the Apify free plan, this is the only way to turn them on."
          },
          "dataForSeoPassword": {
            "title": "Your DataForSEO API password (optional)",
            "type": "string",
            "description": "Optional. API password from your DataForSEO dashboard."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}