{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Trends Scraper — bulk, 5+ terms on one scale",
    "description": "Interest over time, by region, related queries and topics for thousands of terms, no browser. Any number of terms on one scale, optional daily data up to 5 years, a status per term; terms without data are not charged.",
    "version": "1.0",
    "x-build-id": "kL9hFdYPzxeX1JbnA"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/pampadata~google-trends-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-pampadata-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/pampadata~google-trends-scraper/runs": {
      "post": {
        "operationId": "runs-sync-pampadata-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/pampadata~google-trends-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-pampadata-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",
        "required": [
          "searchTerms"
        ],
        "properties": {
          "searchTerms": {
            "title": "Search terms",
            "type": "array",
            "description": "Words or phrases, one per line (up to 5,000 term × location pairs per run). Google's own syntax works: \"a + b\" (either), a Topic id like /m/0vpj4_b.",
            "items": {
              "type": "string"
            }
          },
          "geos": {
            "title": "Locations",
            "type": "array",
            "description": "Google Trends codes: a country (US, GB, AR, KR), a region (US-CA, GB-ENG, BR-SP), a US metro (US-NY-501). Leave empty for worldwide. Each term is read for each location.",
            "default": [
              "US"
            ],
            "items": {
              "type": "string"
            }
          },
          "timeRange": {
            "title": "Time range",
            "type": "string",
            "description": "One of Google's ranges (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) or your own dates: 2024-01-01 2025-06-30.",
            "default": "today 12-m"
          },
          "compareTogether": {
            "title": "Compare all terms on one scale",
            "type": "boolean",
            "description": "Off: each term on its own 0-100 scale (what most people want for many unrelated terms). On: all terms on one scale, like Google's comparison chart, also with more than 5 terms (an anchor term ties the batches of 5 together; up to 200 terms).",
            "default": false
          },
          "anchorTerm": {
            "title": "Anchor term (more than 5 terms on one scale)",
            "type": "string",
            "description": "Used only with 'Compare all terms on one scale' and more than 5 terms. Best: a term of middle popularity among yours. Default: the first term."
          },
          "dailyForLongRanges": {
            "title": "Daily data for long ranges (up to 5 years)",
            "type": "boolean",
            "description": "Google gives daily points only up to 270 days; longer ranges come weekly. On: daily points for the whole range, stitched from daily windows onto Google's own weekly scale, with a check against Google's weekly series per term. Charged as 'keyword-daily'.",
            "default": false
          },
          "includeTimeline": {
            "title": "Interest over time",
            "type": "boolean",
            "description": "The 0-100 interest curve for the time range (with the last, still incomplete point marked isPartial).",
            "default": true
          },
          "includeByRegion": {
            "title": "Interest by region",
            "type": "boolean",
            "description": "Interest by country, region, metro or city (see Region detail), each on the term's own 0-100 scale.",
            "default": true
          },
          "includeRelatedQueries": {
            "title": "Related queries (top and rising)",
            "type": "boolean",
            "description": "The searches people also made: top (most frequent) and rising (fastest growth; Breakout = over 5,000 %).",
            "default": true
          },
          "includeRelatedTopics": {
            "title": "Related topics (top and rising)",
            "type": "boolean",
            "description": "Google often does not offer related topics to sessions that are not signed in; when it does not, the row says 'notOffered' for this section and nothing extra is charged.",
            "default": false
          },
          "regionResolution": {
            "title": "Region detail",
            "enum": [
              "auto",
              "COUNTRY",
              "REGION",
              "DMA",
              "CITY"
            ],
            "type": "string",
            "description": "auto = Google's default for the location (countries for worldwide, states/regions for a country). DMA = US metro areas (US locations only). CITY = cities. COUNTRY = worldwide only.",
            "default": "auto"
          },
          "includeLowVolumeRegions": {
            "title": "Include low-volume regions",
            "type": "boolean",
            "description": "Also list regions where Google has too little data (value empty).",
            "default": false
          },
          "category": {
            "title": "Category",
            "minimum": 0,
            "type": "integer",
            "description": "Google Trends category number (0 = all categories; e.g. 7 Finance, 71 Food & Drink, 18 Shopping).",
            "default": 0
          },
          "searchType": {
            "title": "Search type",
            "enum": [
              "web",
              "images",
              "news",
              "youtube",
              "shopping"
            ],
            "type": "string",
            "description": "Which Google search the interest comes from.",
            "default": "web"
          },
          "proxyConfiguration": {
            "title": "Proxy (optional)",
            "type": "object",
            "description": "Leave empty: the Actor uses its own IP and switches to residential IPs by itself when Google refuses it (included in the price). Set a proxy only to force your own."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}