{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Trends Scraper",
    "description": "Scrape Google Trends for any keyword or Trends link: interest over time, by country, region and city, top and rising related queries, keyword comparison and Trending Now. No login or API key. Bulk input, auto proxy fallback. Export JSON, CSV or Excel.",
    "version": "0.2",
    "x-build-id": "BcI7TNc9dINp5kTaf"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/data_minds~google-trends-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-data_minds-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/data_minds~google-trends-scraper/runs": {
      "post": {
        "operationId": "runs-sync-data_minds-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/data_minds~google-trends-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-data_minds-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",
            "type": "array",
            "description": "Keywords to analyse, one per line. Commas also split a line. Leave empty (and no links) to get Trending Now.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "🔗 Google Trends links",
            "type": "array",
            "description": "Optional Google Trends links. Region, period, category and search type in a link override the fields below.",
            "items": {
              "type": "string"
            }
          },
          "geo": {
            "title": "📍 Region",
            "type": "string",
            "description": "Country or region name or code, e.g. United States, US, California or US-CA. Empty means worldwide (Trending Now falls back to US).",
            "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. Trending Now supports the past 4 hours, day and 7 days.",
            "default": "today 12-m"
          },
          "customStartDate": {
            "title": "📅 Custom start date",
            "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$|^(\\d+)\\s*(day|week|month|year)s?$",
            "type": "string",
            "description": "Start of a custom period: a date like 2024-01-01 or a look-back like 6 months. Overrides the time range."
          },
          "customEndDate": {
            "title": "📅 Custom end date",
            "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$|^(\\d+)\\s*(day|week|month|year)s?$",
            "type": "string",
            "description": "End of a custom period: a date like 2024-06-30 or a look-back like 1 month. Empty means today when a start date is set."
          },
          "searchType": {
            "title": "🔧 Search type",
            "enum": [
              "web",
              "images",
              "news",
              "youtube",
              "shopping"
            ],
            "type": "string",
            "description": "Which Google search the interest data comes from.",
            "default": "web"
          },
          "category": {
            "title": "🎯 Category",
            "type": "string",
            "description": "Topic filter by name or id, e.g. Health, Finance, Sports or 45. For Trending Now use a trending category name such as Sports or Technology. Empty means all categories.",
            "default": ""
          },
          "viewedFrom": {
            "title": "🌍 Language",
            "enum": [
              "en-US",
              "en-GB",
              "es",
              "fr",
              "de",
              "it",
              "pt-BR",
              "nl",
              "pl",
              "tr",
              "ru",
              "ar",
              "hi",
              "id",
              "ja",
              "ko",
              "th",
              "vi",
              "zh-CN"
            ],
            "type": "string",
            "description": "Language of Google Trends used for names, category labels and Trending Now titles.",
            "default": "en-US"
          },
          "maxItems": {
            "title": "🔢 Max trending topics",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Only used for Trending Now (no keywords given): how many trending searches to save. 0 means all. Every keyword always gives one row.",
            "default": 20
          },
          "compareTerms": {
            "title": "✅ Compare keywords",
            "type": "boolean",
            "description": "Add a shared-scale comparison for keywords that use the same region, period, category and search type (up to 5 per group).",
            "default": true
          },
          "includeTimeline": {
            "title": "✅ Include interest over time",
            "type": "boolean",
            "description": "Add the full date-by-date interest values. Turn off for smaller rows (the summary statistics stay).",
            "default": true
          },
          "includeGeoBreakdown": {
            "title": "✅ Include regions and cities",
            "type": "boolean",
            "description": "Add interest by country, region, city and metro area to every keyword.",
            "default": true
          },
          "includeRelatedQueries": {
            "title": "✅ Include related queries",
            "type": "boolean",
            "description": "Add top and rising related queries (with breakout flags) to every keyword.",
            "default": true
          },
          "relatedLimit": {
            "title": "🔢 Max related queries per list",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "Cap on each top / rising related list per keyword. 0 means all.",
            "default": 0
          },
          "maxGeoRows": {
            "title": "🔢 Max rows per region list",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Cap on each country / region / city / metro list per keyword. 0 means all.",
            "default": 0
          },
          "maxConcurrency": {
            "title": "⚡ Parallel keywords",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many keywords are processed at the same time.",
            "default": 4
          },
          "maxRequestRetries": {
            "title": "🔁 Retries per request",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many times a failed request is retried before it counts as failed.",
            "default": 5
          },
          "proxyConfiguration": {
            "title": "🌐 Proxy configuration",
            "type": "object",
            "description": "Optional. Leave Apify Proxy off to use the default settings."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}