{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Trends Scraper & API - Related Queries & Trending Now",
    "description": "Google Trends scraper and API alternative: interest over time, interest by country and region, top and rising related queries and topics, peak date and trending now, as plain rows.",
    "version": "0.1",
    "x-build-id": "zVplN9gyJdmcn3GPt"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/lergassy~google-trends-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-lergassy-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/lergassy~google-trends-scraper/runs": {
      "post": {
        "operationId": "runs-sync-lergassy-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/lergassy~google-trends-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-lergassy-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": "One keyword per line, or a Google Trends topic ID like <b>/m/01d0fp</b> or <b>/g/11…</b> (topic = all searches about the entity, in any language). Each gets its own full report, or switch on comparison below.",
            "items": {
              "type": "string"
            }
          },
          "compareKeywords": {
            "title": "Compare keywords with each other",
            "type": "boolean",
            "description": "Put up to 5 keywords on one chart, like the Compare button on Google Trends. One report (one charge) per group of 5.",
            "default": false
          },
          "geo": {
            "title": "Country / region",
            "type": "string",
            "description": "Empty = worldwide. Country code (US, ID, DE) or region code (US-CA, ID-BA).",
            "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": "Same periods as on Google Trends.",
            "default": "today 12-m"
          },
          "customTimeRange": {
            "title": "Custom date range",
            "type": "string",
            "description": "Optional, overrides Time range: <b>2025-01-01 2025-06-30</b>."
          },
          "category": {
            "title": "Category id",
            "minimum": 0,
            "type": "integer",
            "description": "Google Trends category (0 = all). E.g. 67 Travel, 7 Finance, 958 Real Estate.",
            "default": 0
          },
          "searchProperty": {
            "title": "Search type",
            "enum": [
              "",
              "youtube",
              "news",
              "images",
              "froogle"
            ],
            "type": "string",
            "description": "Which Google search the interest comes from.",
            "default": ""
          },
          "regionResolution": {
            "title": "Region level",
            "enum": [
              "COUNTRY",
              "REGION",
              "CITY",
              "DMA"
            ],
            "type": "string",
            "description": "Level of interest-by-region when a country is set (worldwide always gives countries).",
            "default": "REGION"
          },
          "historyPreset": {
            "title": "History + fresh tail (4–5 years weekly, 90 days daily, 7 days hourly)",
            "type": "boolean",
            "description": "Adds three extra windows per keyword: <b>today 5-y</b> (weekly), <b>today 3-m</b> (daily) and <b>now 7-d</b> (hourly). Each window is its own Google export with its own 0–100 scale and comes back as its own row (type <b>window</b>, one report each).",
            "default": false
          },
          "windows": {
            "title": "Extra time windows",
            "type": "array",
            "description": "Optional extra windows, one per line, same format as Time range or a custom range (<b>2024-01-01 2024-06-30</b>). Each becomes its own row with its original points (one report each).",
            "items": {
              "type": "string"
            }
          },
          "stitchWindows": {
            "title": "Stitch windows into one series (re-calibration)",
            "type": "boolean",
            "description": "Adds a free row of type <b>stitched</b>: all windows of the keyword put on the scale of the longest window by the median ratio over their overlap (algorithm <b>gt-overlap-median-ratio 1.0.0</b>). Original windows are always kept.",
            "default": false
          },
          "anchorKeyword": {
            "title": "Common anchor term (for comparing more than 5)",
            "type": "string",
            "description": "Works with Compare keywords. Every group gets this term added (4 terms + anchor per Google chart), and a free row of type <b>comparison_anchored</b> puts all groups on one scale through it (algorithm <b>gt-common-anchor-ratio 1.0.0</b>). Pick a steady term of similar popularity."
          },
          "includeRegions": {
            "title": "Interest by region",
            "type": "boolean",
            "description": "Add the interest-by-country/region table.",
            "default": true
          },
          "includeRelated": {
            "title": "Related queries and topics",
            "type": "boolean",
            "description": "Add top and rising related queries and topics.",
            "default": true
          },
          "topicsViaGoogle": {
            "title": "Related topics — fetch from the rendered page",
            "type": "boolean",
            "description": "Google withholds related topics from API clients (<code>USER_TYPE_SCRAPER</code>) while showing them on the rendered page. On: the Actor fetches the rendered page through Bright Data's Web Unlocker once per keyword — in a comparison, once per compared term (pages load 4 at a time, in parallel with the reports, up to 3 attempts each) and puts the <b>rising</b> topics the page shows — usually 5 — into <code>relatedTopics</code> with <code>relatedTopicsStatus: ok_from_rendered_page</code>; <code>relatedTopicsCoverage</code> says how many Google has in total. The Top list is not available. Paid extra: one <code>related-topics</code> event per term, charged only when topics arrived. Adds about 1–3 minutes to the run.",
            "default": false
          },
          "brightDataZone": {
            "title": "Bright Data zone (advanced)",
            "type": "string",
            "description": "Zone used for the rendered page. Leave the default unless you were told otherwise.",
            "default": "mcp_unlocker"
          },
          "trendingNowCountries": {
            "title": "📈 Trending Now countries",
            "type": "array",
            "description": "Country codes (US, ID, GB…) — today's trending searches with traffic and news links, $0.0005 each.",
            "items": {
              "type": "string"
            }
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Requests go to Google Trends directly first; a refused request is retried on a fresh Apify datacenter address. Residential is never switched on by itself.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}